Skip to content

API: Query

Run read-only SQL against a source. All endpoints require authentication unless noted. 7 endpoints.

Execute multiple ChartSpec queries in a single batch

Request body (JSON)

Field Type Required Description
specs array of object yes
forceRefresh boolean no

Responses: 200

Clear cached query results for a model

Path parameters

Name Type Required Description
modelId string yes

Responses: 200 · 400 · 401 · 404

Run the saved query backing a dashboard card (view-gated)

Request body (JSON)

Field Type Required Description
dashboardId string yes
cardId string yes
limit integer no
filters array of object no
distinctColumn string no

Responses: 200 · 400 · 401 · 404

Get distinct values for a field (for slicers/filters)

Request body (JSON)

Field Type Required Description
modelId string yes
sourceId string yes
fieldId string yes
limit number no

Responses: 200

Execute a ChartSpec query against a semantic model

Request body (JSON)

Field Type Required Description
modelId string yes
sourceId string yes
xField object no
yFields array of object yes
colorField object no
smallMultiples object no
sizeField object no
tooltipFields array of object no
filters array of object no
sort array of object no
limit integer no
offset integer no
forceRefresh boolean no

Responses: 200 · 400 · 401 · 404

Execute raw SQL against a data source (admin/editor only)

Request body (JSON)

Field Type Required Description
sourceId string yes
sql string yes
limit integer no

Responses: 200 · 400 · 401 · 404

Run the saved query backing a report block (view-gated)

Request body (JSON)

Field Type Required Description
reportId string yes
savedQueryId string yes
limit integer no

Responses: 200 · 400 · 401 · 404