ves-io-schema-graph-l3l4-CustomAPI-TopTalkers

Examples of performing graph_l3l4 CustomAPI TopTalkers

Usecase:

Get data for traffic summary

Request:

Request using vesctl:

vesctl request rpc graph_l3l4.CustomAPI.TopTalkers -i request.yaml --uri /public/namespaces/system/graph/l3l4/top_talkers/123 --http-method POST

where file request.yaml has following contents:

endTime: "2020-01-30T18:00:00Z"
namespace: system
startTime: "2020-01-30T17:00:00Z"

vesctl yaml response:

data:
- in: "1200"
  ip: 192.168.0.1
  out: "450000"
- in: "200"
  ip: 192.168.0.2
- ip: 192.168.0.3
  out: "50000"
trafficUnit: TrafficUnitBps

Request using curl:

curl -X 'POST' -d '{"namespace":"system","start_time":"2020-01-30T17:00:00Z","end_time":"2020-01-30T18:00:00Z"}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build243329498_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/infraprotect/namespaces/system/graph/l3l4/top_talkers/123'

curl response:

HTTP/1.1 200 OK
Content-Length: 290
Content-Type: application/json
Date: Fri, 23 Sep 2022 13:12:22 GMT
Vary: Accept-Encoding

{
  "traffic_unit": "TrafficUnitBps",
  "data": [
    {
      "ip": "192.168.0.1",
      "in": "1200",
      "out": "450000"
    },
    {
      "ip": "192.168.0.2",
      "in": "200",
      "out": "0"
    },
    {
      "ip": "192.168.0.3",
      "in": "0",
      "out": "50000"
    }
  ]
}