Deploy Service
Trigger a deployment for a specific service within an environment.
There are two modes. A standard deploy rolls out the service itself and returns a deployment_id you can poll. A preview deploy (preview: true) fans out to a per PR preview service and returns that service instead - preview mode does not return a deployment id.
A request body is always required. To deploy the latest commit on a git service’s configured branch, send {}.
The deployment row is created synchronously so the id comes back immediately. The rollout runs in the background and any failure there marks the deployment failed rather than failing this request.
Preview mode requires the parent service to use the github source, be of type web, have enable_previews turned on, and not itself be a preview service. The account plan must include preview environments.
If both docker_image_tag and helm_chart_version are supplied, helm_chart_version wins.
Authorizations
Your account API token, sent as Authorization: Bearer <api_token>. Owners and admins can read the token from the LocalOps console.
Path Parameters
The unique identifier of the environment
The unique identifier of the service