The query endpoint
Request body
Response
The response carriescolumns, array-shaped rows, scanned_rows, and took_ms. Federated
responses may also carry federation metadata.
Send
Accept: application/x-ndjson to stream objects row-by-row, followed by a __meta__
record. Streaming bypasses the result cache.SQL
trace_id:
PromQL
Setlanguage: "promql" to run PromQL over metric streams. Both instant and range queries are
supported (range steps through [start, end] and returns a matrix). Coverage is broad — the rate
family and all *_over_time, the standard aggregations (incl. topk / limitk),
histogram_quantile, label_replace / label_join, math & trig, the and / or / unless set
operators with on / ignoring + group_left / group_right matching, selector @ / offset,
and subqueries.
PromQL support matrix
The full list of supported functions, operators, and modifiers — plus the known gaps
(native-histogram functions, the binary
default fill-in).Search around an event
To pull the N events immediately before and after a given one (log context view), usePOST /api/v1/query/search_around with event_timestamp_us, stream, stream_type, and optional
before / after counts (default 50 each).
Async, inspection, and cancellation
- Add
Prefer: respond-asynctoPOST /api/v1/query, or submit directly toPOST /api/v1/query/jobs, for a durable search job. GET /api/v1/query/jobs/{id}reports state;/resultsreturns completed output.POST /api/v1/query/inspectplans without executing and returns query metadata and the available logical plan.POST /api/v1/query/recommendationsanalyzes a query profile without executing the query.GET /api/v1/query/runningandPOST /api/v1/query/{id}/cancellet organization administrators inspect and cancel active work.
streams.query. Active-query administration requires
org.settings.read or org.settings.manage.
Federated search
Enterprise Edition can add?clusters=local,cluster-name to the query endpoint. Any non-local
target requires the federated_search entitlement. Unreachable remotes are represented as degraded
clusters in federation metadata instead of silently becoming local data.
Caching
Queries flow through a 3-level cache —file_meta, parquet_meta, and query_result — plus a
parquet disk cache enabled by default (./data/cache/parquet, 10 GB LRU). Caching is transparent
to the response contract; use server metrics to measure cache behavior.