​
Select Service
ves-io-schema-tmm_session-CustomAPI-TMMSessionMetrics
Published April 5, 2023 | Last modified October 28, 2026
Examples of performing tmm_session CustomAPI TMMSessionMetrics
Usecase:
Get all TMM session data
Request:
Request using vesctl:
vesctl request rpc tmm_session.CustomAPI.TMMSessionMetrics -i request.yaml --uri /public/namespaces/system/tmm_session/metrics --http-method POST
where file request.yaml has following contents:
endTime: "1580407200"fieldSelector:- METRIC_TYPE_ACTIVE- METRIC_TYPE_TOTALstartTime: "1580403600"vesctl yaml response:
data:- metric: - key: {} value: - timestamp: 1.547429640611e+09 value: "1024" type: METRIC_TYPE_ACTIVERequest using curl:
curl -X 'POST' -d '{"field_selector":["METRIC_TYPE_ACTIVE","METRIC_TYPE_TOTAL"],"start_time":"1580403600","end_time":"1580407200"}' -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/tmm_session/metrics'curl response:
HTTP/1.1 200 OKContent-Length: 363Content-Type: application/jsonDate: Mon, 28 Sep 2026 04:30:26 GMTVary: Accept-Encoding
{ "data": [ { "type": "METRIC_TYPE_ACTIVE", "metric": [ { "key": { }, "value": [ { "timestamp": 1547429640.611, "value": "1024", "trend_value": null } ] } ], "unit": "UNIT_MILLISECONDS" } ], "step": ""}