Skip to navigation

Run Harbor Query

Beta

Submits 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.

Authentication

AuthorizationBearer
Bearer user API key
OR
AuthorizationBasic

Basic organization-scoped API key

Path parameters

harbor_idstringRequiredformat: "uuid"
Unique identifier of the Harbor whose backing connection runs the query.

Headers

X-Polytomic-VersionstringOptional
X-Polytomic-Harbor-SessionstringOptional
X-Polytomic-Activity-Request-IDstringOptional

Request

This endpoint expects an object.
querystringRequired
SQL query to execute against the Harbor backing connection.

Response

OK
dataobjectOptional

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error
503
Service Unavailable Error