Reach out to Omni support to have this feature enabled.
Runs the query specified in the request body. Successful requests will return the data as a base64 encoded Apache Arrow table, allowing you to extract query results from Omni and use them elsewhere. For example, piping data to Google Sheets or leveraging data in a Python notebook.
remaining_job_ids property. When this occurs, poll the GET /api/v1/query/wait endpoint until the timed_out property is false:
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
A JSON object representing the query to be run.
To retrieve a query's JSON object from an Omni workbook:
Option + 9; for Windows, use Alt + 9.Executes the query as the specified user. If not provided, the API uses the user associated with the API token. The userId must belong to a user in your organization.
Optional cache policy to control how query caching behaves. Must be one of:
Standard - Uses standard caching behaviorSkipRequery - Uses cached results if available, but does not requery if not found (default)SkipCache - Bypasses cache and always executes a fresh queryStandard, SkipRequery, SkipCache Cannot be used with planOnly. Specifies the format of query results exported by the API.
If omitted, the API will return results in a base-64 encoded format.
csv, json, xlsx Cannot be used with resultType. If true, the API will return the query execution plan without running the query. The response will include the generated SQL and query metadata.
Applicable only if resultType is specified. If true, formatting will be applied to numeric and currency values in the form of currency symbols and thousand separators.
Successful responses will contain the following:
jobs_submitted propertyjob_id, status, and the provided query. Note: If planOnly: true was included in the request body, the status will be PLANNED.result property, which contains the query results as a base64 encoded Apache Arrow table. You can use the Omni Python SDK to decode and validate the results.If the request times out, the response will include remaining_job_ids. Poll the /api/v1/query/wait endpoint with these IDs until timed_out is false.
Map of job IDs to client result IDs
The unique identifier for the query job
Job status (e.g., COMPLETE, PLANNED)
Client-side result identifier
Query execution summary including SQL, stats, and field metadata
Cache information including TTL and data freshness
The executed query details
Base64 encoded Apache Arrow table containing query results
Server-side streaming metrics
IDs of the jobs still processing if the request timed out. Poll /api/v1/query/wait with these IDs.
Indicates if the request timed out. If true, use remaining_job_ids to poll for results.