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
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"]pairmatrix: array of{ metric, values }objectsstring: a single[timestamp, "string"]pair
Response envelope for an instant query (/api/v1/query). On success,
data contains the query result. On error, error and errorType
describe the failure.
Result payload for an instant query. The resultType indicates the
shape of result:
vector: An array of{ metric, value }objects — one per matching time series. This is the most common result type for instant queries on selectors and functions.matrix: An array of{ metric, values }objects — returned when the expression produces a range vector (e.g. using a subquery).scalar: A single[timestamp, "value"]pair — returned for pure numeric expressions like1 + 1.string: A single[timestamp, "string"]pair — returned for string literals.