POST
/
api
/
v1
/
query

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
parameters
object

A dictionary of parameters if a templated query is used.

query_string
string

The query string to be executed. Can either be a complete or templated query.

template_id
integer

The ID of the query template to be used.

template_name
string

The name of the query template to be used.

Response

200 - application/json
affected_records
integer

The number of records that are affected by DML or DDL queries.

created_at
string

Shows the timestamp of when the query log was created.

destination_schema
string

Shows in which schema the destination_table is stored in.

destination_table_name
string

Shows the table where the results are stored in (If the statement_type is a SELECT, a new destination_table is created. Otherwise, the destination_table_name shows the affected table).

end_time
string

The end time of the query execution.

error_result
string

Stores the error message if there was an error while executing the query.

query
string
default:

The query string that was executed.

query_id
string

A unique ID that identifies the query.

records
object[]

Returns a sample of the data (max. 100).

referer
string
default:

Indicates where the REST API call was made from.

start_time
string

The start time of the query execution.

state
string

Shows the state of the query execution (either RUNNING or COMPLETE).

statement_type
string

The query type (ex. SELECT, DELETE, etc).

total_records
integer
default:
0

The number of records returned with DQL queries.