v1

latestOpenAPI 3.0.32026-08-06138294578.6 KB
Query Runner

Get Query Results

Fetches 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. If the task is complete but the caller is not the same user that created it, the endpoint returns 404.

get/api/queries/{id}

Path parameters

idstring uuid required

Unique identifier of the query task, as returned by POST /api/connections/{connection_id}/query.

Example:248df4b7-aa70-47b8-a036-33ac447e668d

Unique identifier of the query task, as returned by POST /api/connections/{connection_id}/query.

Query parameters

pagestring

Opaque pagination token returned in the links.next or links.previous URL of the previous response.

Opaque pagination token returned in the links.next or links.previous URL of the previous response.

Headers

X-Polytomic-Versionstring

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"
  }
}