Cloud
The deployment object
One build and rollout of a service. A deployment moves through queued, building, starting and live; it can also end failed, cancelled, superseded (a newer one went live) or rolled_back.
Attributes
depstring: The deployment's id.svcstring: The service it deploys.statestring: queued, building, starting, live, failed, superseded, rolled_back or cancelled.triggerstring: manual, push (a GitHub push), redeploy, rollback or config.branchstring: The branch it was built from.shastring: The commit it was built from.created_attimestamp: When it was queued, Unix seconds.finished_attimestamp: When it ended, Unix seconds, or 0 while running.error_codestring: The exact error code when it failed, such as DEPLOY_HEALTH_TIMEOUT or AGENT_OOM_KILLED; null otherwise.failure_reasonstring: The kind of failure: health_check_timeout, crash_on_start, oom_on_start or other; null when it did not fail.transitionsarray: Its state changes, oldest first: list of {state, at}.
Example
{
"data": {
"dep": "dep_01jdk4p7q9w1e3r5t7y9u1i3ob",
"svc": "svc_01jdk3n2f4g6h8j0k2l4z6x8ca",
"state": "live",
"trigger": "push",
"branch": "main",
"sha": "3f2a9c1d8e7b6a5f4e3d2c1b0a9f8e7d6c5b4a39",
"created_at": 1764324999,
"finished_at": 1764325121,
"error_code": "DEPLOY_HEALTH_TIMEOUT",
"failure_reason": "health_check_timeout",
"transitions": [{"state":"queued","at":1764324999},{"state":"live","at":1764325121}]
}
}