Run Harbor Query
Changed onSubmits a query against the Harbor backing connection for asynchronous execution.
Use a scoped credential bound to this Harbor. The query runs only against the Harbor's backing connection; you cannot select another connection on this route. Send a unique X-Polytomic-Activity-Request-ID UUID with each submission. The X-Polytomic-Harbor-Session header is optional; if you send one, it must be valid for this Harbor.
The response contains a query ID and an initial created status. Poll GET /api/queries/{id} with that ID until the status is done, failed, or unknown. Follow the result endpoint's pagination links for additional rows. Results are temporary; check expires on the completed query.
Request
- Base URLhttps://app.polytomic.com
- Auth
- HTTP bearer
- or HTTP basic
Path parameters
Unique identifier of the Harbor whose backing connection runs the query
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 1 AS n"
}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