Deployments
Preview

Get a deployment's current state

What the deployment tracks, the snapshot it runs, the snapshot it wants when that is newer, and its sync, health and drift status.

GET
/deployments/{deploymentId}/state
cookiebetter-auth.session_token<token>

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

deploymentId*string
Formatuuid

Response Body

The deployment's state.

application/json
  1. response
deploymentId*string
Formatuuid
clusters*array<>

The state on each cluster the deployment is applied to, by cluster name. A deployment on an environment is applied to every cluster in it; its own state is their roll-up (applied when every cluster has, health the worst of theirs).

tracking*
snapshotId?string

The snapshot running. Absent before the first apply.

Formatuuid
desiredSnapshotId?string

The snapshot wanted, when it is newer than the one running.

Formatuuid
snapshotContentId?string

The 7-character content id of the snapshot running. Absent before the first apply.

desiredSnapshotContentId?string

The 7-character content id of the snapshot wanted, when there is one.

provenance?

Where the snapshot wanted came from, when there is one.

desiredProvenance?

Where the snapshot wanted came from, when there is one.

sync*SyncStatus

How the snapshot running compares with the one wanted. Used by every state, list, timeline and Activity entry.

Value in"synced""out_of_sync""applying""failed"
syncMessage*string

Why the last apply failed.

renderFailure?

Why the newest render failed. Absent when it did not, or a render has worked since.

health*HealthState

The worst health the operators report. Used by every state, list, timeline and Activity entry.

Value in"healthy""progressing""degraded""unknown"
healthMessage*string

The operator's reason for the worst object when health is not good. Empty when there is none.

drift*
syncChangedAt*string
Formatdate-time
healthChangedAt*string
Formatdate-time
driftChangedAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X GET 'https://wardn.example.com/api/v1/deployments/497f6eca-6276-4993-bfeb-53cbbbba6f08/state'
Example Response
{  "deploymentId": "a73c85a1-d857-491e-a6b2-51dce05de7a2",  "clusters": [    {      "clusterId": "a3d24843-7014-4490-bdd3-b7cb39b400c8",      "clusterName": "string",      "snapshotId": "09520abc-01e6-4da1-8fa5-f10e3883c861",      "sync": "synced",      "syncMessage": "string",      "health": "healthy",      "healthMessage": "string",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "tracking": {    "kind": "branch",    "ref": "string"  },  "snapshotId": "09520abc-01e6-4da1-8fa5-f10e3883c861",  "desiredSnapshotId": "772358de-4331-409a-8836-5e8987492b85",  "snapshotContentId": "string",  "desiredSnapshotContentId": "string",  "provenance": {    "sourceRepo": "string",    "branch": "string",    "commit": "string",    "branchProtected": true,    "prNumber": 0,    "pusher": "string",    "commitSubject": "string",    "commitAuthor": "string",    "committedAt": "2019-08-24T14:15:22Z",    "apps": [      {        "appId": "28c365d5-df94-4a54-8217-3ce51d068868",        "name": "string",        "sourceRepo": "string",        "sourcePath": "string",        "renderType": "string",        "commit": "string",        "branch": "string",        "branchProtected": true,        "prNumber": 0,        "pusher": "string",        "commitSubject": "string",        "commitAuthor": "string",        "committedAt": "2019-08-24T14:15:22Z",        "refKind": "branch",        "refName": "string",        "commitsSince": 0,        "commitRange": [          {            "sha": "string",            "subject": "string",            "author": "string"          }        ]      }    ]  },  "desiredProvenance": {    "sourceRepo": "string",    "branch": "string",    "commit": "string",    "branchProtected": true,    "prNumber": 0,    "pusher": "string",    "commitSubject": "string",    "commitAuthor": "string",    "committedAt": "2019-08-24T14:15:22Z",    "apps": [      {        "appId": "28c365d5-df94-4a54-8217-3ce51d068868",        "name": "string",        "sourceRepo": "string",        "sourcePath": "string",        "renderType": "string",        "commit": "string",        "branch": "string",        "branchProtected": true,        "prNumber": 0,        "pusher": "string",        "commitSubject": "string",        "commitAuthor": "string",        "committedAt": "2019-08-24T14:15:22Z",        "refKind": "branch",        "refName": "string",        "commitsSince": 0,        "commitRange": [          {            "sha": "string",            "subject": "string",            "author": "string"          }        ]      }    ]  },  "sync": "synced",  "syncMessage": "string",  "renderFailure": {    "code": "string",    "message": "string",    "commit": "string",    "occurredAt": "2019-08-24T14:15:22Z"  },  "health": "healthy",  "healthMessage": "string",  "drift": {    "status": "none",    "count": 0  },  "syncChangedAt": "2019-08-24T14:15:22Z",  "healthChangedAt": "2019-08-24T14:15:22Z",  "driftChangedAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}