Execute Sql

View as Markdown
Execute a read-only SQL query. Runs the query against the organization's read replica, so it cannot mutate data. Only SELECT statements are accepted. Supports positional parameters via a params list. Use the schema tool to discover tables first, and reference each column by its sql_column_name — foreign keys carry an _id suffix in SQL (e.g. a 'sample' reference is the 'sample_id' column).

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
querystringRequired
paramslist of any or nullOptional

Response

OK
columnslist of strings
datalist of lists of any

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error
503
Service Unavailable Error