PUT
Scale a worker

Authorizations

Authorization
string
header
required

Bearer token for authentication. Format: 'Bearer {token}'

Headers

X-Workspace-Id
string

Workspace ID (uses default workspace if not provided)

Path Parameters

uuid
string
required

Application UUID

name
string
required

The worker's name, as GET /api/v1/apps/{uuid} lists it under workers

Body

application/json

Scale a worker

replicas
integer<int32>

Fixed number of replicas (ignored when auto-scaling is enabled)

auto_scaling_enabled
boolean

Scale the worker between auto_min_replicas and auto_max_replicas on its CPU or memory use

auto_min_replicas
integer<int32>

Minimum number of replicas when auto-scaling, at least 1: autoscaling a worker to none is refused with 422

auto_max_replicas
integer<int32>

Maximum number of replicas when auto-scaling

cpu_threshold
integer<int32>

CPU usage percentage that triggers scale-up (1-100)

memory_threshold
integer<int32>

Memory usage percentage that triggers scale-up (1-100)

period_enabled
boolean

false clears the daily window

scaling_start_time
string

Start of the daily window in which it scales up to auto_max_replicas (HH:MM, 24-hour, UTC)

scaling_end_time
string

End of that window (HH:MM, 24-hour, UTC)

Response

Scale a worker

Api_V1_Entities_Worker model

name
string
required

The process's name in the Procfile, lowercased, with anything but letters, digits and dashes turned into a dash (sidekiq, clock). A Procfile's unnamed worker is worker

state
enum<string>
required

running while it runs a replica or more, stopped at zero replicas, failed when the cluster reported it failing

Available options:
running,
stopped,
failed
replicas
integer<int32>
required

Replicas the cluster reports it running, or what it was last scaled to until the cluster reports that; the minimum while it autoscales. app.json's formation quantity sets them on every deploy

quota
object
required

Its size, in the same shape and units as the application's quota: its own when app.json's formation gives it a size, the application's otherwise