ves-io-schema-infraprotect-CustomAlertAPI-AddAlertToEvent

Examples of performing infraprotect CustomAlertAPI AddAlertToEvent

Usecase:

Adds alert to event (link them together)

Request:

Request using vesctl:

vesctl request rpc infraprotect.CustomAlertAPI.AddAlertToEvent -i request.yaml --uri /public/namespaces/system/infraprotect/alert/12345/to_event --http-method PUT

where file request.yaml has following contents:

alertId: "12345"
eventId: "54321"
namespace: system

vesctl yaml response:

{}

Request using curl:

curl -X 'PUT' -d '{"namespace":"system","alertId":"12345","eventId":"54321"}' -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/alert/12345/to_event'

curl response:

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

{

}