ves-io-schema-graph-l3l4-CustomAPI-EventCount

Examples of performing graph_l3l4 CustomAPI EventCount

Usecase:

Get data for events count

Request:

Request using vesctl:

vesctl request rpc graph_l3l4.CustomAPI.EventCount -i request.yaml --uri /public/namespaces/system/graph/l3l4/event_count/123 --http-method POST

where file request.yaml has following contents:

endTime: "2020-01-30T18:00:00Z"
namespace: system
startTime: "2020-01-30T17:00:00Z"

vesctl yaml response:

events:
- bounded: "2"
  ongoing: "3"
  timestamp: "0001-01-01T00:00:00Z"
- bounded: "3"
  ongoing: "3"
  timestamp: "0001-01-01T00:00:00Z"

Request using curl:

curl -X 'POST' -d '{"namespace":"system","startTime":"2020-01-30T17:00:00Z","endTime":"2020-01-30T18:00:00Z"}' -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/graph/l3l4/event_count/123'

curl response:

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

{
  "events": [
    {
      "timestamp": "0001-01-01T00:00:00Z",
      "bounded": "2",
      "ongoing": "3"
    },
    {
      "timestamp": "0001-01-01T00:00:00Z",
      "bounded": "3",
      "ongoing": "3"
    }
  ]
}