Deployments

Promote a ready (preview) deployment to production: a new production deployment of exactly its commit (trigger "promote")

post/deployments/{deploymentId}/promote

Request

  • Base URL: https://hostingsurge.com/api/v1
  • URL: https://hostingsurge.com/api/v1/deployments/{deploymentId}/promote
  • Auth: one of:
    • HTTP bearer
    • API key in cookie __Host-hs_session

Path parameters

deploymentIdstring uuid required
Example:3f2b8a4e-5c1d-4e8f-9a7b-2c6d1e0f4a5b

Response

Production deployment started

idstring uuid required
projectIdstring uuid required
state'queued' | 'building' | 'deploying' | 'ready' | 'error' | 'canceled' required
target'production' | 'preview' required
isCurrentboolean required

this deployment serves production traffic now

trigger'create' | 'redeploy' | 'git_push' | 'api' | 'cli' | 'upload' | 'rollback' | 'config_change' | 'builder' | 'promote' | 'deploy_hook' required
urlstring nullable required
createdAtstring required

ISO-8601 timestamp

startedAtstring nullable required

ISO-8601 timestamp

readyAtstring nullable required

ISO-8601 timestamp

durationMsinteger nullable required
errorMessagestring nullable required
retryOfstring uuid nullable

set on a deployment the platform started by itself because the hosting engine ran the build of this deployment twice and removed its own build container: the deployment it starts again (same request: target, branch, trigger and options)

retriedAsstring uuid nullable

set on a deployment that ended in error because the hosting engine ran its build twice (nothing in the code failed) and that the platform started again automatically: the new deployment. Its outcome is the outcome of this request, so a client waiting for this deployment follows that one. Never set on a retry (a request is started again at most once)

Changes

No recorded changes to this operation across all 1 revision of this API.