Evaluates an expression query over a range of time
GET/v1/metrics/prometheus/api/v1/query_range
Retrieve data over a specified time range by submitting a GET request with query parameters. Please ensure to change the region in the URL to match your account's region.
Request
Query Parameters
query stringrequired
Prometheus expression query string.
start stringrequired
Start timestamp, inclusive, as an RFC3339 or Unix timestamp.
end stringrequired
End timestamp, inclusive, as an RFC3339 or Unix timestamp.
step stringrequired
Query resolution step width in seconds.
timeout string
Evaluation timeout. Optional, defaults to the value of the -query.timeout flag.
Responses
- 200
- 400
- 500
Range query results in a defined format.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
status string
Status of the query (e.g., success, fail).
data object
resultType string
Possible values: [matrix
]
Type of the result.
result object[]
metric objectrequired
Labels identifying the metric.
property name* string
values array[]required
Possible values: >= 2
, <= 2
A list of [timestamp, value] pairs returned by the query.
{
"status": "string",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {},
"values": [
[
"string"
]
]
}
]
}
}
Invalid request parameters.
Internal server error.
Loading...