Scale services up or down
POST
/apps/{slug}/scale
const url = 'https://your-server.example/api/apps/example/scale';const options = { method: 'POST', headers: {cookie: 'session=<session>', 'Content-Type': 'application/json'}, body: '{"scales":{"web":3,"worker":2}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-server.example/api/apps/example/scale \ --header 'Content-Type: application/json' \ --cookie session=<session> \ --data '{ "scales": { "web": 3, "worker": 2 } }'Set replica counts for one or more services. Returns 400 if any named service is non-scalable (stateful image, host port binding, named volume, deploy.mode=global, or simpledeploy.scalable=false label).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”slug
required
string
App slug (lowercase, dash-separated).
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
scales
required
object
key
additional properties
integer
Example
{ "web": 3, "worker": 2}Responses
Section titled “Responses”Scale applied.
Invalid request.
Media typetext/plain
string