Execute a data lake query
POST/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
queryquery 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.
Request
Responses
- 200
- 400
- 401
- 403
- 409
- 429
Query executed successfully. The response body contains the query results in the requested format.
Invalid SQL query. The query failed validation (not read-only, multiple statements, or exceeds 50,000 characters).
Missing or invalid bearer token.
Forbidden. Either the token has no granted resources or the query matches an AST restriction.
ClickHouse returned an error while executing the query.
Rate limit exceeded. Maximum 60 requests per minute per token.