For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inBook a demo
GuidesAPI Reference
GuidesAPI Reference
  • API Reference
      • POSTRun Query
      • GETGet Query Results
Logo
Log inBook a demo
API ReferenceQuery Runner

Get Query Results

GET
https://app.polytomic.com/api/queries/:id
GET
/api/queries/:id
$curl https://app.polytomic.com/api/queries/248df4b7-aa70-47b8-a036-33ac447e668d \
> -H "Authorization: Bearer <token>"
1{
2 "data": {
3 "count": 10,
4 "error": "string",
5 "expires": "2021-01-01T00:00:00Z",
6 "fields": [
7 "name",
8 "age"
9 ],
10 "id": "43d893ef-322b-47da-badb-3cf10d13a556",
11 "results": [
12 {}
13 ],
14 "status": "created"
15 },
16 "links": {
17 "next": "/api/queries/43d893ef-322b-47da-badb-3cf10d13a556?page=MQ%3D%3D",
18 "previous": "string"
19 }
20}
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`](../../../api-reference/query-runner/run-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`.
Was this page helpful?
Previous

Upsert Schema Fields

Next

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.

Authentication

AuthorizationBearer
Bearer user API key
OR
AuthorizationBasic

Basic organization-scoped API key

Path parameters

idstringRequiredformat: "uuid"

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

Headers

X-Polytomic-VersionstringOptional

Query parameters

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

Response

OK
dataobject
linksobject

Errors

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