Skip to content

Update a deployment

PATCH/v1/deployments/{uid}

Changes a deployment's settings. Send only the fields you want to change.

Settings are saved immediately but most only take effect on the next build or deploy (a manual deploy or a git push). Changing artifact_retention deletes older build images right away. Turning scale-to-zero off wakes a sleeping (idle) deployment's status back to active.

Rules enforced:

  • A persistent volume can be added, and its size can only grow. Once created it cannot be removed. A volume limits the app to one replica and is incompatible with preview apps.
  • Scale-to-zero needs min_replicas of 1. Free plans always scale to zero and run one replica, so sending scale_to_zero_enabled: false on a Free plan is rejected.
  • Component deployments of one-click apps cannot scale to zero.
  • Preview apps need a GitHub repository (git_repo_full_name).
  • For GitHub App repositories, a changed branch or root_directory is checked against the repository.

To change the plan, use Change a deployment plan. The response is the updated deployment without last_run_status, so display_status equals status.

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.

Request body

branchstring

Branch to build. Cannot be empty.

root_directorystring

Folder inside the repository to build from. Must be relative and stay inside the repository. Empty builds from the root.

app_typestring

service or static (aliases backend, api, frontend and web are accepted).

One ofservicestatic

build_commandstring

Build command override. Send an empty string to clear it.

start_commandstring

Start command override. Send an empty string to clear it.

health_check_pathstring

Health check path. Must start with /. Empty resets it to /.

portinteger

Port your app listens on. Must be positive.

min 1

auto_deploy_enabledboolean

Build and deploy automatically on every push to the branch.

security_scan_enabledboolean

Scan built images for vulnerabilities.

preview_apps_enabledboolean

Create a preview app for each pull request.

artifact_retentioninteger

How many built images to keep for rollbacks. 0 keeps all. The live image and in-flight runs are never pruned.

min 0 · max 50

volume_mount_pathstring

Absolute mount path of the persistent volume. Same rules as on create.

volume_size_gibinteger

Volume size in GiB. Can only grow.

min 1 · max 512

scale_to_zero_enabledboolean

Let the app sleep when idle.

scale_to_zero_idle_minutesinteger

Idle minutes before the app sleeps. 0 means 5.

min 1 · max 1440

min_replicasinteger

Instances always running.

min 1 · max 5

max_replicasinteger

Autoscaling upper bound.

min 1 · max 5

target_request_rateinteger

Requests per second per replica before scaling out.

min 1 · max 10000

Response

200

The updated deployment.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
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.

Errors

StatusMeaning
400Validation failed. Examples: invalid request, branch is required, invalid port number, artifact_retention must be between 0 (keep all) and 50, connect GitHub before enabling preview apps, the persistent volume cannot be removed once created, volume size can only grow: this deployment already has 10 GiB, min_replicas cannot exceed max_replicas, one-click apps cannot scale to zero; they stay always on.
401The API key is missing, invalid, expired or revoked.
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.

Errors use the standard error format.