Deployments
Preview

Sign off or reject a snapshot

Records the caller's decision about the snapshot the deployment runs, in the stage it sits in: a sign-off, a sign-off with known issues where the stage accepts them, or a rejection with its reason. The snapshot's author cannot decide when the stage says so, and a person decides once. Answers the qua

POST
/deployments/{deploymentId}/snapshots/{snapshotId}/signoffs
cookiebetter-auth.session_token<token>

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

deploymentId*string
Formatuuid
snapshotId*string
Formatuuid
Idempotency-Key?string

Makes retries safe. A repeated key with the same request returns the first result and sets Idempotent-Replayed: true. The same key with a different request answers 409 idempotency.key_reused, and while the first request is still running 409 idempotency.in_progress. Results are kept for 24 hours. Server errors and refusals for lack of sign-in or permission are not kept, so a retry runs again.

Match^[A-Za-z0-9_.:-]+$
Length1 <= length <= 255
application/json
  1. body
decision*string
Value in"signoff""issues""reject"
note?string
Lengthlength <= 1000
reason?string

Required to reject.

Lengthlength <= 1000

Response Body

The qualification after the decision.

application/json
  1. response

How a snapshot fares in the stage of its deployment. A snapshot the deployment no longer runs keeps the checks it last had; one that was still qualifying then is superseded.

configured*boolean
agent*

The agent that reads each snapshot for the person who signs off. Its read is advice for the approver, never a sign-off. The agent id is stored as written; it is checked against the agents once they exist (M6).

agentRead*|

What the agent set to read this stage's snapshots made of this one: advice for the person who signs off, never a sign-off. Null when none has read it, which is always until agents ship (M6).

snapshot*

The snapshot a qualification is about.

verdict*string
Value in"unknown""qualifying""qualified""rejected""superseded"
running*boolean

The deployment runs this snapshot now. Only the running snapshot is judged afresh.

reason*string

Why it is not qualified yet, or why it was rejected. Empty once qualified.

changedAt?|

When the verdict last changed.

Formatdate-time
stage*|

The stage that judges it; null when none does.

checks*array<>
signoffs*array<>

The decisions people made, oldest first.

sign*

Whether the caller may sign off, and why not when they may not, so a screen can say it instead of hiding a button.

Example Request
curl -X POST 'https://wardn.example.com/api/v1/deployments/497f6eca-6276-4993-bfeb-53cbbbba6f08/snapshots/497f6eca-6276-4993-bfeb-53cbbbba6f08/signoffs' \  -H 'Content-Type: application/json' \  -d '{  "decision": "signoff"}'
Example Response
{  "configured": true,  "agent": {    "mode": "off",    "agentId": "string"  },  "agentRead": null,  "snapshot": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "contentId": "string",    "createdAt": "2019-08-24T14:15:22Z",    "createdBy": "string"  },  "verdict": "unknown",  "running": true,  "reason": "string",  "changedAt": "2019-08-24T14:15:22Z",  "stage": null,  "checks": [    {      "ruleId": "string",      "type": "test",      "title": "string",      "result": "string",      "progress": 0,      "state": "passed",      "fatal": true,      "why": "string"    }  ],  "signoffs": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "decision": "signoff",      "note": "string",      "reason": "string",      "by": {        "id": "string",        "name": "string"      },      "at": "2019-08-24T14:15:22Z"    }  ],  "sign": {    "can": true,    "reason": "string",    "needed": 0,    "signed": 0,    "allowIssues": true  }}