- Home
- API Enriched
- Sites
- data
- Site Graph Query.
Site Graph Query.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/data/namespaces/example/graph/site';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"end_time":"example","field_selector":{"edge":{"healthscore":{"types":["HEALTHSCORE_NONE"]},"metric":{"features":["TIMESERIES_FEATURE_NONE"],"types":["METRIC_TYPE_NONE"]}},"node":{"healthscore":{"types":["HEALTHSCORE_NONE"]},"metric":{"downstream":["METRIC_TYPE_NONE"],"features":["TIMESERIES_FEATURE_NONE"],"upstream":["METRIC_TYPE_NONE"]}}},"group_by":["NONE"],"label_filter":[{"label":"LABEL_NONE","op":"NOP","value":"example"}],"namespace":"example","range":"example","start_time":"example","step":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/data/namespaces/example/graph/site \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "end_time": "example", "field_selector": { "edge": { "healthscore": { "types": [ "HEALTHSCORE_NONE" ] }, "metric": { "features": [ "TIMESERIES_FEATURE_NONE" ], "types": [ "METRIC_TYPE_NONE" ] } }, "node": { "healthscore": { "types": [ "HEALTHSCORE_NONE" ] }, "metric": { "downstream": [ "METRIC_TYPE_NONE" ], "features": [ "TIMESERIES_FEATURE_NONE" ], "upstream": [ "METRIC_TYPE_NONE" ] } } }, "group_by": [ "NONE" ], "label_filter": [ { "label": "LABEL_NONE", "op": "NOP", "value": "example" } ], "namespace": "example", "range": "example", "start_time": "example", "step": "example" }'Request to GET inter-site traffic graph for an application.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Namespace namespace is used to scope the application traffic to a given namespace. For system namespace, application traffic across all namespaces for the tenant will be considered.
Request Bodyrequired
Section titled “Request Bodyrequired”Graph/site API is used to GET intra-site and inter-site graph for application traffic.
object
End time of metric collection from which data will be considered to build graph. Format: unix_timestamp|RFC 3339
Optional: If not specified, then the end_time will be evaluated to start_time+10m
If start_time is not specified, then the end_time will be evaluated to
object
object
object
Healthscore types to be returned in the response.
object
Specify list of timeseries features that should be returned for each metric type in the request.
Specify list of metrics that should be returned for each edge in the connectivity graph.
object
object
Healthscore types to be returned in the response.
object
Downstream refers to the service that sends requests and receives response.
Specify list of timeseries features that should be returned for each metric type in the request.
Upstream refers to the service that receives requests and sends response.
Aggregate data by site. Optional: If not specified, then the data is aggregated/grouped by site.
List of label filter expressions of the form “label key” QueryOp “value”. Response will only contain data that matches all the conditions specified in the label_filter.
Optional: If not specified, application traffic for all sites will be returned in the response.
Metrics used to render the site graph are tagged with labels listed in the enum Label. Label Filter is used to filter the timeseries that match the specified label key/value and the operator.
object
Value of the label.
Namespace is used to scope the application traffic to a given namespace. For system namespace, application traffic across all namespaces for the tenant will be considered.
Range decides how far to go back in time to fetch values for each step. For example, if the range is 5m, then for step t1, query will be evaluated for t1-5m and for t2, query will be evaluated for t2-5m and so on. Format: [0-9][smhd], where s - seconds, m - minutes, h - hours, d - days
Note: For non-timeseries query, i.e., for step=end_time-start_time, range should be set to end_time-start_time
Optional: If not specified, range is set to 5m.
Start time of metric collection from which data will be considered to build graph. Format: unix_timestamp|RFC 3339
Optional: If not specified, then the start_time will be evaluated to end_time-10m
If end_time is not specified, then the start_time will be evaluated to
Step is the resolution width, which determines the number of the data points [x-axis (time)] to be returned in the response. The timestamps in the response will be t1=start_time, t2=t1+step, … Tn=tn-1+step, where tn <= end_time. Format: [0-9][smhd], where s - seconds, m - minutes, h - hours, d - days
Optional: If not specified, then step size is evaluated to <end_time - start_time>
Responses
Section titled “Responses”A successful response.
Response for graph/site API contains list of nodes and edges. Each node contains application traffic flowing from/to site. Each edge contains application traffic flowing from src site to dst site.
object
object
List of edges in the site graph. Each edge contains the application traffic flowing from/to the source site and the destination site.
EdgeData wraps all the response data for an edge in the site graph response.
object
object
object
List of healthscores specified in the request.
HealthScoreTypeData contains healthscore type and the corresponding value.
object
A human readable string explaining the reason in case of bad healthscore.
Healthscore value.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
object
List of metric specified in the request for an edge.
MetricData contains the metric type and the corresponding metric value(s)
object
object
Number of anomalies for the given time range.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
Lower Bound of the metric value.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
Upper Bound of the metric value.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
Healscore of the metric calculated based on the number of anomalies and the value of the anomalies for the time range.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
List of metric values for a given metric type.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
Indicates the metric trend.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
object
Name of the site.
object
Name of the site.
List of nodes in the site graph. Each node contains the application traffic flowing from/to the site.
NodeData wraps all the response data for a node in the site graph response.
object
object
object
List of healthscores specified in the request.
HealthScoreTypeData contains healthscore type and the corresponding value.
object
A human readable string explaining the reason in case of bad healthscore.
Healthscore value.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
object
Metric data for the source site/service.
MetricData contains the metric type and the corresponding metric value(s)
object
object
Number of anomalies for the given time range.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
Lower Bound of the metric value.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
Upper Bound of the metric value.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
Healscore of the metric calculated based on the number of anomalies and the value of the anomalies for the time range.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
List of metric values for a given metric type.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
Indicates the metric trend.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
Metric data for the destination site/service.
MetricData contains the metric type and the corresponding metric value(s)
object
object
Number of anomalies for the given time range.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
Lower Bound of the metric value.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
Upper Bound of the metric value.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
Healscore of the metric calculated based on the number of anomalies and the value of the anomalies for the time range.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
List of metric values for a given metric type.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
Indicates the metric trend.
Each metric value consists of a timestamp and a value. Timestamp in the Metric Value is based on the start_time, end_time and step in the request. Valid values for timestamp are t1=start_time, t2=t1+step, t3=t2+step, … Tn=tn-1+step, where tn <= end_time. Response may not contain values for all timestamps between start_time and end_time.
object
UTC timestamp in seconds.
object
X-displayName: “Description” description of the method used to calculate trend.
X-displayName: “Previous Value”
X-displayName: “Value”
Metric value.
object
Name of the site.
Actual step size used in the response. It could be higher than the requested step due to metric rollups and the query duration. Format: [0-9][smhd], where s - seconds, m - minutes, h - hours, d - days.
Example
{ "data": { "edges": [ { "data": { "healthscore": { "data": [ { "type": "HEALTHSCORE_NONE", "value": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ] } ] }, "metric": { "data": [ { "type": "METRIC_TYPE_NONE", "unit": "UNIT_MILLISECONDS", "value": { "anomaly": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ], "confidence_lower_bound": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ], "confidence_upper_bound": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ], "healthscore": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ], "raw": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ], "trend": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ] } } ] } } } ], "nodes": [ { "data": { "healthscore": { "data": [ { "type": "HEALTHSCORE_NONE", "value": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ] } ] }, "metric": { "downstream": [ { "type": "METRIC_TYPE_NONE", "unit": "UNIT_MILLISECONDS", "value": { "anomaly": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ], "confidence_lower_bound": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ], "confidence_upper_bound": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ], "healthscore": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ], "raw": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ], "trend": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ] } } ], "upstream": [ { "type": "METRIC_TYPE_NONE", "unit": "UNIT_MILLISECONDS", "value": { "anomaly": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ], "confidence_lower_bound": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ], "confidence_upper_bound": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ], "healthscore": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ], "raw": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ], "trend": [ { "trend_value": { "sentiment": "TREND_SENTIMENT_NONE" } } ] } } ] } } } ] }}Returned when operation is not authorized.
Examplegenerated
exampleReturned when there is no permission to access resource.
Examplegenerated
exampleReturned when resource is not found.
Examplegenerated
exampleReturned when operation on resource is conflicting with current value.
Examplegenerated
exampleReturned when operation has been rejected as it is happening too frequently.
Examplegenerated
exampleReturned when server encountered an error in processing API.
Examplegenerated
exampleReturned when service is unavailable temporarily.
Examplegenerated
exampleReturned when server timed out processing request.
Examplegenerated
example