Tools

Execute Sql

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: write %s placeholders in the query and pass the values in order in the params list. Named :param placeholders belong to saved dataset queries and are not accepted here. 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).

Requires an API key with the read scope.

post/api/v1/tools/query

Request

  • Base URL: https://platform.labric.co
  • URL: https://platform.labric.co/api/v1/tools/query
  • Auth: HTTP bearer

Request body

querystring required

Response

OK

columnsstring[] required

Changes

No recorded changes to this operation across all 1 revision of this API.