ves-io-schema-app_firewall-CustomDataAPI-Metrics

Examples of performing app_firewall CustomDataAPI Metrics

Usecase:

Perform Metrics on app_firewall

Request:

Request using vesctl:

vesctl request rpc app_firewall.CustomDataAPI.Metrics -i request.yaml --uri /public/namespaces/namespace-literal/app_firewall/metrics --http-method POST

where file request.yaml has following contents:

{}

vesctl yaml response:

data:
- data:
  - key:
      BOT_CLASSIFICATION: benign
    value:
    - timestamp: 1.547429640611e+09
      value: "1024"

Request using curl:

curl -X 'POST' -d '{}' -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/data/namespaces/namespace-literal/app_firewall/metrics'

curl response:

HTTP/1.1 200 OK
Content-Length: 315
Content-Type: application/json
Date: Wed, 12 Jan 2022 14:47:46 GMT
Vary: Accept-Encoding

{
  "data": [
    {
      "type": "BOT_DETECTION",
      "data": [
        {
          "key": {
            "BOT_CLASSIFICATION": "benign"
          },
          "value": [
            {
              "timestamp": 1547429640.611,
              "value": "1024"
            }
          ]
        }
      ]
    }
  ]
}