Run an explorer query
Runs an INLINE query, or a SAVED one as stored or with an adjusted text, and returns one page (page and limit in the URL). FROM picks the source: events need METER_DATA.VIEW, invoices INVOICE.VIEW (403 PERMISSION_REQUIRED). An invalid query answers 400 with reason INVALID_SYNTAX, UNKNOWN_REFERENCE or LIMIT_EXCEEDED and its position; one that reads too much 422 QUERY_TOO_EXPENSIVE; 429 RATE_LIMITED and 504 TIMEOUT mean try again shortly. Requires the METER_DATA.VIEW or INVOICE.VIEW permission.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
Headers
Query parameters
Rows per page, 1 to 100 (default 25). A LIMIT in the query takes precedence.
The page to return, from 1 (default 1). page × limit is at most 10000.
Request
INLINE runs inline.query; SAVED runs the saved query saved.saved_query_id, or saved.query in its place. Required.
For type INLINE only: the query to run.
For type SAVED only: the saved query to run, and optionally an adjusted text that runs instead of its stored one.
Orders the result by one of its columns, replacing the query’s ORDER BY. Part of what runs: see executed_query.
When true and the text sent is invalid, unambiguous technical errors (a missing GROUP BY, a keyword typo, an unquoted value, ==, a trailing comma, …) are corrected: see executed_query and corrections. Only for text sent along; a stored query is never corrected. Default false.
Response
The text as sent (INLINE only).
The saved query (SAVED only): its name, its stored text, and whether what ran differs from it.
The text that ran: with autocorrect’s corrections and the order applied. Update and Save as new send this text.
What autocorrect changed, at its position in the text as sent; absent when nothing was corrected.
The result columns, in order; every row has one cell per column.
The rows: per column a cell holding its value in the field the column’s type names (string, number, amount, …).
Whether there is a next page: post the same body with page + 1.