Deployments
Preview

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.

GET
/deployments/{deploymentId}/snapshots/{snapshotId}/approval
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

deploymentId*string
Formatuuid
snapshotId*string
Formatuuid

Response Body

The request.

application/json
  1. 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*string
Formatuuid
deploymentId*string
Formatuuid
snapshotId*string
Formatuuid
commit?string

The commit the snapshot was made from. Set on a list, so a screen need not read each snapshot for it.

action*string
requestedBy*
decisionId?string

The stored decision that held the snapshot, with the rules and facts behind it.

Formatuuid
needs*array<>
state*string
Value in"open""superseded""used"
openedAt*string
Formatdate-time
closedAt?string
Formatdate-time
releasedAt?string

When the snapshot was released after enough approvals.

Formatdate-time
approvals*array<>
counts*
outcome*string
Value in"""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.

Example Request
curl -X GET 'https://wardn.example.com/api/v1/deployments/497f6eca-6276-4993-bfeb-53cbbbba6f08/snapshots/497f6eca-6276-4993-bfeb-53cbbbba6f08/approval'
Example Response
{  "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    }  }}