Polytomic subpackage_queryRunner API
The subpackage_queryRunner API from Polytomic — 2 operation(s) for subpackage_queryrunner.
The subpackage_queryRunner API from Polytomic — 2 operation(s) for subpackage_queryrunner.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/polytomic-subpackage-queryrunner-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Reference subpackage_bulkSync Subpackage Query Runner API
version: 1.0.0
servers:
- url: https://app.polytomic.com
tags:
- name: subpackage_queryRunner
paths:
/api/connections/{connection_id}/query:
post:
operationId: run-query
summary: Run Query
description: 'Submits 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}`](../../../../api-reference/query-runner/get-query) until `status`
reaches `done` or `failed`.
Only the user who created the query can fetch its results later. Query results
are stored temporarily and may expire; use the `expires` field from the result
endpoint to understand how long they will remain available.'
tags:
- subpackage_queryRunner
parameters:
- name: connection_id
in: path
description: Unique identifier of the connection to run the query against.
required: true
schema:
type: string
format: uuid
- name: query
in: query
description: The query to execute against the connection.
required: false
schema:
type: string
- name: Authorization
in: header
description: Bearer user API key
required: true
schema:
type: string
- name: X-Polytomic-Version
in: header
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/RunQueryEnvelope'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RunQueryRequest'
/api/queries/{id}:
get:
operationId: get-query
summary: Get Query Results
description: '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`.'
tags:
- subpackage_queryRunner
parameters:
- name: id
in: path
description: Unique identifier of the query task, as returned by POST /api/connections/{connection_id}/query.
required: true
schema:
type: string
format: uuid
- name: page
in: query
description: Opaque pagination token returned in the links.next or links.previous URL of the previous response.
required: false
schema:
type: string
- name: Authorization
in: header
description: Bearer user API key
required: true
schema:
type: string
- name: X-Polytomic-Version
in: header
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/QueryResultsEnvelope'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
components:
schemas:
QueryResultsEnvelope:
type: object
properties:
data:
$ref: '#/components/schemas/RunQueryResult'
links:
$ref: '#/components/schemas/RunQueryPagination'
title: QueryResultsEnvelope
RunQueryRequest:
type: object
properties: {}
title: RunQueryRequest
ApiError:
type: object
properties:
key:
type: string
message:
type: string
metadata:
type: object
additionalProperties:
description: Any type
status:
type: integer
title: ApiError
RunQueryPagination:
type: object
properties:
next:
type: string
description: URL to the next page of results, if available. This may be returned as a host relative path.
previous:
type: string
description: URL to the previous page of results, if available. This may be returned as a host relative path.
title: RunQueryPagination
WorkTaskStatus:
type: string
enum:
- created
- running
- done
- failed
title: WorkTaskStatus
RunQueryEnvelope:
type: object
properties:
data:
$ref: '#/components/schemas/RunQueryResult'
title: RunQueryEnvelope
RunQueryResult:
type: object
properties:
count:
type: integer
format: int64
description: The number of rows returned by the query. This will not be returned until the query completes.
error:
type: string
description: Error message if the query failed.
expires:
type: string
description: The time at which the query will expire and be deleted. This will not be returned until the query completes.
fields:
type: array
items:
type: string
description: The names of the fields returned by the query. This will not be returned until the query completes.
id:
type: string
format: uuid
description: The ID of the query task. Poll GET /api/queries/{id} until the task reaches done or failed to retrieve results.
results:
type: array
items:
type: object
additionalProperties:
description: Any type
description: The query results, returned as an array of objects.
status:
$ref: '#/components/schemas/WorkTaskStatus'
title: RunQueryResult
securitySchemes:
bearerUserAPIKey:
type: http
scheme: bearer
description: Bearer user API key
orgScopedAPIKey:
type: http
scheme: basic
description: Basic organization-scoped API key
bearerPartnerKey:
type: http
scheme: bearer
description: Bearer partner API key