Organization API: Organization deployments: Previews
The 3 Organization API operations for previews.
Part of Organization deployments.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/previews |
List previews |
| DELETE | /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/previews |
Close previews |
| POST | /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/previews/{release_uuid}/promote |
Promote preview |
List previews
Section titled List previewsGET /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/previews
Whether a push to another branch or a pull request makes a preview
(allowed, with reason when it does not), and each branch with
live previews, the most recently pushed first: its newest release
(latest), the ready one its branch address serves (serving,
null until one is ready) and its addresses (routed is false while
an address has no route yet).
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Close previews
Section titled Close previewsDELETE /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/previews
Close the live previews of a branch, or of a pull request and of the
branch it comes from, or of both: a release on its way is canceled, a
ready one stops serving, and their addresses are removed. The next
push to the branch makes a new preview. 422 when neither is named; a
branch with no live preview answers closed: [].
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes | |
org_slug |
path | string | yes | |
branch |
query | string or null | no | The branch whose live previews close |
pr |
query | integer or null | no | A pull request's number: its previews and its branch's close |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Promote preview
Section titled Promote previewPOST /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/previews/{release_uuid}/promote
A new production release of a preview's build: its image, its static
output or both, as the deployment serves them, with nothing built
again. The preview keeps serving at its own addresses. 409 for a
release that is not a preview (not_preview), one that was never
ready (not_ready), or one without the output the deployment needs
(not_promotable).
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
release_uuid |
path | string (uuid) | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |