ves-io-schema-malicious_user_mitigation-API-Replace

Examples of replacing malicious_user_mitigation

Usecase:

Use replace to update malicious-user-mitigation to add ANOMALY_SERVICE_PER_SITE

Request using vesctl:

vesctl configuration replace malicious_user_mitigation -i malicious_user_mitigation.yaml

where file malicious_user_mitigation.yaml has following contents (malicious_user_mitigation.ReplaceRequest):

RequestJSON:

{"metadata":{"name":"malicious-user-mitigation","namespace":"documentation"},"spec":{"mitigation_type":{"rules":[{"threat_level":{"low":null},"mitigation_action":{"javascript_challenge":null}}]}}} `

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"malicious-user-mitigation","namespace":"documentation"},"spec":{"mitigation_type":{"rules":[{"threat_level":{"low":null},"mitigation_action":{"javascript_challenge":null}}]}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build1372770011_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/malicious_user_mitigations/malicious-user-mitigation'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Thu, 28 Jul 2022 12:10:53 GMT
Vary: Accept-Encoding

{

}