- Home
- API Enriched
- Cdn
- cdn
- GET CDN Metrics.
GET CDN Metrics.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/cdn/namespaces/example/cdn_loadbalancer/metrics';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"end_time":"example","field_selector":["REQUEST_TOTAL_SUM"],"filter":[{"operator":"OPERATOR_TYPE_IN","tag":"CDN_DISTRIBUTION_NAME","values":["example"]}],"group_by":["CDN_DISTRIBUTION_NAME"],"namespace":"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/cdn/namespaces/example/cdn_loadbalancer/metrics \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "end_time": "example", "field_selector": [ "REQUEST_TOTAL_SUM" ], "filter": [ { "operator": "OPERATOR_TYPE_IN", "tag": "CDN_DISTRIBUTION_NAME", "values": [ "example" ] } ], "group_by": [ "CDN_DISTRIBUTION_NAME" ], "namespace": "example", "start_time": "example", "step": "example" }'Initial metrics request for CDN loadbalancers.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Namespace x-required Namespace scope of the metric request.
Request Bodyrequired
Section titled “Request Bodyrequired”CDN Metrics request parameters.
object
Format: unix_timestamp|RFC 3339 Required: YES.
Fields (Metrics) selected to be queried.
Required: YES.
CDN Metrics filter OPTIONS.
CDN Metrics filter OPTIONS.
object
Filter values Required: YES.
Aggregate data by zero or more tags.
Namespace scope of the metric request Required: YES.
Format: unix_timestamp|RFC 3339 Required: YES.
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. Depending on the time range, the step has a minimum value (due to rollups).
For e.g. For ranges in last one hr, step minimum is 5m, for ranges beyond a day, its 1h etc.
Step value used is the max(
Optional: If not specified, then step size is evaluated to <end_time - start_time>
Responses
Section titled “Responses”A successful response.
CDN Metrics response message.
object
CDN Metrics response data items. Each instance has response for a field queried.
CDN Metrics response data. This is specific to a metric field.
object
CDN Metrics response series for the field in this message.
CDN Metrics response series. Each series instance has data for a combination of group-by tag values.
object
CDN Metrics group-by tag combination.
CDN Metrics group by OPTIONS.
object
Group-By tag Value.
CDN Metrics data for the series.
CDN Metrics response value.
object
Metric Timestamp in unix_timestamp.
Metric Value.
The effective step used in the response. It could be higher than the requested step due to rollups. Format: [0-9][smhd], where s - seconds, m - minutes, h - hours, d - days.
Example
{ "items": [ { "series": [ { "group_by": [ { "name": "CDN_DISTRIBUTION_NAME" } ] } ], "type": "REQUEST_TOTAL_SUM", "unit": "COUNT" } ]}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