Get Harbor Saved Query

Beta
Returns the current published version of one Harbor saved query. The response contains the current immutable `revision_id`, SQL template, parameter contract, expected columns, and publication provenance. Validation inputs are draft-only and are never part of a published response. A Harbor profile credential can retrieve a saved query only from its own Harbor. ## Harbor Activity When you use a Harbor profile credential, send a new nonzero UUID in `X-Polytomic-Activity-Request-ID` for each request. A missing or invalid ID returns `400 Bad Request`. Reusing a consumed ID returns `409 Conflict`. If you supply `X-Polytomic-Harbor-Session`, the session must be active and bound to your credential and Harbor. An invalid session returns `403 Forbidden`. Direct scoped REST requests may omit the session header. Polytomic records `saved_query.fetched` before returning the definition. The event identifies the saved query, exact immutable revision, published version, and bounded name snapshot. It does not indicate query execution. Activity excludes SQL, parameter defaults and validation values, expected column names, and result rows. If Polytomic cannot record the event, the request returns `503 Service Unavailable` without saved-query data.

Authentication

AuthorizationBearer
Bearer user API key
OR
AuthorizationBasic

Basic organization-scoped API key

Path parameters

harbor_idstringRequiredformat: "uuid"
Unique identifier of the Harbor.
saved_query_idstringRequiredformat: "uuid"
Unique stable identifier of the saved query.

Headers

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

Response

OK
dataobjectOptional

Errors

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