ves-io-schema-graph-infraprotect-CustomAPI-DestinationTrafficQuery

Examples of performing graph_infraprotect CustomAPI DestinationTrafficQuery

Usecase:

Get data for destination of traffic

Request:

Request using vesctl:

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

where file request.yaml has following contents:

namespace: system

vesctl yaml response:

data:
- name: -Private Use AS-,ZZ (65020)
  values:
  - timestamp: 1591545000000
    value: "149177120.000000"
  - timestamp: 1591545600000
    value: "158182773.333333"
  - timestamp: 1591546200000
    value: "160132106.666667"
- name: AMAZON-02,US (16509)
  values:
  - timestamp: 1591545000000
    value: "48682346.666667"
  - timestamp: 1591545600000
    value: "43581333.333333"
  - timestamp: 1591546200000
    value: "28729386.666667"
- name: VFM-AS Vodafone Malta Ltd AS,MT (33874)
  values: []

Request using curl:

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

curl response:

HTTP/1.1 200 OK
Content-Length: 852
Content-Type: application/json
Date: Fri, 31 Jul 2020 12:54:13 GMT
Vary: Accept-Encoding

{
  "data": [
    {
      "name": "-Private Use AS-,ZZ (65020)",
      "values": [
        {
          "timestamp": 1591545000000,
          "value": "149177120.000000"
        },
        {
          "timestamp": 1591545600000,
          "value": "158182773.333333"
        },
        {
          "timestamp": 1591546200000,
          "value": "160132106.666667"
        }
      ]
    },
    {
      "name": "AMAZON-02,US (16509)",
      "values": [
        {
          "timestamp": 1591545000000,
          "value": "48682346.666667"
        },
        {
          "timestamp": 1591545600000,
          "value": "43581333.333333"
        },
        {
          "timestamp": 1591546200000,
          "value": "28729386.666667"
        }
      ]
    },
    {
      "name": "VFM-AS Vodafone Malta Ltd AS,MT (33874)",
      "values": [
      ]
    }
  ]
}