​
Select Service
ves-io-schema-api_sec-rule_suggestion-RuleSuggestionAPI-GetSuggestedOasValidationRule
Examples of performing rule_suggestion RuleSuggestionAPI GetSuggestedOasValidationRule
Usecase:
suggested api endpoint validation rule
Request:
Request using vesctl:
vesctl request rpc rule_suggestion.RuleSuggestionAPI.GetSuggestedOasValidationRule -i request.yaml --uri /public/namespaces/ns1/api_sec/rule_suggestion/oas_validation --http-method POST
where file request.yaml has following contents:
method: GET
namespace: ns1
path: /path1
virtualHostName: vh1
vesctl yaml response:
{}
Request using curl:
curl -X 'POST' -d '{"namespace":"ns1","virtual_host_name":"vh1","path":"/path1","method":"GET"}' -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/oas_validation'
curl response:
HTTP/1.1 200 OK
Content-Length: 75
Content-Type: application/json
Date: Sun, 08 Dec 2024 12:03:11 GMT
Vary: Accept-Encoding
{
"loadbalancer_type": "VIRTUAL_SERVICE",
"found_existing_rule": null
}