Skip to main content
POST
Generate Sql

Authorizations

Authorization
string
header
required

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

Body

application/json

Request body for synchronous SQL generation.

question
string
required

Natural language question to convert to SQL

Minimum string length: 1
database
string
required

Resource URI of the data connection (e.g. data:org:project:name)

Minimum string length: 1
schemas
DatasourceSelectedSchema · object[] | null

List of schemas to query. If not provided, defaults to 'public' schema.

Response

Successful Response

Synchronous SQL generation result.

sql
string
required
explanation
string
required
assumptions
string[]