Change a service's number of replicas without a new deployment: 1 or more, with no maximum. Replicas that don't fit on the servers wait until there's room, and the response's warning says so.
API key access: deploy.
apiKeyAuthorizationBearer <pyo_…>An API key from the dashboard's API keys page: Authorization: Bearer pyo_…. Keys can expire, and an expired one gets a 401.
application/jsonChange a service's number of replicas without a new deployment: 1 or more, with no maximum. Replicas that don't fit on the servers wait until there's room, and the response's warning says so.
API key access: deploy.
op*"scaleService""scaleService"id*stringreplicas*integerint32confirm?booleanGo ahead with a very large replica change: without it, one that goes to 20 or more replicas and to more than 10 times what the service had, or more than twice what its servers have room for, is refused with 409 and needsConfirm: true. Ask the user before sending it.
Done. Always ok: true, and some operations add more, such as a new API key or a join command. A warning comes with a change that went through but won't fully take effect yet, such as more replicas than the servers have room for.
application/jsoncurl -X POST 'https://your-pyo.example.com/api/v1/ops' \
-H 'Content-Type: application/json' \
-d '{
"id": "svc_8kq2x7ad",
"op": "scaleService",
"replicas": 3
}'{}