Execute a data lake query
Execute a read-only SQL query against the audit data lake.
The SQL statement can be sent in three ways:
- As a JSON body: { "query": "SELECT ..." }
- As a plain text body with Content-Type: text/plain
- As a query query string parameter
ℹ️ Note: If you provide the SQL in both the query string and the body, they must be identical or the request will fail.
Results stream directly from ClickHouse. By default, the response uses tab-separated format. Add a FORMAT JSON clause to your SQL to get JSON output.
Query parameters
The SQL query to execute. Must be a read-only, single statement.
Parametrized query value. Use the param_ prefix followed by the parameter name.
You can pass multiple parameters by adding additional param_* query string parameters (e.g., param_org_id, param_start_date). Each parameter maps to a {name:Type} placeholder in the SQL query.
Request body
Example request
{
"query": "SELECT * FROM audit_log LIMIT 10 FORMAT JSON"
}Response
Query executed successfully. The response body contains the query results in the requested format.
Changes
No recorded changes to this endpoint across all 1 revision of this API.