Skip to main content
GET
/
v1
/
query
/
wait
Wait for query results
curl --request GET \
  --url https://{instance}.omniapp.co/api/v1/query/wait \
  --header 'Authorization: Bearer <token>'
{
"job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "COMPLETE",
"client_result_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"summary": {
"sql": "SELECT * FROM order_items LIMIT 10",
"total_rows": 10,
"execution_time_ms": 245
},
"result": "QVJST1cxAAD/////...",
"timed_out": false
}

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

job_ids
string<uuid>[]
required

An array of job IDs to poll for results. These IDs are returned in the remaining_job_ids property when a request to the Run query endpoint times out.

Format the parameter as a JSON array (e.g., ?job_ids=["job-id-1","job-id-2"]).

Response

Successful response containing the query results for completed jobs.

If all jobs have completed, timed_out will be false and the response will include the full query results.

If some jobs are still processing when this request times out, timed_out will be true and remaining_job_ids will contain the IDs of jobs that are still running. Continue polling with these IDs until all jobs complete.

job_id
string<uuid>

The unique identifier for the query job

status
string

Job status (e.g., COMPLETE, PLANNED)

client_result_id
string<uuid>

Client-side result identifier

summary
object

Query execution summary including SQL, stats, and field metadata

cache_metadata
object

Cache information including TTL and data freshness

query
object

The executed query details

result
string

Base64 encoded Apache Arrow table containing query results

stream_stats
object

Server-side streaming metrics

remaining_job_ids
string<uuid>[]

IDs of jobs still processing if this request timed out. Continue polling with these IDs.

timed_out
boolean

Indicates if the request timed out. If true, use remaining_job_ids to poll again.