Run Query

Submits a query for asynchronous execution against the connection. This endpoint returns immediately with a query task ID. It does not wait for the query to finish. Poll [`GET /api/queries/{id}`](../../../../api-reference/query-runner/get-query) until `status` reaches `done` or `failed`. Only the user who created the query can fetch its results later. Query results are stored temporarily and may expire; use the `expires` field from the result endpoint to understand how long they will remain available.

Authentication

AuthorizationBearer
Bearer user API key
OR
AuthorizationBasic

Basic organization-scoped API key

Path parameters

connection_idstringRequiredformat: "uuid"
Unique identifier of the connection to run the query against.

Headers

X-Polytomic-VersionstringRequired

Query parameters

querystringOptional
The query to execute against the connection.

Request

This endpoint expects an object.
querystringOptional
The query to execute against the connection.

Response

OK
dataobject

Errors

400
Bad Request Error
404
Not Found Error
500
Internal Server Error