​
Select Service
ves-io-schema-graph-site-CustomAPI-Query
Published April 5, 2023 | Last modified October 28, 2026
Examples of performing site CustomAPI Query
Usecase:
Site Graph
Request:
Request using vesctl:
vesctl request rpc site.CustomAPI.Query -i request.yaml --uri /public/namespaces/ns1/graph/site --http-method POST
where file request.yaml has following contents:
endTime: "1580407200"fieldSelector: edge: metric: types: - HTTP_REQUEST_RATE - HTTP_ERROR_RATE - TCP_CONNECTION_RATE - TCP_ERROR_RATE node: metric: downstream: - HTTP_REQUEST_RATE - HTTP_ERROR_RATE - TCP_CONNECTION_RATE - TCP_ERROR_RATE upstream: - HTTP_REQUEST_RATE - HTTP_ERROR_RATE - TCP_CONNECTION_RATE - TCP_ERROR_RATEstartTime: "1580403600"vesctl yaml response:
data: edges: - data: metric: data: - type: HTTP_REQUEST_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "50" trend: [] - type: HTTP_ERROR_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "0" trend: [] - type: TCP_CONNECTION_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "5" trend: [] - type: TCP_ERROR_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "0" trend: [] dstId: site: site1 srcId: site: site1 - data: metric: data: - type: HTTP_REQUEST_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "5" trend: [] - type: HTTP_ERROR_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "0" trend: [] - type: TCP_CONNECTION_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "10" trend: [] - type: TCP_ERROR_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "1" trend: [] dstId: site: site2 srcId: site: site2 - data: metric: data: - type: HTTP_REQUEST_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "50" trend: [] - type: HTTP_ERROR_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "1" trend: [] - type: TCP_CONNECTION_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "5" trend: [] - type: TCP_ERROR_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "1" trend: [] dstId: site: site1 srcId: site: site2 nodes: - data: healthscore: data: [] metric: downstream: - type: HTTP_REQUEST_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "50" trend: [] - type: HTTP_ERROR_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "0" trend: [] - type: TCP_CONNECTION_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "5" trend: [] - type: TCP_ERROR_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "0" trend: [] upstream: - type: HTTP_REQUEST_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "100" trend: [] - type: HTTP_ERROR_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "1" trend: [] - type: TCP_CONNECTION_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "10" trend: [] - type: TCP_ERROR_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "1" trend: [] id: site: site1 - data: healthscore: data: [] metric: downstream: - type: HTTP_REQUEST_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "55" trend: [] - type: HTTP_ERROR_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "1" trend: [] - type: TCP_CONNECTION_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "15" trend: [] - type: TCP_ERROR_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "2" trend: [] upstream: - type: HTTP_REQUEST_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "5" trend: [] - type: HTTP_ERROR_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "0" trend: [] - type: TCP_CONNECTION_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "10" trend: [] - type: TCP_ERROR_RATE value: anomaly: [] confidenceLowerBound: [] confidenceUpperBound: [] healthscore: [] raw: - timestamp: 1580407200 value: "1" trend: [] id: site: site2Request using curl:
curl -X 'POST' -d '{"field_selector":{"node":{"metric":{"upstream":["HTTP_REQUEST_RATE","HTTP_ERROR_RATE","TCP_CONNECTION_RATE","TCP_ERROR_RATE"],"downstream":["HTTP_REQUEST_RATE","HTTP_ERROR_RATE","TCP_CONNECTION_RATE","TCP_ERROR_RATE"]}},"edge":{"metric":{"types":["HTTP_REQUEST_RATE","HTTP_ERROR_RATE","TCP_CONNECTION_RATE","TCP_ERROR_RATE"]}}},"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/ns1/graph/site'curl response:
HTTP/1.1 200 OKContent-Type: application/jsonDate: Mon, 28 Sep 2026 04:25:24 GMTVary: Accept-Encoding
{ "data": { "nodes": [ { "id": { "site": "site1" }, "data": { "metric": { "upstream": [ { "type": "HTTP_REQUEST_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "100", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "HTTP_ERROR_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "1", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "TCP_CONNECTION_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "10", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "TCP_ERROR_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "1", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" } ], "downstream": [ { "type": "HTTP_REQUEST_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "50", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "HTTP_ERROR_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "0", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "TCP_CONNECTION_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "5", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "TCP_ERROR_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "0", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" } ] }, "healthscore": { "data": [ ] } } }, { "id": { "site": "site2" }, "data": { "metric": { "upstream": [ { "type": "HTTP_REQUEST_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "5", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "HTTP_ERROR_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "0", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "TCP_CONNECTION_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "10", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "TCP_ERROR_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "1", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" } ], "downstream": [ { "type": "HTTP_REQUEST_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "55", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "HTTP_ERROR_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "1", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "TCP_CONNECTION_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "15", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "TCP_ERROR_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "2", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" } ] }, "healthscore": { "data": [ ] } } } ], "edges": [ { "src_id": { "site": "site1" }, "dst_id": { "site": "site1" }, "data": { "metric": { "data": [ { "type": "HTTP_REQUEST_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "50", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "HTTP_ERROR_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "0", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "TCP_CONNECTION_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "5", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "TCP_ERROR_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "0", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" } ] }, "healthscore": null } }, { "src_id": { "site": "site2" }, "dst_id": { "site": "site2" }, "data": { "metric": { "data": [ { "type": "HTTP_REQUEST_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "5", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "HTTP_ERROR_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "0", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "TCP_CONNECTION_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "10", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "TCP_ERROR_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "1", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" } ] }, "healthscore": null } }, { "src_id": { "site": "site2" }, "dst_id": { "site": "site1" }, "data": { "metric": { "data": [ { "type": "HTTP_REQUEST_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "50", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "HTTP_ERROR_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "1", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "TCP_CONNECTION_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "5", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" }, { "type": "TCP_ERROR_RATE", "value": { "raw": [ { "timestamp": 1580407200, "value": "1", "trend_value": null } ], "confidence_upper_bound": [ ], "confidence_lower_bound": [ ], "anomaly": [ ], "trend": [ ], "healthscore": [ ] }, "unit": "UNIT_MILLISECONDS" } ] }, "healthscore": null } } ] }, "step": ""}