Deployments
Preview

Update a deployment to a version of its template

Applies the difference between the version the deployment came from and the one asked for: apps added, removed or following something else, services and settings. A deployment is never updated silently; compare first.

POST
/deployments/{deploymentId}/template/update
cookiebetter-auth.session_token<token>

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

deploymentId*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
version?integer

The version to update to. The latest when left out.

Range1 <= value

Response Body

Where the deployment stands against its template.

application/json
  1. response
linked*boolean

False for a deployment made blank.

templateId?string
Formatuuid
name?string
version?integer
latestVersion?integer

Zero once the template was deleted.

updateAvailable*boolean
Example Request
curl -X POST 'https://wardn.example.com/api/v1/deployments/497f6eca-6276-4993-bfeb-53cbbbba6f08/template/update' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "linked": true,  "templateId": "196100ac-4eec-4fb6-a7f7-86c8b584771d",  "name": "string",  "version": 0,  "latestVersion": 0,  "updateAvailable": true}