ves-io-schema-infraprotect-CustomEventAPI-ListEventAlerts

Examples of performing infraprotect CustomEventAPI ListEventAlerts

Usecase:

List event alerts

Request:

Request using vesctl:

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

where file request.yaml has following contents:

namespace: system

vesctl yaml response:

alerts:
- bandwidth: "123456"
  endTime: "2022-01-12T15:48:47.284052400Z"
  events: []
  id: "123"
  ip: 192.168.0.1/32
  startTime: "2022-01-12T14:48:47.284039Z"
  type: DoS host alert

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

curl response:

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

{
  "alerts": [
    {
      "id": "123",
      "ip": "192.168.0.1/32",
      "start_time": "2022-01-12T14:48:47.284039Z",
      "end_time": "2022-01-12T15:48:47.284052400Z",
      "bandwidth": "123456",
      "type": "DoS host alert",
      "events": [
      ],
      "arbor_id": "",
      "creator": "",
      "network_id": ""
    }
  ]
}