Skip to content

Deploy a deployment

POST/v1/deployments/{uid}/deploy

Queues a new build of the deployment's branch and rolls it out when the build succeeds. Saved environment variable and settings changes are picked up. Any earlier build that is still in progress is cancelled. While a live app rebuilds it keeps serving the current version, and its display_status is updating.

The body is optional. Send no body, or {}, to build the latest commit on the branch.

For a component deployment of a one-click app (which runs a prebuilt image) the body is ignored and this behaves like Apply environment changes.

This is asynchronous. It returns 202 Accepted with an operation_id and the new run. See Get an operation.

Authentication

Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.

Path parameters

uidstringRequired

The deployment's uid.

Headers

X-Workspace-SlugstringRequired

Slug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.

X-Idempotencystring

Optional key that makes retries safe. Repeating a request with a key already used for the same action on the same deployment returns the original operation with 200 OK and is_replay: true instead of queuing it again. Reusing it for a different action or deployment returns 409 with action: idempotency_key_reused.

Request body

commit_shastring

Commit to build. Defaults to the head of the branch.

commit_messagestring

Label shown on the run.

build_envobject

Extra variables for this build only. They override stored variables with the same key and are not saved.

Response

202

The build was queued.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
Show attributes
operation_idstringRequired

UID of the queued operation. Empty when nothing was queued (create without deploy_now, or a plan change with nothing live).

deploymentobjectRequired
Show attributes
uidstringRequired

Unique identifier of the deployment.

namestringRequired

Display name.

slugstringRequired

URL-safe name, unique in the workspace.

statusstringRequired

building until the first version is live, then active. failed when the last deploy failed and nothing is live, idle while a scale-to-zero app is asleep (it wakes on the next request), paused while the account is suspended for non-payment (the app is scaled to zero and stops billing for compute; it is resumed automatically once the account is active again), deleted after deletion. A deployment created without deploy_now is active even though nothing has been deployed.

One ofactivebuildingfailedpausedidledeleted

display_statusstring

Status to show to people. Same as status, except updating while a live deployment's next version is still building, and starting once that build has an image and the app is coming up. Only computed by list and get; elsewhere equal to status.

plan_slugstringRequired

Slug of the deployment's plan.

plan_namestring

Name of the plan.

vcpuinteger

Whole vCPU count of the plan. Coarse; prefer cpu_limit_millis.

cpu_limit_millisinteger

CPU limit per replica in millicores.

memory_mibinteger

Memory limit per replica in MiB.

monthly_price_centsinteger

Plan price per month per replica, in cents. Omitted for free plans.

hourly_price_centsinteger

Hourly price in whole cents. Omitted when 0.

hourly_price_microsinteger

Hourly price in millionths of the currency unit. Omitted for free plans.

currencystring

ISO currency code of the prices.

free_allowance_countinteger

Present on Free plans with the per-account allowance.

repo_urlstringRequired

Git repository the deployment builds from. Empty for one-click app components, which run a prebuilt image.

git_providerstring

github_app when the repository is connected through the RumptyCloud GitHub App.

git_repo_full_namestring

owner/repository on GitHub.

git_repo_idstring

GitHub repository ID.

branchstringRequired

Branch that is built.

root_directorystring

Folder inside the repository that is built. Omitted when building from the root.

app_typestringRequired

Kind of app.

One ofservicestatic

build_methodstringRequired

How the image is built. image is used by one-click app components, which run a prebuilt image.

One ofrailpackdockerfileimage

build_commandstring

Build command override, if set.

start_commandstring

Start command override, if set.

health_check_pathstring

Path probed for health.

portintegerRequired

Port the app listens on.

auto_deploy_enabledbooleanRequired

Whether pushes to the branch deploy automatically.

security_scan_enabledbooleanRequired

Whether built images are scanned for vulnerabilities.

preview_apps_enabledbooleanRequired

Whether pull requests get preview apps.

artifact_retentionintegerRequired

How many built images are kept for rollbacks. 0 keeps all.

previewsarray of objects

Live pull request previews. Only returned by Get a deployment.

Show item attributes
uidstringRequired

UID of the preview deployment.

pr_numberintegerRequired

Pull request number.

branchstringRequired

Pull request branch.

statusstringRequired

Preview status, using the same values as a deployment's display_status.

commit_shastring

Commit of the preview's latest run.

public_urlstring

URL of the preview.

expires_atstring (date-time)

When the preview is removed automatically.

volume_mount_pathstring

