​
Select Service
ves-io-schema-flow-CustomAPI-FlowCollection
Published April 5, 2023 | Last modified October 28, 2026
Examples of performing flow CustomAPI FlowCollection
Usecase:
Flow Collection
Request:
Request using vesctl:
vesctl request rpc flow.CustomAPI.FlowCollection -i request.yaml --uri /public/namespaces/system/flows/flow_collection --http-method POST
where file request.yaml has following contents:
endTime: "1593622800"fieldSelector:- BYTESfilter: '{SITE="site-1"}'groupBy:- SITE- SRC_IPstartTime: "1593619200"vesctl yaml response:
data:- data: - labels: SITE: site-1 SRC_IP: 73.83.237.45 value: - timestamp: 1593622800 value: "1024" - labels: SITE: site-2 SRC_IP: 73.83.237.45 value: - timestamp: 1593622800 value: "1024"Request using curl:
curl -X 'POST' -d '{"filter":"{SITE=\"site-1\"}","group_by":["SITE","SRC_IP"],"field_selector":["BYTES"],"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-build3348201650_b001_apidocs.test/host=MTY6VVHQPH/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/data/namespaces/system/flows/flow_collection'curl response:
HTTP/1.1 200 OKContent-Length: 688Content-Type: application/jsonDate: Mon, 28 Sep 2026 04:25:15 GMTVary: Accept-Encoding
{ "data": [ { "type": "BYTES", "data": [ { "labels": { "SITE": "site-1", "SRC_IP": "73.83.237.45" }, "value": [ { "timestamp": 1593622800, "value": "1024", "trend_value": null } ] }, { "labels": { "SITE": "site-2", "SRC_IP": "73.83.237.45" }, "value": [ { "timestamp": 1593622800, "value": "1024", "trend_value": null } ] } ], "unit": "UNIT_MILLISECONDS" } ]}