Skip to main content
GET
Wait for query results

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Query Parameters

jobIds
string

Required unless the deprecated job_ids parameter is sent. A comma-separated list of job UUIDs to poll for results. These IDs are returned in the remaining_job_ids property when a request to the Run query endpoint times out.

For example, ?jobIds=a1b2c3d4-e5f6-7890-abcd-ef1234567890,b2c3d4e5-f6a7-8901-bcde-f12345678901. A value that is not a valid UUID returns a 400 error.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890,b2c3d4e5-f6a7-8901-bcde-f12345678901"

job_ids
string

Deprecated: Use jobIds instead.

Response

Query results for completed jobs, streamed as newline-delimited JSON (text/ndjson): one object per line. The response as a whole cannot be parsed as a single JSON document — parse it line by line.

The stream ends with a footer line. If the footer's remaining_job_ids is not empty, continue polling this endpoint with those IDs until the list is empty.

One line of the Wait for query results NDJSON stream — one line per completed job, then a footer line.

job_id
string
required

ID of the query job this line reports on.

status
string
required

Job status. Values include COMPLETE, ERROR, FAILED, and MISSING; new values may be added over time.

Example:

"COMPLETE"

cache_metadata
any

Cache metadata for the result, including row count, byte size, freshness timestamps, requery plan key.

client_result_id
string

Client-supplied result ID echoed back for correlating jobs to queries.

column_name_mapping
object
error
any

Structured error details, e.g. an OAuth re-authentication requirement.

error_message
string

Human-readable error message. Present on failed jobs.

Example:

"No such view \"order_items\""

error_type
string

Machine-readable error category (e.g. PLAN, SQL). Present on failed jobs.

Example:

"PLAN"

kill_reason
string

Why the job was terminiated, when it was cancelled.

query
any

The query that was executed.

requery_fallback_sql
string
requery_sql
string

SQL to re-query the cached result set, when the result supports requery.

requery_table_name
string
result
string

Result rows as a base64-encoded Arrow IPC stream. Present on completed jobs. Decode with any Arrow IPC reader and use summary.fields to interpret the columns.

stream_stats
object

Server-side streaming latency stats, in milliseconds.

summary
any

Execution summary. summary.fields maps field names to their metadata and is needed to interpret the decoded Arrow table; also carries the generated SQL and cache type.

used_keys
object