Client API: Deployments: Releases
The 7 Client API operations for releases.
Part of Deployments.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/client/deployments/{deployment_uuid}/releases |
The deployment's releases, newest first, production and preview alike |
| POST | /api/v1/client/deployments/{deployment_uuid}/releases |
Deploy a branch or an image, which starts a release |
| GET | /api/v1/client/deployments/{deployment_uuid}/releases/{release_uuid} |
One release with each of its instances (instancelist) |
| POST | /api/v1/client/deployments/{deployment_uuid}/releases/{release_uuid}/cancel |
Cancel release |
| GET | /api/v1/client/deployments/{deployment_uuid}/releases/{release_uuid}/log |
The end of the release's build log, secrets redacted as it was written |
| POST | /api/v1/client/deployments/{deployment_uuid}/releases/{release_uuid}/promote |
Promote release |
| POST | /api/v1/client/deployments/{deployment_uuid}/releases/{release_uuid}/rollback |
Rollback release |
The deployment's releases, newest first, production and preview alike
Section titled The deployment's releases, newest first, production and preview alikeGET /api/v1/client/deployments/{deployment_uuid}/releases
The deployment's releases, newest first, production and preview alike. A template has none.
is_current is true for the live release, the one serving
production. status is queued, building, deploying,
ready, failed, canceled or superseded (the dashboard
reads superseded as Replaced). trigger says what started a
release: push (a push to a connected branch), manual (Deploy a
branch or an image, an upload, a promotion or a Redeploy), rebuild
(Rebuild, or Pull again for an image), rollback or
deploy_hook. source says what it runs: git, image,
upload, redeploy, rollback or promote.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes | |
limit |
query | integer | no | How many releases to return, 1 to 100 Default: 20. |
offset |
query | integer | no | How many to skip, for the next page Default: 0. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Deploy a branch or an image, which starts a release
Section titled Deploy a branch or an image, which starts a releasePOST /api/v1/client/deployments/{deployment_uuid}/releases
Deploy a branch or an image, which starts a release. A deployment
built from git builds git_ref, a branch, tag or commit (its branch
when left out); an image deployment runs image_ref (its own when
left out). The new release replaces the live one once it is healthy.
A branch for an image deployment, or an image for one built from git,
is refused with source_mismatch. The release has the trigger
manual.
A release of another branch than the production branch is a preview,
as a push of it is (environment says otherwise): it gets its own
addresses and leaves production as it is, and is refused as a push's
preview would be (previews_refused, 402 when the plan has none and the
deployment is not billed by use, 409 when previews are off).
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
git_ref |
string or null | no | Branch, tag or commit; the deployment's branch when left out |
git_sha |
string or null | no | |
image_ref |
string or null | no | An image deployment's reference; its own when left out |
environment |
string, one of production, preview or null |
no | production or preview, for a deployment built from git. Left out: another branch than the production branch makes a preview, as a push does; the production branch, a commit or a tag releases to production. A preview needs a branch other than the production branch |
Responses
Section titled Responses| Status | Meaning |
|---|---|
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |
One release with each of its instances (instancelist)
Section titled One release with each of its instances (instancelist)GET /api/v1/client/deployments/{deployment_uuid}/releases/{release_uuid}
One release with each of its instances (instance_list). A release
of another deployment answers 404.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
release_uuid |
path | string (uuid) | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Cancel release
Section titled Cancel releasePOST /api/v1/client/deployments/{deployment_uuid}/releases/{release_uuid}/cancel
Cancel a release still queued, building or deploying: its build stops and its instances are removed, and the release that serves goes on serving. One that has finished answers 409.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
release_uuid |
path | string (uuid) | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
The end of the release's build log, secrets redacted as it was written
Section titled The end of the release's build log, secrets redacted as it was writtenGET /api/v1/client/deployments/{deployment_uuid}/releases/{release_uuid}/log
The end of the release's build log, secrets redacted as it was written. A release of an image has none.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
release_uuid |
path | string (uuid) | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Promote release
Section titled Promote releasePOST /api/v1/client/deployments/{deployment_uuid}/releases/{release_uuid}/promote
A new production release of a ready preview's build (its image, its
static output or both), with nothing built again. The preview keeps
serving at its own addresses. 409 not_preview for a production
release: roll back to it instead.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
release_uuid |
path | string (uuid) | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Rollback release
Section titled Rollback releasePOST /api/v1/client/deployments/{deployment_uuid}/releases/{release_uuid}/rollback
A new release of this earlier ready release's build, with nothing
built again: its files for a static site, its image for a web service,
both for a hybrid site. A static site's release serves at once; for the
others, the earlier release's instances that still have their servers
are started again instead of placed. 409 output_not_stored for a
release with static output made more than
app.apps.static.RETENTION_DAYS ago, whose files may be gone (deploy
its commit again instead), 409 not_rollbackable for a release that
was never ready or holds nothing to serve, 409 already_current for
the live release.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
release_uuid |
path | string (uuid) | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |