​
Select Service
ves-io-schema-api_sec-rule_suggestion-RuleSuggestionAPI-GetSuggestedRateLimitRule
Examples of performing rule_suggestion RuleSuggestionAPI GetSuggestedRateLimitRule
Usecase:
suggested rate limit rule
Request:
Request using vesctl:
vesctl request rpc rule_suggestion.RuleSuggestionAPI.GetSuggestedRateLimitRule -i request.yaml --uri /public/namespaces/ns1/api_sec/rule_suggestion/rate_limit --http-method POST
where file request.yaml has following contents:
namespace: ns1
path: /path1
virtualHostName: vh1
vesctl yaml response:
{}
Request using curl:
curl -X 'POST' -d '{"namespace":"ns1","virtual_host_name":"vh1","path":"/path1"}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_yz_011bp6td6q7f2v60gpbhl10c0000gp_T_go-build956643333_b001_apidocs.test/host=P20KPQDGJ9/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/ns1/api_sec/rule_suggestion/rate_limit'
curl response:
HTTP/1.1 200 OK
Content-Length: 91
Content-Type: application/json
Date: Sun, 08 Dec 2024 12:03:12 GMT
Vary: Accept-Encoding
{
"rule": null,
"loadbalancer_type": "VIRTUAL_SERVICE",
"found_existing_rule": null
}