Skip to content
runlot
ReferenceAPIpreviews

previews

Covers 6 API operations in the previews category.

MethodPathDescription
GET/v1/orgs/{orgSlug}/projects/{projectName}/previewsList 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}/promotePromote a preview to production
GET/v1/orgs/{orgSlug}/projects/{projectName}/shareThe project's share link
PUT/v1/orgs/{orgSlug}/projects/{projectName}/sharePoint the share link at a preview, minting it if there is none
DELETE/v1/orgs/{orgSlug}/projects/{projectName}/shareStop 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 codeDescriptionResponse body
200List of previewsobject
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 codeDescriptionResponse body
204Teardown 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 codeDescriptionResponse body
201The parent's new live deploymentDeployment
403——
404——
409The preview has no deployment to promote, or is not readyError

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 codeDescriptionResponse body
200The share linkShareLink
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 codeDescriptionResponse body
200The share linkShareLink
400——
403——
404The project, or the named preview, does not existError

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 codeDescriptionResponse body
204No longer shared—
403——
404——

On this page