Logs API
Authentication
Authentication is done via basic auth with your API token. Get your token by clicking "New API Token" on the page: https://app.runreveal.com/dash/workspace/api-tokens.
e.g. with cURL, set the authorization header like so:
$ curl -H 'Authorization: Basic <token>' https://api.runreveal.com/...
Logs Query Endpoint
The query endpoint accepts SQL queries and returns results. The token is scoped
to a single workspace, so no workspaceid parameter is required.
By default the query runs synchronously and returns up to limit results
inline (default 50, max 100000). The request body accepts:
query— the SQL to run.source— a free-form label for where the query originated (e.g.api).parameters— substitution values for the query. Thefrom,to,window, andintervalparameters control the time range and default to the last 24 hours if omitted.limit— maximum rows returned in this response.async— set totrueto queue the query and return immediately with aqueryID(requires the async-queries feature). Poll the results endpoint for completion.
Here's a full example using cURL:
Results Endpoint
Use the results endpoint to page through a completed query's results, or to
poll an asynchronous query for completion. Pass limit and offset to page.
The queryID is returned by the query endpoint above.
If the query has not yet completed, totalRows (and the legacy totalResults)
will be -1.
Cancellation Endpoint
This cancels an inflight query given by the queryID. Cancellation is shared across query versions — use it for queries started via the v3 endpoint too.