---
title: "Wait for query jobs to complete"
method: GET
path: "/api/v1/query/wait"
tags: ["Query"]
---

# Wait for query jobs to complete

`GET /api/v1/query/wait`

Waits for previously submitted query jobs and streams results as they complete. The response is a stream of newline-delimited JSON (`Content-Type: text/ndjson`): one line per job (same shape as the job lines from query/run, including the base64-encoded Arrow IPC `result`), then a footer. Unlike query/run, there is no `jobs_submitted` header line. If the footer's `remaining_job_ids` is non-empty, call this endpoint again with those IDs until it is empty.

## Query parameters

- `jobIds` string, required — Comma-separated list of job IDs to wait for. Obtained from the query/run response.

## Response `200`

Query results for completed jobs, as a text/ndjson stream — one JSON object per line, each matching QueryWaitStreamLine; it cannot be parsed as a single JSON document.

## Other responses

- `400` — Invalid or missing jobIds parameter
- `401` — Authentication required
- `404` — Job ID not found
- `500` — Error fetching query results

---

[API](https://skmtc.net/omniapp/apis/omni-api.md) · [All operations](https://skmtc.net/omniapp/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omniapp/omni-api/versions/de7cac8b5983/schema)
