Reference
View as MarkdownPreviews API
4 operations. Every call needs a session cookie or an Authorization: Bearer nct_… token unless marked Public. Conventions, errors and scopes
/previews/{previewId}Delete a pull-request preview
Removes the preview's services, containers, volumes and domains, then its environment. Runs asynchronously.
| Parameter | In | Type | Description |
|---|---|---|---|
previewIdrequired | path | string |
Response 202 · Accepted · application/json
PreviewView
- createdAtstring (date-time)required
- environmentIdstringrequired
- environmentSlugstringrequired
- fromForkbooleanrequired
- headBranchstringrequired
- headShastringrequired
- idstringrequired
- lastPushAtstring (date-time)required
- pausedAtstring (date-time) | nullrequired
- prAuthorstringrequired
- prNumberinteger (int64)required
- prTitlestringrequired
- prUrlstringrequired
- projectIdstringrequired
- providerstringrequired
- repostringrequired
- statusenum: creating | deploying | seeding | ready | failed | paused | deletingrequired
- statusMessagestringrequired
- urlsstring[]required
Errors
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/projects/{projectId}/previewsList a project's pull-request previews
| Parameter | In | Type | Description |
|---|---|---|---|
projectIdrequired | path | string |
Response 200 · OK · application/json
ListOutputBody2
- PreviewView[] | nullrequired
Errors
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/projects/{projectId}/previews/settingsGet a project's pull-request preview settings
| Parameter | In | Type | Description |
|---|---|---|---|
projectIdrequired | path | string |
Response 200 · OK · application/json
PreviewSettings
- baseEnvironmentIdstring | nullrequired
- enabledbooleanrequired
- excludedServicesstring[] | nullrequired
- forkPrsbooleanrequired
- idleDaysinteger (int64)required
- maxConcurrentinteger (int64)required
- projectIdstringrequired
- PreviewSeedCommand[] | nullrequired
- updatedAtstring (date-time) | nullrequired
Errors
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/projects/{projectId}/previews/settingsUpdate a project's pull-request preview settings
Previews clone the base environment for every open pull request of a connected repository. Fork pull requests are off by default; a fork preview never receives secrets.
| Parameter | In | Type | Description |
|---|---|---|---|
projectIdrequired | path | string |
Request body · application/json · required
PutSettingsInputBody1
- baseEnvironmentIdstring
- enabledboolean
- excludedServicesstring[] | null
- forkPrsboolean
- idleDaysinteger (int64)
- maxConcurrentinteger (int64)
- PreviewSeedCommand[] | null
Response 200 · OK · application/json
PreviewSettings
- baseEnvironmentIdstring | nullrequired
- enabledbooleanrequired
- excludedServicesstring[] | nullrequired
- forkPrsbooleanrequired
- idleDaysinteger (int64)required
- maxConcurrentinteger (int64)required
- projectIdstringrequired
- PreviewSeedCommand[] | nullrequired
- updatedAtstring (date-time) | nullrequired
Errors
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.