ves-io-schema-infraprotect-CustomEventAPI-ListEventMitigations

Examples of performing infraprotect CustomEventAPI ListEventMitigations

Usecase:

List event mitigation annotations

Request:

Request using vesctl:

vesctl request rpc infraprotect.CustomEventAPI.ListEventMitigations -i request.yaml --uri /public/namespaces/system/infraprotect/event/54321/mitigation_annotations --http-method GET

where file request.yaml has following contents:

namespace: system

vesctl yaml response:

mitigations:
- annotation: annotation text
  creator: user1
  id: "123"
  time: "2022-01-12T14:48:47.935200Z"

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/event/54321/mitigation_annotations?event_id=&namespace=system'

curl response:

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

{
  "mitigations": [
    {
      "id": "123",
      "creator": "user1",
      "annotation": "annotation text",
      "time": "2022-01-12T14:48:47.935200Z"
    }
  ]
}