ves-io-schema-graph-infraprotect-CustomAPI-SourceTrafficQuery

Examples of performing infraprotect CustomAPI SourceTrafficQuery

Usecase:

Get data for Source of traffic

Request:

Request using vesctl:

vesctl request rpc infraprotect.CustomAPI.SourceTrafficQuery -i request.yaml --uri /public/namespaces/system/graph/infraprotect/sourcetraffic --http-method POST

where file request.yaml has following contents:

          endTime: "1580407200"
namespace: system
startTime: "1580403600"

        

vesctl yaml response:

          data:
- name: -Private Use AS-,ZZ (65020)
  values:
  - timestamp: 1591545000000
    value: "38989760.000000"
  - timestamp: 1591545600000
    value: "47784586.666667"
  - timestamp: 1591546200000
    value: "52891040.000000"
- name: AMAZON-02,US (16509)
  values:
  - timestamp: 1591545000000
    value: "17240373.333333"
  - timestamp: 1591545600000
    value: "19382880.000000"
  - timestamp: 1591546200000
    value: "18891733.333333"
- name: VFM-AS Vodafone Malta Ltd AS,MT (33874)
  values: []

        

Request using curl:

          curl -X 'POST' -d '{"namespace":"system","start_time":"1580403600","end_time":"1580407200"}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build2604632300_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/infraprotect/namespaces/system/graph/infraprotect/sourcetraffic'
        

curl response:

          HTTP/1.1 200 OK
Content-Length: 1035
Content-Type: application/json
Date: Fri, 03 Nov 2023 15:25:17 GMT
Vary: Accept-Encoding

{
  "data": [
    {
      "name": "-Private Use AS-,ZZ (65020)",
      "values": [
        {
          "timestamp": 1591545000000,
          "value": "38989760.000000",
          "trend_value": null
        },
        {
          "timestamp": 1591545600000,
          "value": "47784586.666667",
          "trend_value": null
        },
        {
          "timestamp": 1591546200000,
          "value": "52891040.000000",
          "trend_value": null
        }
      ]
    },
    {
      "name": "AMAZON-02,US (16509)",
      "values": [
        {
          "timestamp": 1591545000000,
          "value": "17240373.333333",
          "trend_value": null
        },
        {
          "timestamp": 1591545600000,
          "value": "19382880.000000",
          "trend_value": null
        },
        {
          "timestamp": 1591546200000,
          "value": "18891733.333333",
          "trend_value": null
        }
      ]
    },
    {
      "name": "VFM-AS Vodafone Malta Ltd AS,MT (33874)",
      "values": [
      ]
    }
  ]
}