Change a sandbox's vCPUs, memory or disk by restarting it, keeping its whole disk. Running programs stop.
Works on a running sandbox (stopped first if persistent, paused first otherwise), a paused one, or a stopped one. It keeps the whole disk (every file, installed package and setting), volumes, environment, labels, name, previews and ports. Every running program stops: a running sandbox is stopped first, and a paused one's saved memory is discarded, so it starts fresh from its disk. It stays on its server: no_capacity means that server has no room for the new size now, and nothing changed. A disk only grows (disk_shrink otherwise), and its filesystem fills the new size at the restart. Charged as a wake or a restart, at the new size and the same rates. Send Prefer: wait=N (seconds, at most 120) to get the answer once the sandbox has settled; the SDKs do.
Request
- Base URL: https://api.withruntime.com
- URL: https://api.withruntime.com/v1/sandboxes/{id}:resize
- Auth: HTTP bearer
Path parameters
Resource identifier (UUID).
Headers
Replaying the same key with the same request within 24 hours returns the first result and never repeats the effect. A refusal is not kept: a request refused before it ran (no_capacity, busy, a limit) runs afresh when sent again with its key. The SDKs send one automatically; the server makes one when absent and returns it in the idempotency-key response header.
Request body
Response
Success
Changes
No recorded changes to this operation across all 1 revision of this API.