Mount path of the persistent volume. Omitted without a volume.

volume_size_gibinteger

Size of the persistent volume(s) in GiB. Omitted without a volume.

scale_to_zero_enabledboolean

Present and true when the app sleeps when idle.

scale_to_zero_idle_minutesinteger

Idle minutes before the app sleeps.

min_replicasinteger

Instances always running.

max_replicasinteger

Autoscaling upper bound.

target_request_rateinteger

Requests per second per replica before scaling out.

current_replicasinteger

Replicas running now. Each is billed at the plan rate.

app_uidstring

Set when the deployment is a component of a one-click app. Such deployments cannot be deleted or change plan on their own.

custom_domainstring

The verified custom domain that public_url uses, if any.

last_run_uidstring

UID of the most recent run.

last_run_statusstring

Status of the most recent run. Only returned by list and get.

One ofqueuedbuildingreadyfailedcanceled

public_urlstring

URL the app is served at. Uses the custom domain once one is verified. Empty after deletion.

default_public_urlstring

The app's URL on the platform domain. Point custom domain CNAME records at its host.

created_atstring (date-time)Required

When the deployment was created.

last_failurestring

Readable reason for the last failure. Omitted when there is none.

env_changes_pendingboolean

Present and true when environment variables changed since the last deploy and are waiting to be applied. Only returned by Get a deployment.

env_changes_require_buildboolean

Present and true when the pending changes need a rebuild (Deploy a deployment) rather than Apply environment changes. Only returned by get.

crashloopobject

Present while the platform is holding the app down because it was not healthy.

Show attributes
statestringRequired

paused: the app was serving, became unhealthy and is retried automatically. stopped: nothing more happens until you restart or redeploy.

One ofpausedstopped

sincestring (date-time)

When the app was taken down.

reasonstring

Why the app was taken down.

next_retry_atstring (date-time)

Next automatic attempt. Only while paused.

runobject
Show attributes
uidstringRequired

Unique identifier of the run.

deployment_uidstringRequired

UID of the deployment.

operation_idstringRequired

UID of the operation that tracks the run. See Get an operation.

triggerstringRequired

What started the run.

One ofmanualgit_pushgit_pull_request

statusstringRequired

ready once the version is live. canceled when a newer run superseded it. Rollouts without a build start at building.

One ofqueuedbuildingreadyfailedcanceled

branchstringRequired

Branch the run built.

commit_shastring

Commit that was built, when known.

commit_messagestring

Commit message or label.

trigger_actorstring

Who started the run. For manual runs, the username (or email) of the member who made the request; for pushes and pull requests, the GitHub login.

trigger_actor_urlstring

Link to the actor's profile, when known.

image_digeststring

Digest of the built image. Omitted when the run has no image (failed, or deleted).

artifact_size_bytesinteger

Size of the stored image in bytes. Omitted when unknown or deleted.

created_atstring (date-time)Required

When the run was queued.

started_atstring (date-time)

When work began.

finished_atstring (date-time)

When the run finished.

last_failurestring

Readable reason the run failed.

security_scanobject

Vulnerability scan of the run's image. Present when scanning is enabled.

Show attributes
uidstringRequired

Unique identifier of the scan.

statusstringRequired

warning when critical or high findings exist. failed when the scan itself failed.

One ofqueuedscanningpassedwarningfailednot_scanned

critical_countintegerRequired

Critical findings.

high_countintegerRequired

High findings.

medium_countintegerRequired

Medium findings.

low_countintegerRequired

Low findings.

unknown_countintegerRequired

Findings of unknown severity.

scannerstring

Scanner used.

started_atstring (date-time)

When the scan started.

finished_atstring (date-time)

When the scan finished.

scanned_atstring (date-time)

Same as finished_at.

vulnerabilitiesarray of objects

Individual findings. Only returned by Get a deployment run.

Show item attributes
idstringRequired

Vulnerability ID, such as a CVE.

severitystringRequired

Severity reported by the scanner, such as CRITICAL, HIGH, MEDIUM, LOW or UNKNOWN.

package_namestringRequired

Affected package.

installed_versionstring

Installed version.

fixed_versionstring

First version with a fix, if any.

titlestring

Short title.

descriptionstring

Longer description.

sourcestring

Where the package was found, such as the OS release or a lockfile.

advisory_urlstring

Link to the advisory.

statusstringRequired

