ves-io-schema-fast_acl-CustomDataAPI-FastACLHits

Examples of performing fast_acl CustomDataAPI FastACLHits

Usecase:

Get Fast ACL hits

Request:

Request using vesctl:

vesctl request rpc fast_acl.CustomDataAPI.FastACLHits -i request.yaml --uri /public/namespaces/system/fast_acl/hits --http-method POST

where file request.yaml has following contents:

          endTime: "1593622800"
groupBy:
- FAST_ACL_RULE
- SITE
labelFilter:
- label: FAST_ACL
  value: fast-acl-1
namespace: system
startTime: "1593619200"

        

vesctl yaml response:

          data:
- id:
    fastAclRule: rule-1
    site: site-1
  metric:
  - timestamp: 1593622800
    value: "100"
- id:
    fastAclRule: rule-1
    site: site-2
  metric:
  - timestamp: 1593622800
    value: "50"

        

Request using curl:

          curl -X 'POST' -d '{"namespace":"system","label_filter":[{"label":"FAST_ACL","value":"fast-acl-1"}],"group_by":["FAST_ACL_RULE","SITE"],"start_time":"1593619200","end_time":"1593622800"}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build3109416560_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/data/namespaces/system/fast_acl/hits'
        

curl response:

          HTTP/1.1 200 OK
Content-Length: 595
Content-Type: application/json
Date: Thu, 21 Mar 2024 14:05:20 GMT
Vary: Accept-Encoding

{
  "data": [
    {
      "id": {
        "namespace": "",
        "fast_acl": "",
        "fast_acl_rule": "rule-1",
        "site": "site-1"
      },
      "metric": [
        {
          "timestamp": 1593622800,
          "value": "100",
          "trend_value": null
        }
      ]
    },
    {
      "id": {
        "namespace": "",
        "fast_acl": "",
        "fast_acl_rule": "rule-1",
        "site": "site-2"
      },
      "metric": [
        {
          "timestamp": 1593622800,
          "value": "50",
          "trend_value": null
        }
      ]
    }
  ],
  "step": ""
}