Skip to main content

Run a read-only SQL query (ad-hoc or saved dataset)

POST 

/v1/analytics/run-query

Run a read-only query and get rows back.

Provide exactly one of three inputs: sql for an ad-hoc SELECT, dataset_id to run a saved dataset, or question to let the natural-language agent ground and validate a query before it is executed for real rows. Page through results with limit and offset, and pass fresh: true to bypass the analytics cache.

The engine enforces SQL safety and organization scoping on every path, so a query can only ever read your own data. Read GET /v1/analytics/data-model first so you write real column, enum and stage names instead of guessing.

Requires the analytics:read scope.

Request

Responses

Successful Response