Skip to content
Coritan Docs

Client API: Deployments: Previews

The 3 Client API operations for previews.

View as Markdown

Part of Deployments.

GET /api/v1/client/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).

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
deployment_uuid path string (uuid) yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

DELETE /api/v1/client/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: [].

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required Description
deployment_uuid path string (uuid) 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
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/client/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).

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
deployment_uuid path string (uuid) yes
release_uuid path string (uuid) yes
Status Meaning
201 Success.
422 The request is not valid. detail lists each problem.