ves-io-schema-graph-infraprotect-CustomAPI-ProtocolRepartitionQuery

Examples of performing graph_infraprotect CustomAPI ProtocolRepartitionQuery

Usecase:

Get data for protocol repartition

Request:

Request using vesctl:

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

where file request.yaml has following contents:

namespace: system

vesctl yaml response:

data:
- name: https
  values:
  - timestamp: 1591545000000
    value: "95179898.380000"
  - timestamp: 1591545600000
    value: "62261081.575556"
  - timestamp: 1591546200000
    value: "54906793.155556"
- name: ESP
  values:
  - timestamp: 1591545000000
    value: "15154566.842222"
  - timestamp: 1591545600000
    value: "17548093.977778"
  - timestamp: 1591546200000
    value: "17445504.755556"
- name: mysql
  values: []
- name: blp4
  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/protocolrepartition'

curl response:

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

{
  "data": [
    {
      "name": "https",
      "values": [
        {
          "timestamp": 1591545000000,
          "value": "95179898.380000"
        },
        {
          "timestamp": 1591545600000,
          "value": "62261081.575556"
        },
        {
          "timestamp": 1591546200000,
          "value": "54906793.155556"
        }
      ]
    },
    {
      "name": "ESP",
      "values": [
        {
          "timestamp": 1591545000000,
          "value": "15154566.842222"
        },
        {
          "timestamp": 1591545600000,
          "value": "17548093.977778"
        },
        {
          "timestamp": 1591546200000,
          "value": "17445504.755556"
        }
      ]
    },
    {
      "name": "mysql",
      "values": [
      ]
    },
    {
      "name": "blp4",
      "values": [
      ]
    }
  ]
}