SQL query
Core Data Endpoints
SQL query
Run a SQL query against the Cube SQL API and stream the results. The response is newline-delimited JSON: the first line carries the schema (column names and types) and optionally lastRefreshTime; each subsequent line carries a data chunk with one or more result rows.
POST
SQL query
Authorizations
Cube API token (a JWT). Sent directly in the Authorization header, e.g. Authorization: <CUBE_API_TOKEN> (no "Bearer" prefix).
Body
application/json
The SQL query to run.
Time zone for the query in TZ database name format, e.g. America/Los_Angeles.
In-memory cache strategy (see Cache control):
stale-if-slow(default): if refresh keys are up to date, return the cached value; if expired, fetch fresh data but fall back to the stale value when the source query is slow.stale-while-revalidate: if expired, return stale data immediately and refresh the cache in the background.must-revalidate: if expired, always wait for fresh data from the source, even if slow.no-cache: skip refresh-key checks and always query the data source.
Available options:
stale-if-slow, stale-while-revalidate, must-revalidate, no-cache