POST
/
api
/
v1
/
query
curl --request POST \
  --url https://api.chakra.dev/api/v1/query \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "sql": "<string>",
  "parameters": [
    "<string>"
  ]
}'
{
  "columns": [
    "<string>"
  ],
  "rows": [
    [
      "<string>"
    ]
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
sql
string

The SQL query to execute

parameters
string[]

The parameters to pass to the query. If used in conjunction with the SQL query, the parameters will be substituted into the query using the auto-incrementing ? placeholder.

Response

200 - application/json
Query result
columns
string[]
rows
array