Run a saved document query
Run one of a document’s saved queries and returns the results as JSON, CSV, or XLSX. Only adding and updating existing filters is supported. To modify more than a query’s filters before running it, see the Running document queries with APIs guide.
View access is required to run queries that are shown as tiles on a dashboard, or any saved query on a document with an app. All other saved queries require access to the document’s workbook.
This API is the only way to run a dashboard tile for a user with read-only access to a dashboard. To run a query definition you supply yourself, use the Run query API instead.
Authorizations
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Path Parameters
Document identifier (either document ID or identifier slug)
The saved query to run: its queryIdentifierMapKey, or its query presentation id, from GET /v1/documents/{documentId}/queries.
1Query Parameters
Organization API key required. The membership ID of the user to act as.
Body
Filters to apply for this run, keyed by field name (e.g. orders.status). Each replaces the saved filter on the same field and the saved query is not modified. A filter that cannot be applied fails the request.
Whether to format result values (e.g., apply number formatting).
Format of the result document. For csv and xlsx results formats, the document's Download setting must be enabled.
csv, xlsx, json "json"
Response
The saved query ran; the body is its result document.

