ves-io-schema-graph-infraprotect-CustomAPI-OutTrafficQuery

Examples of performing graph_infraprotect CustomAPI OutTrafficQuery

Usecase:

Get data for out traffic

Request:

Request using vesctl:

vesctl request rpc graph_infraprotect.CustomAPI.OutTrafficQuery -i request.yaml --uri /public/namespaces/system/graph/infraprotect/outtraffic --http-method POST

where file request.yaml has following contents:

namespace: system

vesctl yaml response:

data:
- name: Total
  values:
  - timestamp: 1591545000000
    value: "2450237971.7466664"
  - timestamp: 1591545600000
    value: "2372238506.3733335"
  - timestamp: 1591546200000
    value: "2380032746.72"

Request using curl:

curl -X 'POST' -d '{"namespace":"system"}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build743694289_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/infraprotect/namespaces/system/graph/infraprotect/outtraffic'

curl response:

HTTP/1.1 200 OK
Content-Length: 371
Content-Type: application/json
Date: Thu, 02 Jul 2020 15:53:05 GMT
Vary: Accept-Encoding

{
  "data": [
    {
      "name": "Total",
      "values": [
        {
          "timestamp": 1591545000000,
          "value": "2450237971.7466664"
        },
        {
          "timestamp": 1591545600000,
          "value": "2372238506.3733335"
        },
        {
          "timestamp": 1591546200000,
          "value": "2380032746.72"
        }
      ]
    }
  ]
}