- Home
- API Enriched
- Virtual
- config
- Suggest API endpoint protection rule.
Suggest API endpoint protection rule.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/config/namespaces/example/http_loadbalancers/example/api_endpoint_protection/suggestion';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"method":"ANY","name":"example","namespace":"example","path":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/config/namespaces/example/http_loadbalancers/example/api_endpoint_protection/suggestion \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "method": "ANY", "name": "example", "namespace": "example", "path": "example" }'Suggest API endpoint protection rule for a given path DEPRECATED. Use api_sec.rule_suggestion.rulesuggestionapi.getsuggestedapiendpointprotectionrule.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Namespace Namespace of the App type for current request.
Name HTTP load balancer for which this API endpoint protection rule applied.
Request Bodyrequired
Section titled “Request Bodyrequired”GET suggested API endpoint protection rule for a given path.
object
HTTP load balancer for which this API endpoint protection rule applied.
Namespace of the App type for current request.
Path to apply the API endpoint protection to Required: YES.
Responses
Section titled “Responses”A successful response.
GET suggested API endpoint protection rule for a given path.
object
object
object
object
object
object
object
object
Invert the match result.
List of methods values to match against.
The endpoint (path) of the request. Required: YES.
object
object
object
object
An unordered set of RFC 6793 defined 4-byte AS numbers that can be used to create allow or deny lists for use in network policy or service policy. It can be used to create the allow list only for DNS Load Balancer. Required: YES.
object
A list of references to bgp_asn_set objects.
Required: YES.
This type establishes a ‘direct reference’ from one object(the referrer) to another(the referred). Such a reference is in form of tenant/namespace/name for public API and Uid for private API This type of reference is called direct because the relation is explicit and concrete (as opposed to selector reference which builds a group based on labels of selectee objects)
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then kind will hold the referred object’s kind (e.g. “route”)
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then uid will hold the referred object’s(e.g. Route’s) uid.
object
Expressions contains the Kubernetes style label expression for selections. Required: YES.
object
Invert the match result.
A list of references to ip_prefix_set objects.
Required: YES.
This type establishes a ‘direct reference’ from one object(the referrer) to another(the referred). Such a reference is in form of tenant/namespace/name for public API and Uid for private API This type of reference is called direct because the relation is explicit and concrete (as opposed to selector reference which builds a group based on labels of selectee objects)
object
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then kind will hold the referred object’s kind (e.g. “route”)
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then name will hold the referred object’s(e.g. Route’s) name.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then namespace will hold the referred object’s(e.g. Route’s) namespace.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then tenant will hold the referred object’s(e.g. Route’s) tenant.
When a configuration object(e.g. Virtual_host) refers to another(e.g route) then uid will hold the referred object’s(e.g. Route’s) uid.
object
Invert the match result.
List of IPv4 prefix strings.
object
The IP threat categories is obtained from the list and is used to auto-generate equivalent label selection expressions
Required: YES.
object
A list of known classes of TLS fingerprints to match the input TLS JA3 fingerprint against.
A list of exact TLS JA3 fingerprints to match the input TLS JA3 fingerprint against.
A list of TLS JA3 fingerprints to be excluded when matching the input TLS JA3 fingerprint. This can be used to skip known false positives when using one or more known TLS fingerprint classes in the enclosing matcher.
object
Human readable description.
This is the name of the message. The value of name has to follow DNS-1035 format. Required: YES.
object
A list of predicates for all cookies that need to be matched. The criteria for matching each cookie is described in individual instances of CookieMatcherType. The actual cookie values are extracted from the request API as a list of strings for each cookie name. Note that all specified cookie matcher predicates must evaluate to true.
A cookie matcher specifies the name of a single cookie and the criteria to match it. The input has a list of values for each cookie in the request. A cookie matcher can check for one of the following:
- Presence or absence of the cookie
- At least one of the values for the cookie in the request satisfies the MatcherType item.
object
object
object
Invert Match of the expression defined.
object
A list of exact values to match the input against.
A list of regular expressions to match the input against.
An ordered list of transformers (starting from index 0) to be applied to the path before matching.
A case-sensitive cookie name. Required: YES.
A list of predicates for various HTTP headers that need to match. The criteria for matching each HTTP header are described in individual HeaderMatcherType instances. The actual HTTP header values are extracted from the request API as a list of strings for each HTTP header type. Note that all specified header predicates must evaluate to true.
A header matcher specifies the name of a single HTTP header and the criteria for the input request to match it. The input has a list of actual values for each header name in the original HTTP request. A header matcher can check for one of the following:
- Presence or absence of the header in the input
- At least one of the values for the header in the input satisfies the MatcherType item.
object
object
object
Invert the match result.
object
A list of exact values to match the input against.
A list of regular expressions to match the input against.
An ordered list of transformers (starting from index 0) to be applied to the path before matching.
A case-insensitive HTTP header name. Required: YES.
A list of predicates for various JWT claims that need to match. The criteria for matching each JWT claim are described in individual JWTClaimMatcherType instances. The actual JWT claims values are extracted from the JWT payload as a list of strings. Note that all specified JWT claim predicates must evaluate to true. Note that this feature only works on LBs with JWT Validation feature enabled.
A JWT claim matcher specifies the name of a single JWT claim and the criteria for the input request to match it. The input has a list of actual values for each JWT claim name in the JWT payload. A JWT claim matcher can check for one of the following:
- Presence or absence of the JWT Claim in the input
- At least one of the values for the JWT Claim in the input satisfies the MatcherType item.
object
object
object
Invert the match result.
object
A list of exact values to match the input against.
A list of regular expressions to match the input against.
An ordered list of transformers (starting from index 0) to be applied to the path before matching.
JWT claim name. Required: YES.
A list of predicates for all query parameters that need to be matched. The criteria for matching each query parameter are described in individual instances of QueryParameterMatcherType. The actual query parameter values are extracted from the request API as a list of strings for each query parameter name. Note that all specified query parameter predicates must evaluate to true.
A query parameter matcher specifies the name of a single query parameter and the criteria for the input request to match it. The input has a list of actual values for each query parameter name in the original HTTP request. A query parameter matcher can check for one of the following:
- Presence or absence of the query parameter in the input
- At least one of the values for the query parameter in the input satisfies the MatcherType item.
object
object
object
Invert the match result.
object
A list of exact values to match the input against.
A list of regular expressions to match the input against.
An ordered list of transformers (starting from index 0) to be applied to the path before matching.
A case-sensitive HTTP query parameter name. Required: YES.
Exclusive with [any_domain] The rule will apply for a specific domain. For example: api.example.com.
Example
{ "rule": { "api_endpoint_method": { "methods": [ "ANY" ] }, "client_matcher": { "ip_threat_category_list": { "ip_threat_categories": [ "SPAM_SOURCES" ] }, "tls_fingerprint_matcher": { "classes": [ "TLS_FINGERPRINT_NONE" ] } }, "request_matcher": { "cookie_matchers": [ { "item": { "transformers": [ "LOWER_CASE" ] } } ], "headers": [ { "item": { "transformers": [ "LOWER_CASE" ] } } ], "jwt_claims": [ { "item": { "transformers": [ "LOWER_CASE" ] } } ], "query_params": [ { "item": { "transformers": [ "LOWER_CASE" ] } } ] } }}Returned when operation is not authorized.
Examplegenerated
exampleReturned when there is no permission to access resource.
Examplegenerated
exampleReturned when resource is not found.
Examplegenerated
exampleReturned when operation on resource is conflicting with current value.
Examplegenerated
exampleReturned when operation has been rejected as it is happening too frequently.
Examplegenerated
exampleReturned when server encountered an error in processing API.
Examplegenerated
exampleReturned when service is unavailable temporarily.
Examplegenerated
exampleReturned when server timed out processing request.
Examplegenerated
example