Query
Execute query with NDJSON streaming
Same input as POST /query, returns NDJSON stream. For large result sets, exports, piping.
This is different from job SSE (GET /query/jobs/{id}/stream):
-
/query/stream — NDJSON export of results. One event per line. For curl | jq, data pipelines.
-
/query/jobs/{id}/stream — SSE progress tracking. For Web UI real-time updates.
-
Response: Transfer-Encoding: chunked, one JSON object per line.
-
Last line is always {"__meta": {...}} — stream summary.
-
No default limit (streaming is for export). Client disconnect = cancellation.
-
wait parameter is ignored — streaming always blocks until complete.
post/query/stream
Request body
Example request
{
"q": "source=nginx status>=500 | stats count by uri",
"from": "-1h",
"wait": 5
}Response
NDJSON event stream