Volumes
Persistent volume CRUD.
Volumes are named, persistent directory trees that survive independently of any sandbox and can be attached to sandboxes at create time. A volume is ready immediately on create — there is no provisioning wait. See the Volumes guide.
POST /volumes
Create a volume. Names are unique per project among non-deleted volumes.
Request
| Field | Type | Required / default | Description |
|---|---|---|---|
name | string | required | 1–128 chars of [A-Za-z0-9._-]. |
type | string | "blockmount" | Volume type; only "blockmount" is supported. |
size_gb | int | 100 | Attached filesystem size in GiB, 1–10000. |
Errors
400— invalidname, unsupportedtype, orsize_gbout of range.409— a volume with this name already exists.
GET /volumes
List the project's volumes, newest first.
| Query param | Type | Default | Description |
|---|---|---|---|
include_deleted | bool | false | Also return retired (deleted) volumes. |
used_bytes is the logical committed usage and is absent until the volume has been written at least once. Optional fields (error_reason, last_used_at, used_bytes, used_bytes_at) are omitted when unset.
GET /volumes/:id_or_name
Fetch one volume by UUID or name. The detail view also includes, when available, last_manifest_id (the latest committed version pointer) and conflicts (an audit trail of concurrent-write conflicts).
Errors
400— the ref matches one volume's id and a different volume's name (ambiguous).404— no matching volume.
DELETE /volumes/:id_or_name
Retire a volume. Deletion is refused while any live sandbox has it attached. The volume's name is immediately reusable (the retired row is renamed <name>-deleted).
Errors
404— no matching volume (or already deleted).409— the volume is attached to a sandbox; delete or stop it first.
Attaching
Attach volumes at sandbox creation via the volumes array on POST /vms:
Rules (validated at create, 400/409 on violation):
volumeis a volume id or name; it must beready.mount_pathmust be absolute, contain no.., not duplicate another mount, and not be one of the reserved paths (/,/proc,/sys,/dev,/overlay,/mnt/scratch).subpath(optional) mounts a subdirectory of the volume.- At most 8 volumes per sandbox.
A sandbox with volumes always cold-boots, and volumes block pause and fork. See Using Volumes for sharing and consistency semantics.