Publish Harbor Saved Query Draft

Beta
Validates and publishes the current draft as the next immutable saved-query version. Only organization administrators can publish. Publication executes and validates the current draft with the Polytomic-managed Harbor's MotherDuck `read_scaling` credential. It fails instead of using the Harbor writer credential when the reader credential is missing or incomplete. After execution, publication verifies that the draft did not change. A concurrent edit returns a conflict and remains a draft. Successful publication creates the next immutable revision, records the observed ordered columns as its output contract, removes validation inputs from the published definition, and deletes the mutable draft. The response includes the immutable `revision_id` that future executions use for exact provenance.

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

Response

OK
dataobjectOptional

Errors

403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
500
Internal Server Error