Autoscaling group API

Autoscaling group API

Manage bounded replica targets and inspect pending capacity and disruption blockers.

Autoscaling groups own a set of template-created droplets and a desired replica target. Group write permission does not bypass child-resource admission.

POST/organizations/{organization_id}/projects/{project_id}/autoscaling-groups
Scope
autoscaling:write
Auth
Bearer API key

Creates an autoscaling group with bounded replica targets.

Send name, pinned template revision, region, required deployment inputs, minimum and maximum replicas, and metric policy. Bounds are non-negative integers with minimum no greater than maximum. Zero minimum requires an independent supported scale-from-zero metric.

To keep 2 to 8 worker replicas at a target CPU utilization of 65%, send:

JSON
{
  "name": "payments-workers",
  "template_revision_id": "trv_workers_4",
  "region_id": "reg_euwest",
  "min_replicas": 2,
  "max_replicas": 8,
  "inputs": { "interfaces": [{ "network_id": "net_production" }] },
  "metric_policy": { "metric": "droplet.cpu.utilization", "target": 0.65 },
  "paused": false
}

Returns 202 with group ID and reconciliation operation. Invalid metric units, missing template inputs, or unsupported policies return 422.

Read and edit

GET/organizations/{organization_id}/projects/{project_id}/autoscaling-groups/{group_id}
Scope
autoscaling:read
Auth
Bearer API key

Returns desired, ready, pending-create, pending-remove counts, owned member IDs, metric evaluation, blockers, and ETag. Requires autoscaling:read. Unknown metrics prevent destructive scale-down rather than becoming zero load.

PATCH/organizations/{organization_id}/projects/{project_id}/autoscaling-groups/{group_id}
Scope
autoscaling:write
Auth
Bearer API key

Updates autoscaling bounds, policy, paused state, or the template for future members.

Requires If-Match. Updates bounds, metric policy, paused state, or the template for new members. Supplied nested objects replace their full value. Existing members are not replaced merely because the template changed.

Manual target

POST/organizations/{organization_id}/projects/{project_id}/autoscaling-groups/{group_id}/scale
Scope
autoscaling:write
Auth
Bearer API key

Requests a temporary override of the desired replica count.

Accepts desired replica count within bounds and a required override duration permitted by policy. Accepted work returns 202. On override expiry, automatic evaluation can choose another count.

Scale-in respects required drain and protection.

DELETE/organizations/{organization_id}/projects/{project_id}/autoscaling-groups/{group_id}
Scope
autoscaling:write
Auth
Bearer API key

Deletes an autoscaling group under an explicit member-retention or removal plan.

Group deletion requires a reviewed member-retention or removal plan and cannot silently discard stateful members. See autoscaling, spend caps, and rolling replacement.