Get Query Results
Changed onFetches the latest status for a submitted query and, once complete, returns fields and paginated results.
This endpoint is the second step of the query-runner flow. First call POST /api/connections/{connection_id}/query, then poll this endpoint with the returned ID.
Results may be paginated across multiple blobs. When that happens, use the opaque links.next and links.previous URLs exactly as returned. Do not try to construct the page token yourself.
If the query is still running, the response may include only status metadata. The terminal statuses are done, failed, and unknown. An unknown status means execution started, but its durable terminal result was lost or expired. Stop polling when you receive any terminal status.
If the task is complete but the caller is not the same user that created it, the endpoint returns 404.
Request
- Base URLhttps://app.polytomic.com
- Auth
- HTTP bearer
- or HTTP basic
Path parameters
Unique identifier of the query task, as returned by POST /api/connections/{connection_id}/query
Query parameters
Opaque pagination token returned in the links.next or links.previous URL of the previous response
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.
Response
OK
Example response
{
"data": {
"count": 10,
"expires": "2021-01-01T00:00:00Z",
"fields": [
"name",
"age"
],
"id": "43d893ef-322b-47da-badb-3cf10d13a556"
},
"links": {
"next": "/api/queries/43d893ef-322b-47da-badb-3cf10d13a556?page=MQ%3D%3D"
}
}Changes
- breaking
the
response's property type changed fromobjectto no type for status - 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 - 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 - 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