Status of the operation (queued for a new request; the original operation's status, such as running or succeeded, on a replay). Without an operation, the deployment status on create or completed on a plan change.

events_urlstring

Path of the server-sent events stream with the operation's progress. Omitted without an operation.

is_replaybooleanRequired

true when an X-Idempotency key was reused and the original operation is returned instead of a new one.

is_completedboolean

true when a replayed operation has already finished. Omitted unless true.

Response

200

Replay. The X-Idempotency key was already used for this action on this deployment, so the original operation is returned and nothing is queued. status is the operation's current status and deployment its current state (or status: deleted if it is gone).

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
Show attributes
operation_idstringRequired

UID of the queued operation. Empty when nothing was queued (create without deploy_now, or a plan change with nothing live).

deploymentobjectRequired
Show attributes
uidstringRequired

Unique identifier of the deployment.

namestringRequired

Display name.

slugstringRequired

URL-safe name, unique in the workspace.

statusstringRequired

building until the first version is live, then active. failed when the last deploy failed and nothing is live, idle while a scale-to-zero app is asleep (it wakes on the next request), paused while the account is suspended for non-payment (the app is scaled to zero and stops billing for compute; it is resumed automatically once the account is active again), deleted after deletion. A deployment created without deploy_now is active even though nothing has been deployed.

One ofactivebuildingfailedpausedidledeleted

display_statusstring

Status to show to people. Same as status, except updating while a live deployment's next version is still building, and starting once that build has an image and the app is coming up. Only computed by list and get; elsewhere equal to status.

plan_slugstringRequired

Slug of the deployment's plan.

plan_namestring

Name of the plan.

vcpuinteger

Whole vCPU count of the plan. Coarse; prefer cpu_limit_millis.

cpu_limit_millisinteger

CPU limit per replica in millicores.

memory_mibinteger

Memory limit per replica in MiB.

monthly_price_centsinteger

Plan price per month per replica, in cents. Omitted for free plans.

hourly_price_centsinteger

Hourly price in whole cents. Omitted when 0.

hourly_price_microsinteger

Hourly price in millionths of the currency unit. Omitted for free plans.

currencystring

ISO currency code of the prices.

free_allowance_countinteger

Present on Free plans with the per-account allowance.

repo_urlstringRequired

Git repository the deployment builds from. Empty for one-click app components, which run a prebuilt image.

git_providerstring

github_app when the repository is connected through the RumptyCloud GitHub App.

git_repo_full_namestring

owner/repository on GitHub.

git_repo_idstring

GitHub repository ID.

branchstringRequired

Branch that is built.

root_directorystring

Folder inside the repository that is built. Omitted when building from the root.

app_typestringRequired

Kind of app.

One ofservicestatic

build_methodstringRequired

How the image is built. image is used by one-click app components, which run a prebuilt image.

One ofrailpackdockerfileimage

build_commandstring

Build command override, if set.

start_commandstring

Start command override, if set.

health_check_pathstring

Path probed for health.

portintegerRequired

Port the app listens on.

auto_deploy_enabledbooleanRequired

Whether pushes to the branch deploy automatically.

security_scan_enabledbooleanRequired

Whether built images are scanned for vulnerabilities.

preview_apps_enabledbooleanRequired

Whether pull requests get preview apps.

artifact_retentionintegerRequired

How many built images are kept for rollbacks. 0 keeps all.

previewsarray of objects

Live pull request previews. Only returned by Get a deployment.

Show item attributes
uidstringRequired

UID of the preview deployment.

pr_numberintegerRequired

Pull request number.

branchstringRequired

Pull request branch.

statusstringRequired

Preview status, using the same values as a deployment's display_status.

commit_shastring

Commit of the preview's latest run.

public_urlstring

URL of the preview.

expires_atstring (date-time)

When the preview is removed automatically.

volume_mount_pathstring

Mount path of the persistent volume. Omitted without a volume.

volume_size_gibinteger

Size of the persistent volume(s) in GiB. Omitted without a volume.

scale_to_zero_enabledboolean

Present and true when the app sleeps when idle.

scale_to_zero_idle_minutesinteger

Idle minutes before the app sleeps.

min_replicasinteger

Instances always running.

max_replicasinteger

Autoscaling upper bound.

target_request_rateinteger

Requests per second per replica before scaling out.

current_replicasinteger

Replicas running now. Each is billed at the plan rate.

app_uidstring

Set when the deployment is a component of a one-click app. Such deployments cannot be deleted or change plan on their own.

custom_domainstring

The verified custom domain that public_url uses, if any.

last_run_uidstring

UID of the most recent run.

last_run_statusstring

Status of the most recent run. Only returned by list and get.

One ofqueuedbuildingreadyfailedcanceled

public_urlstring

URL the app is served at. Uses the custom domain once one is verified. Empty after deletion.

default_public_urlstring

The app's URL on the platform domain. Point custom domain CNAME records at its host.

created_atstring (date-time)Required

When the deployment was created.

last_failurestring

Readable reason for the last failure. Omitted when there is none.

env_changes_pendingboolean

Present and true when environment variables changed since the last deploy and are waiting to be applied. Only returned by Get a deployment.

env_changes_require_buildboolean

Present and true when the pending changes need a rebuild (Deploy a deployment) rather than Apply environment changes. Only returned by get.

crashloopobject

Present while the platform is holding the app down because it was not healthy.

Show attributes
statestringRequired

paused: the app was serving, became unhealthy and is retried automatically. stopped: nothing more happens until you restart or redeploy.

One ofpausedstopped

sincestring (date-time)

When the app was taken down.

reasonstring

Why the app was taken down.

next_retry_atstring (date-time)

Next automatic attempt. Only while paused.

runobject
Show attributes
uidstringRequired

Unique identifier of the run.

deployment_uidstringRequired

UID of the deployment.

operation_idstringRequired

UID of the operation that tracks the run. See Get an operation.

triggerstringRequired

What started the run.

One ofmanualgit_pushgit_pull_request

statusstringRequired

ready once the version is live. canceled when a newer run superseded it. Rollouts without a build start at building.

One ofqueuedbuildingreadyfailedcanceled

branchstringRequired

Branch the run built.

commit_shastring

Commit that was built, when known.

commit_messagestring

Commit message or label.

trigger_actorstring

Who started the run. For manual runs, the username (or email) of the member who made the request; for pushes and pull requests, the GitHub login.

trigger_actor_urlstring

Link to the actor's profile, when known.

image_digeststring

Digest of the built image. Omitted when the run has no image (failed, or deleted).

artifact_size_bytesinteger

Size of the stored image in bytes. Omitted when unknown or deleted.

created_atstring (date-time)Required

When the run was queued.

started_atstring (date-time)

When work began.

finished_atstring (date-time)

When the run finished.

last_failurestring

Readable reason the run failed.

security_scanobject

Vulnerability scan of the run's image. Present when scanning is enabled.

Show attributes
uidstringRequired

Unique identifier of the scan.

statusstringRequired

warning when critical or high findings exist. failed when the scan itself failed.

One ofqueuedscanningpassedwarningfailednot_scanned

critical_countintegerRequired

Critical findings.

high_countintegerRequired

High findings.

medium_countintegerRequired

Medium findings.

low_countintegerRequired

Low findings.

unknown_countintegerRequired

Findings of unknown severity.

scannerstring

Scanner used.

started_atstring (date-time)

When the scan started.

finished_atstring (date-time)

When the scan finished.

scanned_atstring (date-time)

Same as finished_at.

vulnerabilitiesarray of objects

Individual findings. Only returned by Get a deployment run.

Show item attributes
idstringRequired

Vulnerability ID, such as a CVE.

severitystringRequired

Severity reported by the scanner, such as CRITICAL, HIGH, MEDIUM, LOW or UNKNOWN.

package_namestringRequired

Affected package.

installed_versionstring

Installed version.

fixed_versionstring

First version with a fix, if any.

titlestring

Short title.

descriptionstring

Longer description.

sourcestring

Where the package was found, such as the OS release or a lockfile.

advisory_urlstring

Link to the advisory.

statusstringRequired

Status of the operation (queued for a new request; the original operation's status, such as running or succeeded, on a replay). Without an operation, the deployment status on create or completed on a plan change.

events_urlstring

Path of the server-sent events stream with the operation's progress. Omitted without an operation.

is_replaybooleanRequired

true when an X-Idempotency key was reused and the original operation is returned instead of a new one.

is_completedboolean

true when a replayed operation has already finished. Omitted unless true.

Errors

StatusMeaning
400invalid request (no or malformed JSON body), or Connect GitHub before deploying this repository.
401The API key is missing, invalid, expired or revoked.
402The account is past due, so new paid resources cannot be created.
403You cannot access the workspace, your role does not allow this action, or the account is suspended.
404The resource does not exist or you cannot access it.
409The X-Idempotency key was already used for a different action or a different resource. Send a new key.

Errors use the standard error format.