ves-io-schema-graph-l3l4-CustomAPI-ByMitigation

Examples of performing graph_l3l4 CustomAPI ByMitigation

Usecase:

Get data for traffic summary

Request:

Request using vesctl:

vesctl request rpc graph_l3l4.CustomAPI.ByMitigation -i request.yaml --uri /public/namespaces/system/graph/l3l4/by_mitigation/567 --http-method POST

where file request.yaml has following contents:

endTime: "2020-01-30T18:00:00Z"
namespace: system
sort: MitigationSeriesSortMax
startTime: "2020-01-30T17:00:00Z"
topN: 5

vesctl yaml response:

rates:
- name: rates
  values:
  - timestamp: "2020-06-07T15:50:00Z"
    value: "38989760.000000"
  - timestamp: "2020-06-07T16:00:00Z"
    value: "47784586.666667"
  - timestamp: "2020-06-07T16:10:00Z"
    value: "52891040.000000"
- name: invalid_rates
  values:
  - timestamp: "2020-06-07T15:50:00Z"
    value: "38989760.000000"
  - timestamp: "2020-06-07T16:00:00Z"
    value: "47784586.666667"
  - timestamp: "2020-06-07T16:10:00Z"
    value: "52891040.000000"
- name: invalid_syn_auth
  values:
  - timestamp: "2020-06-07T15:50:00Z"
    value: "38989760.000000"
  - timestamp: "2020-06-07T16:00:00Z"
    value: "47784586.666667"
  - timestamp: "2020-06-07T16:10:00Z"
    value: "52891040.000000"

Request using curl:

curl -X 'POST' -d '{"namespace":"system","startTime":"2020-01-30T17:00:00Z","endTime":"2020-01-30T18:00:00Z","sort":"MitigationSeriesSortMax","topN":5}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build038462651_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/infraprotect/namespaces/system/graph/l3l4/by_mitigation/567'

curl response:

HTTP/1.1 200 OK
Content-Length: 1166
Content-Type: application/json
Date: Wed, 12 Jan 2022 14:48:39 GMT
Vary: Accept-Encoding

{
  "rates": [
    {
      "name": "rates",
      "values": [
        {
          "timestamp": "2020-06-07T15:50:00Z",
          "value": "38989760.000000"
        },
        {
          "timestamp": "2020-06-07T16:00:00Z",
          "value": "47784586.666667"
        },
        {
          "timestamp": "2020-06-07T16:10:00Z",
          "value": "52891040.000000"
        }
      ]
    },
    {
      "name": "invalid_rates",
      "values": [
        {
          "timestamp": "2020-06-07T15:50:00Z",
          "value": "38989760.000000"
        },
        {
          "timestamp": "2020-06-07T16:00:00Z",
          "value": "47784586.666667"
        },
        {
          "timestamp": "2020-06-07T16:10:00Z",
          "value": "52891040.000000"
        }
      ]
    },
    {
      "name": "invalid_syn_auth",
      "values": [
        {
          "timestamp": "2020-06-07T15:50:00Z",
          "value": "38989760.000000"
        },
        {
          "timestamp": "2020-06-07T16:00:00Z",
          "value": "47784586.666667"
        },
        {
          "timestamp": "2020-06-07T16:10:00Z",
          "value": "52891040.000000"
        }
      ]
    }
  ]
}