previews
Covers 6 API operations in the previews category.
| Method | Path | Description |
|---|---|---|
| GET | /v1/orgs/{orgSlug}/projects/{projectName}/previews | List the project's previews |
| DELETE | /v1/orgs/{orgSlug}/projects/{projectName}/previews/{previewName} | Delete a preview and its branch |
| POST | /v1/orgs/{orgSlug}/projects/{projectName}/previews/{previewName}/promote | Promote a preview to production |
| GET | /v1/orgs/{orgSlug}/projects/{projectName}/share | The project's share link |
| PUT | /v1/orgs/{orgSlug}/projects/{projectName}/share | Point the share link at a preview, minting it if there is none |
| DELETE | /v1/orgs/{orgSlug}/projects/{projectName}/share | Stop the share link answering |
GET /v1/orgs/{orgSlug}/projects/{projectName}/previews
Requires viewer or higher. projectName is the parent project; previews are
not addressable as projects of their own and do not appear in listProjects.
Deleted and expired previews are not listed.
operationId listPreviews
| Status code | Description | Response body |
|---|---|---|
| 200 | List of previews | object |
| 403 | — | — |
| 404 | — | — |
DELETE /v1/orgs/{orgSlug}/projects/{projectName}/previews/{previewName}
Requires member or higher. Deletes the preview along with its database, placement, hostname and deployment artifacts.
It answers 204 as soon as teardown is under way. Unlike deleteProject, no
confirmation string is required.
operationId deletePreview
| Status code | Description | Response body |
|---|---|---|
| 204 | Teardown started | — |
| 403 | — | — |
| 404 | — | — |
POST /v1/orgs/{orgSlug}/projects/{projectName}/previews/{previewName}/promote
Requires member or higher. Takes the preview's deployment artifact and commits it as a new deployment of the parent project — a new version number, the same bundle sha. No re-upload is needed.
No database is touched, in either direction. The preview's data is not merged
into production, and production's data is not replaced by the preview's. To move
data, use getExport or a restore.
The preview keeps running after promotion.
operationId promotePreview
| Status code | Description | Response body |
|---|---|---|
| 201 | The parent's new live deployment | Deployment |
| 403 | — | — |
| 404 | — | — |
| 409 | The preview has no deployment to promote, or is not ready | Error |
GET /v1/orgs/{orgSlug}/projects/{projectName}/share
Requires viewer or higher. 404 when the project has never been shared — a link is
minted by putShareLink, never as a side effect of reading.
operationId getShareLink
| Status code | Description | Response body |
|---|---|---|
| 200 | The share link | ShareLink |
| 403 | — | — |
| 404 | — | — |
PUT /v1/orgs/{orgSlug}/projects/{projectName}/share
Requires member or higher: handing out a public address for the app is publishing, not reading.
Idempotent. The label is minted once and kept, so somebody who already has the link keeps working — calling this again with the same preview changes nothing. What it does change is which preview the link resolves to, so a share from another branch moves the same address rather than issuing a second one.
rotate: true mints a new label and detaches the old name in the same request ("링크
재발급"), so there is never a moment with two live links. Anyone holding the old link
stops being able to open it, which is the point.
The named preview has to exist. Studio deploys it first
(createDeployment?preview=studio&db=branch) and shares it second.
operationId putShareLink
Request body: application/json · object
| Status code | Description | Response body |
|---|---|---|
| 200 | The share link | ShareLink |
| 400 | — | — |
| 403 | — | — |
| 404 | The project, or the named preview, does not exist | Error |
DELETE /v1/orgs/{orgSlug}/projects/{projectName}/share
Requires member or higher. The name stops resolving and the label is forgotten; a later share mints a different one.
The preview is not deleted. Sharing and running are separate decisions, and a link that also destroyed a database branch would be a surprising amount of destruction.
A project that is not shared answers 204 — the caller is turning something off.
operationId deleteShareLink
| Status code | Description | Response body |
|---|---|---|
| 204 | No longer shared | — |
| 403 | — | — |
| 404 | — | — |