​
Select Service
ves-io-schema-views-forward_proxy_policy-CustomDataAPI-ForwardProxyPolicyHits
Published April 5, 2023 | Last modified September 19, 2025
Examples of performing forward_proxy_policy CustomDataAPI ForwardProxyPolicyHits
Usecase:
Get Forward Proxy Policy hits
Request:
Request using vesctl:
vesctl request rpc forward_proxy_policy.CustomDataAPI.ForwardProxyPolicyHits -i request.yaml --uri /public/namespaces/system/forward_proxy_policy/hits --http-method POST
where file request.yaml has following contents:
endTime: "1593622800"
groupBy:
- POLICY_RULE
- SITE
labelFilter:
- label: POLICY
  value: forward-proxy-1
namespace: system
startTime: "1593619200"
Copied!
vesctl yaml response:
data:
- id:
    policyRule: rule-1
    site: site-1
  metric:
  - timestamp: 1593622800
    value: "100"
- id:
    policyRule: rule-1
    site: site-2
  metric:
  - timestamp: 1593622800
    value: "50"
Copied!
Request using curl:
curl -X 'POST' -d '{"namespace":"system","label_filter":[{"label":"POLICY","value":"forward-proxy-1"}],"group_by":["POLICY_RULE","SITE"],"start_time":"1593619200","end_time":"1593622800"}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_q2_3kp8z3zs0x5_m7pk1bgb0_ph0000gp_T_go-build2850427035_b001_apidocs.test/host=MTY6VVHQPH/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/data/namespaces/system/forward_proxy_policy/hits'
Copied!
curl response:
HTTP/1.1 200 OK
Content-Length: 687
Content-Type: application/json
Date: Fri, 19 Sep 2025 02:03:20 GMT
Vary: Accept-Encoding
{
  "data": [
    {
      "id": {
        "namespace": "",
        "policy": "",
        "policy_rule": "rule-1",
        "action": "",
        "site": "site-1",
        "virtual_host": ""
      },
      "metric": [
        {
          "timestamp": 1593622800,
          "value": "100",
          "trend_value": null
        }
      ]
    },
    {
      "id": {
        "namespace": "",
        "policy": "",
        "policy_rule": "rule-1",
        "action": "",
        "site": "site-2",
        "virtual_host": ""
      },
      "metric": [
        {
          "timestamp": 1593622800,
          "value": "50",
          "trend_value": null
        }
      ]
    }
  ],
  "step": ""
}
Copied!