Run SQL Runner Query

Version 4.0.24.20 (latest)

Execute a SQL Runner query in a given result_format.

Request

POST /sql_queries/{slug}/run/{result_format}
Datatype
Description
Request
HTTP Request
path
HTTP Path
Expand HTTP Path definition...
slug
string
slug of query
result_format
string
Format of result, options are: ["inline_json", "json", "json_detail", "json_fe", "json_bi", "csv", "html", "md", "txt", "xlsx", "gsxml", "sql", "json_label"]
query
HTTP Query
Expand HTTP Query definition...
download
string
Defaults to false. If set to true, the HTTP response will have content-disposition and other headers set to make the HTTP response behave as a downloadable attachment instead of as inline content.

Response

200: SQL Runner Query

Datatype
Description
(string)
string

400: Bad Request

Datatype
Description
(object)
message
string
Error details
documentation_url
string
Documentation link

404: Not Found

Datatype
Description
(object)
message
string
Error details
documentation_url
string
Documentation link

422: Validation Error

Datatype
Description
(object)
message
string
Error details
Expand ValidationErrorDetail definition...
field
string
Field with error
code
string
Error code
message
string
Error info message
documentation_url
string
Documentation link
documentation_url
string
Documentation link

429: Too Many Requests

Datatype
Description
(object)
message
string
Error details
documentation_url
string
Documentation link