Skip to main content
GET
/
v1
/
execute
/
{database}
Execute SQL statement (GET)
curl --request GET \
  --url https://{sql-node}/v1/execute/{database} \
  --header 'Authorization: Bearer <token>'
{
  "query_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": {
    "reason": "<string>",
    "sql_state": "<string>",
    "vendor_code": 123
  },
  "data": [
    {}
  ],
  "schema": [
    {
      "name": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Access token obtained from the /v1/login endpoint. Include in the Authorization header as: Bearer {token}

Headers

Accept
enum<string>
default:application/json

Supported response media types. The API returns large query results using chunked encoding.

Available options:
application/json,
application/stream+json,
application/parquet
Accept-Encoding
string

Supported compression algorithms for responses. You can specify multiple algorithms as a comma-separated list.

Note: For large result sets, compression can impact performance. Without compression, result sets can be processed in a streaming fashion. With compression, the entire result set must be compressed before it is returned to the client.

Path Parameters

database
string

The specific database in your system for the API call. If not specified, defaults to the database from the authentication token or system settings.

Query Parameters

statement
string
required

A valid SQL statement to execute. The statement must be URL-encoded.

format
enum<string>
default:array

Sets the response format.

  • array - Returns the schema and data as arrays (more efficient for large data sets) (default)
  • collection - Returns data as JSON objects (more convenient for client processing)
Available options:
array,
collection
fetch_size
integer
default:0

The number of rows to return in each chunk for streaming responses. A value of 0 (default) means the database determines how many rows to return.

Required range: x >= 0

Response

200 - application/json

Successful query execution

query_id
string<uuid>

Unique identifier for the query

status
object

Status information for API responses

data

Query results as JSON objects (collection format)

schema
object[]

Column schema (when using array format)