POST
/
api
/
v1
/
query
curl --request POST \
  --url https://your-engine-url/api/v1/query/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "query_string": "<string>",
  "template_id": 123,
  "template_name": "<string>",
  "parameters": {}
}'
{
  "query_id": "<string>",
  "statement_type": "<string>",
  "start_time": "2023-11-07T05:31:56Z",
  "end_time": "2023-11-07T05:31:56Z",
  "query": "",
  "referer": "",
  "state": "<string>",
  "destination_table_name": "<string>",
  "destination_schema": "<string>",
  "error_result": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "records": [],
  "total_records": 0,
  "affected_records": 123
}

Authorizations

Authorization
string
header
required

Enter: 'Bearer <JWT>', where JWT is the access token. Example: Bearer access_token_comes_here

Query Parameters

schema
string

The schema to save the created table to. If no parameter is provided, defaults to "qm" if table_name is also not specified, and "public" otherwise.

table_name
string

The name that will be used to create the table produced by the query execution, if any. If not provided, defaults to a randomly generated name.

overwrite
boolean
default:false

Determines if the table shall be overwritten or not if it already exists.

max_results
integer
default:0

Specifies the maximum number of records that should be returned in the result set (max: 100).

Body

application/json

Response

200
application/json

Successful Response

The response is of type object.