Deployments
Preview

Apply an earlier snapshot again

Makes the snapshot the one the deployment wants and applies it through the normal path, with jobs running their undo in place of their forward work. The preflight runs first and its findings come back. When it found something blocking and no bypass was given, nothing is applied and `status` is `bloc

POST
/deployments/{deploymentId}/snapshots/{snapshotId}/restore
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
incidentId?string

An incident, by id or number (INC-12). With an open Sev 1 or 2 incident, someone who holds restore:bypass restores past the guardrails that govern restores; Activity marks it break-glass and the notification routes are told. It needs a reason.

reason?string

Why the deployment goes back, kept in Activity with the restore.

Lengthlength <= 1024
bypass?

Overrides blocking findings. Needs the restore:bypass permission.

Response Body

The restore was queued, or blocked by the preflight.

application/json
  1. response
breakGlass*boolean

An open Sev 1 or 2 incident let it go past the guardrails.

rules*array<>
status*string

Awaiting approval: only approvals someone can still give hold the restore, so a request is open in the approvals inbox and the restore goes ahead when it is approved.

Value in"queued""blocked""awaiting_approval"
approvalRequestId?string

The request the restore waits for, when it waits.

Formatuuid
commandId?string

The apply command, when queued.

Formatuuid
bypassed*boolean
findings*array<>
Example Request
curl -X POST 'https://wardn.example.com/api/v1/deployments/497f6eca-6276-4993-bfeb-53cbbbba6f08/snapshots/497f6eca-6276-4993-bfeb-53cbbbba6f08/restore' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "breakGlass": true,  "rules": [    {      "title": "string",      "setBy": "string",      "status": "met",      "message": "string"    }  ],  "status": "queued",  "approvalRequestId": "62a09f2a-7fb7-4e24-a2af-6c58e85c4c08",  "commandId": "9e2dd63c-3478-489f-86d3-8c292a65a0aa",  "bypassed": true,  "findings": [    {      "code": "image.unresolvable",      "severity": "blocking",      "message": "string",      "subject": "string"    }  ]}