Deployments

Deploy the branch head again, a pinned commit (ref) or without build cache (force)

post/projects/{projectId}/deployments

Request

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

Path parameters

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

Request body

refstring

commit SHA or branch; default = project branch HEAD

forceboolean

rebuild without cache

Response

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.