API referenceSections

Deployments and previews

25 operations. Open one for its parameters, request body, responses and examples.

MethodPathSummary
POST/api/v1/hooks/git/{id} 202Push and pull request webhook from GitHub, GitLab, Gitea or Bitbucket (ADR 0027, 0160)
GET/api/v1/preview-gate/{id}The sign-in gate of a Git preview (ADR 0160)
GET/api/v1/tenants/{tid}/deploy/placementWhere builds run (ADR 0171); provider tenant only
PUT/api/v1/tenants/{tid}/deploy/placementChoose it
GET/api/v1/tenants/{tid}/preview-settingsThe provider's Git preview settings (ADR 0160); provider tenant only
PUT/api/v1/tenants/{tid}/preview-settingsSet the preview domain, certificates and the database copy limit
POST/api/v1/tenants/{tid}/sites/{id}/deploy-sourcePut a source on the site, as an application release or into its public folder (ADR 0025)
GET/api/v1/tenants/{tid}/sites/{id}/deploy/settingsThe site's deploy settings (ADR 0170, 0173, 0174)
PUT/api/v1/tenants/{tid}/sites/{id}/deploy/settingsChange them. Turning the migration gate on needs database.write and acknowledged_one_way
GET/api/v1/tenants/{tid}/sites/{id}/deploysThe site's latest deploy pipelines, newest first
GET/api/v1/tenants/{tid}/sites/{id}/deploys/{pid}One pipeline
POST/api/v1/tenants/{tid}/sites/{id}/deploys/{pid}/actions/{action} 202Cancel, approve the switch, switch back, or choose a recovery (retry, restore, abandon)
GET/api/v1/tenants/{tid}/sites/{id}/deploys/{pid}/logThe build's log as the server sent it so far (ADR 0171)
GET/api/v1/tenants/{tid}/sites/{id}/gitThe site's Git connection (ADR 0027); never the token or the webhook secret
PUT/api/v1/tenants/{tid}/sites/{id}/gitConnect the site to a GitHub, GitLab, Gitea or Bitbucket branch; the webhook secret is returned once
DELETE/api/v1/tenants/{tid}/sites/{id}/gitForget the repository, its token and the webhook secret
POST/api/v1/tenants/{tid}/sites/{id}/git/deployDeploy the branch's current commit now
GET/api/v1/tenants/{tid}/sites/{id}/preview-settingsA live site's preview settings and what the plan allows
PUT/api/v1/tenants/{tid}/sites/{id}/preview-settingsSave a live site's preview settings; previews take them at their next update
GET/api/v1/tenants/{tid}/sites/{id}/previewsA live site's previews, newest first
POST/api/v1/tenants/{tid}/sites/{id}/previews 202Make (or update) a preview of a branch now; it is built in the background
GET/api/v1/tenants/{tid}/sites/{id}/previews/{pid}One preview with the log of its latest build
DELETE/api/v1/tenants/{tid}/sites/{id}/previews/{pid}Remove a preview, its site (not kept) and its database
POST/api/v1/tenants/{tid}/sites/{id}/previews/{pid}/promoteDeploy the preview's commit to the live site through the ordinary deployment (a release with rollback for an application)
POST/api/v1/tenants/{tid}/sites/{id}/previews/{pid}/redeploy 202Build the preview again from its branch's newest commit