ves-io-schema-infraprotect-CustomMitigationAPI-ListMitigations

Examples of performing infraprotect CustomMitigationAPI ListMitigations

Usecase:

List all mitigations

Request:

Request using vesctl:

vesctl request rpc infraprotect.CustomMitigationAPI.ListMitigations -i request.yaml --uri /public/namespaces/system/infraprotect/mitigations --http-method POST

where file request.yaml has following contents:

namespace: system

vesctl yaml response:

mitigations:
- id: "123"
  name: mitigation_ddos_123
  networkName: ddos_proof_123
  offramp: 129.168.0.1/32
  startTime: "2022-01-12T14:48:51.160060600Z"

Request using curl:

curl -X 'POST' -d '{"namespace":"system"}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build038462651_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/infraprotect/namespaces/system/infraprotect/mitigations'

curl response:

HTTP/1.1 200 OK
Content-Length: 340
Content-Type: application/json
Date: Wed, 12 Jan 2022 14:48:51 GMT
Vary: Accept-Encoding

{
  "mitigations": [
    {
      "id": "123",
      "name": "mitigation_ddos_123",
      "offramp": "129.168.0.1/32",
      "network_name": "ddos_proof_123",
      "is_ongoing": false,
      "start_time": "2022-01-12T14:48:51.160060600Z",
      "arbor_id": "",
      "creator": "",
      "network_id": "",
      "end_time": null
    }
  ]
}