ves-io-schema-graph-infraprotect-CustomAPI-TrafficSummaryQuery

Examples of performing graph_infraprotect CustomAPI TrafficSummaryQuery

Usecase:

Get data for traffic summary

Request:

Request using vesctl:

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

where file request.yaml has following contents:

namespace: system

vesctl yaml response:

data:
- name: AMAZON-02,US (16509) ---- MGE,FR (41728)
  values:
  - timestamp: 1591545000000
    value: "33123359.628889"
  - timestamp: 1591545600000
    value: "29410441.226667"
  - timestamp: 1591546200000
    value: "12782407.313333"
- name: -Private Use AS-,ZZ (65020) ---- MGE,FR (41728)
  values:
  - timestamp: 1591545000000
    value: "38191845.204444"
  - timestamp: 1591545600000
    value: "40943460.175556"
  - timestamp: 1591546200000
    value: "36243437.171111"
- name: MGE,FR (41728) ---- VODAFONE-IT-ASN,IT (30722)
  values: []

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/trafficsummary'

curl response:

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

{
  "data": [
    {
      "name": "AMAZON-02,US (16509) ---- MGE,FR (41728)",
      "values": [
        {
          "timestamp": 1591545000000,
          "value": "33123359.628889"
        },
        {
          "timestamp": 1591545600000,
          "value": "29410441.226667"
        },
        {
          "timestamp": 1591546200000,
          "value": "12782407.313333"
        }
      ]
    },
    {
      "name": "-Private Use AS-,ZZ (65020) ---- MGE,FR (41728)",
      "values": [
        {
          "timestamp": 1591545000000,
          "value": "38191845.204444"
        },
        {
          "timestamp": 1591545600000,
          "value": "40943460.175556"
        },
        {
          "timestamp": 1591546200000,
          "value": "36243437.171111"
        }
      ]
    },
    {
      "name": "MGE,FR (41728) ---- VODAFONE-IT-ASN,IT (30722)",
      "values": [
      ]
    }
  ]
}