Query a metric time series
Returns a time series of aggregated metric values for the named metric within the requested time range, together with the metric's descriptor.
Path parameters
The name of the metric to query (see /v2/metrics for the catalog).
Query parameters
Dimension filters keyed by dimension name, for example dimensions[agent_keys]=support-bot. Each metric's descriptor at /v2/metrics lists its dimension names. A dimension with several values matches any of them, and the series merges the matched values.
Deprecated alias for dimensions; identical semantics. Use dimensions. Ignored when dimensions is supplied.
The inclusive start of the query window (ISO 8601). For a system metric, no more than 30 days before now. A window is at most 30 days long. Points older than the metric's retention window are omitted; the first point keeps its bin_start, so when start is older than the retained data that point covers only the retained portion of its bin.
The exclusive end of the query window (ISO 8601). Must be after start and no more than 30 days after it.
The upper bound on the number of points in the response. The response may contain fewer points than requested but never more. The response reports the actual time-bin size as bin_size_seconds. When max_bins is 1, the response has one point covering the requested window, with start rounded down and end rounded up to the nearest five-minute boundary; bin_size_seconds is the width of that rounded window. Defaults to 60.
Headers
The platform makes a best effort to complete the request in the specified seconds, or it times out.
The platform makes a best effort to complete the request in the specified milliseconds, or it times out.
Response
The requested metric series.
Example response
{
"metric": {
"name": "agent.trace.duration_ms",
"category": "agent",
"unit": "ms",
"display_name": "Agent turn duration percentiles",
"dimensions": [
"agent_keys"
],
"origin": "system",
"type": "counter"
},
"type": "counter"
}Changes
Changed in 2 of the 13 revisions of this API.16
- ○
added the media type
application/jsonfor the response with the statusresponse-media-type-added
- ○
added the non-success response with the status
response-non-success-status-added
- ○
- ○
added the new optional
queryrequest parameterdimensionsnew-optional-request-parameter
- ○
queryrequest parameterlabelswas deprecatedrequest-parameter-deprecated
- ○
response property
oneOf[CounterMetricSeries]/allOf[MetricSeriesBase]/labelsdeprecatedresponse-property-deprecated
- ○
response property
oneOf[DistributionMetricSeries]/allOf[MetricSeriesBase]/labelsdeprecatedresponse-property-deprecated
- ○
response property
oneOf[GaugeMetricSeries]/allOf[MetricSeriesBase]/labelsdeprecatedresponse-property-deprecated
- ○
response property
oneOf[PercentilesMetricSeries]/allOf[MetricSeriesBase]/labelsdeprecatedresponse-property-deprecated
- ○
added the required property
////////to the response with the statusresponse-required-property-added
- ○
added the required property
////////to the response with the statusresponse-required-property-added
- ○
added the required property
////////to the response with the statusresponse-required-property-added
- ○
added the required property
////////to the response with the statusresponse-required-property-added
- ○
added the required property
////////to the response with the statusresponse-required-property-added
- ○
added the required property
////////to the response with the statusresponse-required-property-added
- ○
added the required property
////////to the response with the statusresponse-required-property-added
- ○
added the required property
////////to the response with the statusresponse-required-property-added
This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○