ves-io-schema-infraprotect-CustomEventAPI-ListEventAttachments

Examples of performing infraprotect CustomEventAPI ListEventAttachments

Usecase:

List event attachments

Request:

Request using vesctl:

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

where file request.yaml has following contents:

namespace: system

vesctl yaml response:

attachments:
- attachmentId: "123"
  endTime: "2022-01-12T15:48:47.608312300Z"
  gosName: file1
  name: pcap.txt
  sizeBytes: "123"
  startTime: "2022-01-12T14:48:47.608298900Z"

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

curl response:

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

{
  "attachments": [
    {
      "attachment_id": "123",
      "size_bytes": "123",
      "name": "pcap.txt",
      "start_time": "2022-01-12T14:48:47.608298900Z",
      "end_time": "2022-01-12T15:48:47.608312300Z",
      "gos_name": "file1"
    }
  ]
}