Run Query
Changed onSubmits 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} until status reaches done, failed, or unknown. These statuses are terminal.
A Harbor-bound scoped credential can submit freeform SQL only against its Harbor's backing connection, even if its profile allows other connections. Other credentials retain their existing connection access. Query results are stored temporarily and may expire; use the expires field from the result endpoint to understand how long they remain available.
Request
- Base URLhttps://app.polytomic.com
- Auth
- HTTP bearer
- or HTTP basic
Path parameters
Unique identifier of the connection to run the query against
Query parameters
The query to execute against the connection
Headers
Harbor session token; when supplied, the session must be active and bound to this credential and Harbor.
New nonzero UUID for each request, required for scoped credentials; a reused value is rejected.
Request body
Example request
{
"query": "SELECT * FROM table"
}Response
OK
Example response
{
"data": {
"count": 10,
"expires": "2021-01-01T00:00:00Z",
"fields": [
"name",
"age"
],
"id": "43d893ef-322b-47da-badb-3cf10d13a556"
}
}Changes
- breaking
the
response's property type changed fromobjectto no type for status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - info
added to the
response propertyallOflist for the response status
- breaking
- breaking
the
/response's property type changed fromstringto no type for status - info
added to the
/response propertyallOflist for the response status - info
removed the
createdenum value from the/response property for the response status - info
removed the
doneenum value from the/response property for the response status - info
removed the
failedenum value from the/response property for the response status - info
removed the
runningenum value from the/response property for the response status - info
removed the
unknownenum value from the/response property for the response status
- breaking