Skip to main content
POST
Run SQL against the warehouse

Authorizations

Authorization
string
header
required

An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.

Path Parameters

key
string
required

The integration key, such as snowflake or salesforce

Body

application/json
sql
string
required

One SELECT, in the warehouse's own dialect. It may use {START_DATE}, {END_DATE}, {START_DATE_SQL} and {END_DATE_SQL}, which each run fills with its period's dates

Required string length: 1 - 100000
end_date
string<date> | null

Fills {END_DATE} instead of a period, with start_date

limit
integer
default:100

The most rows to return

Required range: 1 <= x <= 1000
period
enum<string> | null

Fills the date placeholders with the latest complete period; weekly when left out

Available options:
HOURLY,
TWO_HOURS,
FOUR_HOURS,
SIX_HOURS,
TWELVE_HOURS,
DAILY,
WEEKLY,
MONTHLY
start_date
string<date> | null

Fills {START_DATE} instead of a period, with end_date

Response

200 - application/json

Successful Response

columns
IntegrationSqlColumn · object[]
required
duration_ms
integer
required
row_count
integer
required
rows
Rows · object[]
required

As JSON: decimals a float would round as strings, times ISO-8601, bytes base64

tables_referenced
string[]
required
truncated
boolean
required

More rows matched than limit

window_end
string<date-time>
required

What {END_DATE} was filled with

window_start
string<date-time>
required

What {START_DATE} was filled with