Get the approval request of a snapshot
The request for approvals a snapshot has at this deployment, with the approvals given so far, what the guardrails say now, and whether the caller may decide on it. A snapshot the guardrails never held for approvals has none: 404.
better-auth.session_token<token>Better Auth session cookie. Production uses the __Secure- prefixed name.
deploymentId*stringuuidsnapshotId*stringuuidThe request.
application/json- response
The request for approvals of a snapshot at a deployment, opened when the guardrails hold it for them. outcome is what the guardrails say now and is empty on a list.
id*stringuuiddeploymentId*stringuuidsnapshotId*stringuuidcommit?stringThe commit the snapshot was made from. Set on a list, so a screen need not read each snapshot for it.
action*stringrequestedBy*decisionId?stringThe stored decision that held the snapshot, with the rules and facts behind it.
uuidneeds*array<>state*string"open""superseded""used"openedAt*stringdate-timeclosedAt?stringdate-timereleasedAt?stringWhen the snapshot was released after enough approvals.
date-timeapprovals*array<>counts*outcome*string"""allowed""needs""wait""blocked"decide*Whether the caller may decide on the request, and why not, so a screen can say it instead of hiding a button.
subject?What an approval request is for. Cutover requests carry the cutover; releases and restores carry nothing more.
curl -X GET 'https://wardn.example.com/api/v1/deployments/497f6eca-6276-4993-bfeb-53cbbbba6f08/snapshots/497f6eca-6276-4993-bfeb-53cbbbba6f08/approval'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "deploymentId": "a73c85a1-d857-491e-a6b2-51dce05de7a2", "snapshotId": "09520abc-01e6-4da1-8fa5-f10e3883c861", "commit": "string", "action": "string", "requestedBy": { "id": "string", "name": "string" }, "decisionId": "caa985ad-f12f-4ef1-943f-c1812738ec7a", "needs": [ { "id": "string", "label": "string", "guardrail": "string" } ], "state": "open", "openedAt": "2019-08-24T14:15:22Z", "closedAt": "2019-08-24T14:15:22Z", "releasedAt": "2019-08-24T14:15:22Z", "approvals": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "decision": "approve", "by": { "id": "string", "name": "string" }, "forPerson": { "id": "string", "name": "string" }, "delegation": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "duty": "string", "delegator": { "id": "string", "name": "string" }, "delegate": { "id": "string", "name": "string" }, "scope": { "kind": "org", "id": "string", "label": "string" }, "startsAt": "2019-08-24T14:15:22Z", "endsAt": "2019-08-24T14:15:22Z", "reason": "string", "createdAt": "2019-08-24T14:15:22Z", "endedAt": "2019-08-24T14:15:22Z", "status": "scheduled" }, "condition": "string", "note": "string", "groups": [ "string" ], "at": "2019-08-24T14:15:22Z" } ], "counts": { "approvals": 0, "security": 0, "compliance": 0 }, "outcome": "", "decide": { "can": true, "reason": "string", "forPerson": { "id": "string", "name": "string" }, "delegationId": "b6f7542b-7afd-4e22-8bf5-8b1869801562" }, "subject": { "kind": "release", "cutover": { "cutoverId": "dc9e45dc-e64c-4de2-ac81-f01dc80cd4c8", "state": "awaiting_approval", "trigger": "person", "tool": "argocd", "source": { "kind": "string", "namespace": "string", "name": "string" }, "deploymentName": "string", "target": { "clusterId": "a3d24843-7014-4490-bdd3-b7cb39b400c8", "clusterName": "string", "namespace": "string" }, "steps": [ "string", "string", "string", "string" ], "accepted": [ { "ref": { "group": "string", "kind": "string", "namespace": "string", "name": "string" }, "change": "changed", "words": "string", "acceptedBy": { "id": "string", "name": "string" }, "acceptedAt": "2019-08-24T14:15:22Z", "reason": "string" } ], "counts": { "accepted": 0, "open": 0, "expected": 0, "markers": 0, "autoscaled": 0, "images": 0, "hooks": 0 }, "deletionSafety": { "kind": "differences", "status": "passed", "statusText": "string", "text": "string", "setBy": "string", "blocker": "string", "object": { "kind": "string", "namespace": "string", "name": "string" }, "parent": { "kind": "string", "namespace": "string", "name": "string" }, "command": "string", "versions": [ "string" ], "missing": [ { "verb": "string", "group": "string", "resource": "string", "namespace": "string", "user": "string" } ], "approvers": [ "string" ], "ruleLines": [ "string" ] }, "imagesKept": 0, "requestedBy": { "id": "string", "name": "string" }, "requestedAt": "2019-08-24T14:15:22Z", "snapshotSha": "string", "reviewStillMatches": true } }}Let a snapshot through the guardrails that hold it POST
A guardrail can hold a snapshot: the protected-branch rule of a guarded environment, a window, a missing approval. Bypassing lets that one snapshot deploy anyway, once, with a reason that Activity records; the next snapshot meets the guardrails again. It is for people who hold the bypass duty. Other
Ask for a bypass POST
Asks someone who holds the bypass duty to let a snapshot the guardrails hold deploy anyway, once, with a reason. The person who asked cannot decide it. Someone who holds the duty bypasses directly instead (409 `bypass.use_direct`); a snapshot nothing holds has nothing to bypass (409 `guardrail.not_b