Skip to main content
POST
Execute SQL against a Superset database

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
sql
string
required

The SQL query to run.

database_id
integer
default:1

ID of the Superset database to run the query against.

schema
string | null

Default schema for queries whose table names contain no schema.

catalog
string | null

Default catalog for queries whose table names contain no catalog.

query_limit
integer
default:1000

Maximum number of rows to return.

Required range: 1 <= x <= 10000

Response

Successful Response

query_id
string | null

The query run's ID in Superset.

status
string | null

Execution state of the query, such as success or failed.

data
Data · object[]

Result rows. Each row is an object of column name to cell value.

columns
Columns · object[]

Metadata for each result column, such as name and type.