Skip to main content
POST
/
v1
/
query
/
run
Run query
curl --request POST \
  --url https://{instance}.omniapp.co/api/v1/query/run \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": {
    "modelId": "123e4567-e89b-12d3-a456-426614174000",
    "table": "orders",
    "fields": [
      "order_id",
      "total_amount"
    ],
    "limit": 100
  }
}
'
{
  "jobs_submitted": 123,
  "job_id": "<string>",
  "status": "<string>",
  "summary": {},
  "cache_metadata": {},
  "query": {},
  "result": "<string>"
}

Authorizations

Authorization
string
header
required

Use either an Organization API Key or Personal Access Token (PAT). Include in the Authorization header as: Bearer YOUR_TOKEN

Body

application/json
query
object
required
userId
string<uuid>

Execute query as specified user

cache
string

Cache policy (e.g., "SkipRequery")

resultType
string

Export format (e.g., "csv")

planOnly
boolean

Return execution plan only

Response

Query results (streaming response)

jobs_submitted
integer
job_id
string
status
string
summary
object
cache_metadata
object
query
object
result
string

Base64-encoded Apache Arrow format