Instant query
Evaluate a PromQL expression at a single point in time.
The result can be a vector (set of instant samples), a scalar, a string, or even a matrix depending on the expression type. The resultType field in the response indicates the shape of the result array.
If time is omitted the server uses the current server time. Also accepts POST with a application/x-www-form-urlencoded body containing the same parameters.
Query parameters
PromQL expression to evaluate. This can be any valid PromQL expression including selectors (up{job="node"}), functions (rate(http_requests_total[5m])), aggregations (sum by (job) (up)), or arithmetic.
Evaluation timestamp — the point in time at which the expression is evaluated. Accepts RFC 3339 (e.g. 2024-01-20T00:00:00Z) or Unix seconds with optional decimal precision (e.g. 1705708800 or 1705708800.123). Defaults to current server time when omitted.
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.
Response
Successful query result. The data.resultType field indicates the shape of data.result:
- vector: array of { metric, value } objects (most common for instant queries)
- scalar: a single [timestamp, "value"] pair
- matrix: array of { metric, values } objects
- string: a single [timestamp, "string"] pair