Evaluate a PromQL expression over a range of time, returning a matrix of time series with regularly spaced samples.
The expression is evaluated at each step interval between start
and end (both inclusive). The result is always a matrix
(resultType: "matrix"), where each series contains an array of
[timestamp, value] pairs spaced by step.
Also accepts POST with a application/x-www-form-urlencoded body
containing the same parameters.
PromQL expression to evaluate at each step. Typically a
rate or aggregation function (e.g. rate(http_requests_total[5m])),
but any valid PromQL expression is accepted.
Start timestamp (inclusive) of the evaluation range. Accepts
RFC 3339 (e.g. 2024-01-20T00:00:00Z) or Unix seconds with
optional decimal precision (e.g. 1705708800).
End timestamp (inclusive) of the evaluation range. Accepts
RFC 3339 or Unix seconds. Must be greater than or equal to
start.
Query resolution step width — the interval between consecutive
evaluation points. Can be a duration string (e.g. 15s, 1m)
or a float number of seconds (e.g. 15, 60.0). Smaller steps
produce more data points but increase query cost.
Evaluation timeout. If the query does not complete within this
duration, it is aborted and a 503 error is returned. Duration
string such as 30s, 1m, or 2h. The server may cap this
value with its own configured maximum.
Range query result. Always returns resultType: "matrix" with
an array of time series, each containing regularly spaced
[timestamp, value] pairs. Series are sorted by their metric
label set.
Response envelope for a range query (/api/v1/query_range). On
success, data always contains a matrix result. On error, error
and errorType describe the failure.
success, error Result payload for a range query. The resultType is always
"matrix". Each element in result is a time series containing
regularly spaced samples between the requested start and end.
Human-readable error message (present when status is error).
Error category (present when status is error):
bad_data, internal, or unavailable.
Non-fatal warnings from the query engine. May be present even
when status is success.