ves-io-schema-infraprotect-CustomMitigationAPI-ListMitigationAnnotations

Examples of performing infraprotect CustomAlertAPI ListMitigationAnnotations

Usecase:

List mitigation annotations

Request:

Request using vesctl:

vesctl request rpc infraprotect.CustomAlertAPI.ListMitigationAnnotations -i request.yaml --uri /public/namespaces/system/infraprotect/mitigation/12345/annotations --http-method GET

where file request.yaml has following contents:

mitigationId: "12345"
namespace: system

vesctl yaml response:

annotations:
- annotation: done this
  creator: joe doe
  id: "123"
  time: "2022-01-12T14:48:50.508024Z"

Request using curl:

curl -X 'GET' -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/mitigation/12345/annotations?mitigation_id=12345&namespace=system'

curl response:

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

{
  "annotations": [
    {
      "id": "123",
      "creator": "joe doe",
      "annotation": "done this",
      "time": "2022-01-12T14:48:50.508024Z"
    }
  ]
}