ves-io-schema-infraprotect-CustomReportAPI-ListReports

Examples of performing infraprotect CustomReportAPI ListReports

Usecase:

List all reports

Request:

Request using vesctl:

vesctl request rpc infraprotect.CustomReportAPI.ListReports -i request.yaml --uri /public/namespaces/system/infraprotect/reports --http-method POST

where file request.yaml has following contents:

namespace: system

vesctl yaml response:

reports:
- createdAt: "2022-01-12T14:48:52.153645300Z"
  id: "123"
  name: ddos_1_report_1
  type: ddos_daily_report

Request using curl:

curl -X 'POST' -d '{"namespace":"system"}' -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/reports'

curl response:

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

{
  "reports": [
    {
      "id": "123",
      "name": "ddos_1_report_1",
      "type": "ddos_daily_report",
      "created_at": "2022-01-12T14:48:52.153645300Z"
    }
  ]
}