Apply a new canonical declaration as a new version. The canonical document
itself is the POST body. Pass expectedVersion (sent as If-Match) for
optimistic concurrency on read-modify-write edits: a stale version is a
412 (ConflictError code PRECONDITION_FAILED, details carry
currentVersion), and a commit that races past the append is a 409
(CONFLICT) — re-read and retry on either.
ADR-0008: resolvedArtifactDigests (the client-resolved docker save
digests to pin at cut) ride as a SIBLING key on the request body alongside
the canonical document — they are not part of the authored spec. Omitted
when empty so a plain (no-artifact) apply is byte-for-byte the legacy body.
ADR-0015: allowHostnameRemoval rides the same way — set it to acknowledge
an apply whose diff withdraws a currently-routable hostname (access
renamed/deleted, primary reassigned, or a custom domain removed).
Without it such an apply is refused 409 HOSTNAME_REMOVAL_BLOCKED
(details.removedHostnames names them). Omitted when false so a normal
apply is byte-for-byte the legacy body.
Optionalopts: RequestOptionsFetch one declaration version in full (including canonical).
By default the backend BLANKET-REDACTS every workload env VALUE to
***REDACTED*** on this read-back (secrets design §13). Pass
includeSecrets: true when the document will be mutated and re-applyed
— re-applying a redacted copy would persist the sentinels as real values.
Optionalopts: RequestOptionsDeclaration versions for an application (ascending by version).
Optionalopts: RequestOptionsRoll back a release: RE-POINT the deployment pointer at an earlier cut release (ADR-0008 WP2.B). This does NOT append a new version — the target release's frozen digests/config are converged back to. The target must be a version that was cut (400/409 otherwise).
Optionalopts: RequestOptions
sdk.applications.declarations — the versioned canonical-declaration store per application.