v5

latestOpenAPI 3.1.02026-08-081,0211,3082.1 MB
PUBLIC_SNIPPETS

Execute Snippet Endpoint

Execute a SQL snippet against a tenant's datastore.

The target tenant is specified in the request body, allowing PUBLIC_TENANT users to execute against any company's datastore.

post/public/snippets/execute

Request body

tenantstring required

Tenant name to execute against

database_typestring required

Database type to execute against (clickhouse or postgres)

sqlstring required

SQL query to execute

Response

Successful Response

successboolean required

Whether the execution succeeded

rowsobject[]

Query result rows

columnsstring[]

Column names in the result

row_countinteger

Number of rows returned

errorstring nullable

Error message if execution failed

execution_time_msinteger

Execution time in milliseconds