Skip to content

List volumes

GET/v1/volumes

Returns the workspace's volumes, newest first. Deleted volumes are not included.

Without query parameters, every volume is returned in data. Send page or page_size to paginate. A top-level pagination object is then added next to data, and q filters the results. q is ignored unless page or page_size is present.

Authentication

Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.

Query parameters

pageinteger

Page number, starting at 1. Values below 1 (or non-numbers) are treated as 1. Sending this enables pagination.

min 1

page_sizeinteger

Items per page. Defaults to 10. Values above 100 are capped at 100. Sending this enables pagination.

Default 10min 1 · max 100

qstring

Case-insensitive substring search across the volume's name, slug, filesystem, attached VM UID and status. Only applied when paginating.

Headers

X-Workspace-SlugstringRequired

Slug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.

Response

200

The workspace's volumes. pagination is only present when page or page_size was sent.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataarray of objects
Show item attributes
uidstringRequired

Unique identifier of the volume.

namestringRequired

Display name of the volume.

slugstringRequired

URL-friendly form of the name. Not necessarily unique.

descriptionstring

Free-text description. Omitted when empty.

statusstringRequired

Lifecycle state. available volumes can be attached, in-use volumes are attached to the VM in vm_uid. failed means creating or deleting the volume failed. See last_failure. deleted only appears in an idempotent replay of a delete.

One ofcreatingavailableattachingin-usedetachingdeletingdeletedfailed

zone_slugstringRequired

Zone the volume lives in.

size_gibintegerRequired

Size of the volume in GiB.

filesystemstringRequired

Filesystem the volume is formatted with.

One ofext4xfs

formattedbooleanRequired

true once the volume has been formatted, which happens on its first successful attach.

vm_uidstring

UID of the VM the volume is attached to or being attached to. Omitted when detached.

vm_namestring

Name of that VM. Omitted when detached or when the VM cannot be found.

device_namestring

Block device inside the VM, as reported by the guest agent. Omitted until reported.

mount_pathstring

Where the volume is mounted inside the VM, under /mnt/rumpty/, as reported by the guest agent. Omitted until reported.

usageobject

Filesystem usage reported by the VM's guest agent. Omitted until the agent has reported a sample for the mounted volume. The last sample is kept after the volume is detached.

Show attributes
total_bytesintegerRequired

Filesystem size in bytes.

used_bytesintegerRequired

Bytes in use.

available_bytesintegerRequired

Bytes still available.

used_percentnumberRequired

Percentage of the filesystem in use.

sampled_atstring (date-time)Required

When the sample was taken.

stalebooleanRequired

true when the sample is older than the agent's normal reporting interval.

created_atstring (date-time)Required

When the volume was created (RFC 3339).

attached_atstring (date-time)

When the volume was last attached. Omitted if it has never been attached. Kept after the volume is detached.

detached_atstring (date-time)

When the volume was last detached. Omitted if it has never been detached or was attached again since.

last_failurestring

Reason for the last failed operation on the volume. Omitted when there is none.

paginationobject

Paging details. Only present when page or page_size was sent.

Show attributes
pageintegerRequired

Current page number.

page_sizeintegerRequired

Items per page.

totalintegerRequired

Total number of matching items.

total_pagesintegerRequired

Total number of pages.

Errors

StatusMeaning
401The API key is missing, invalid, expired or revoked.
403You cannot access the workspace, your role does not allow this action, or the account is suspended.

Errors use the standard error format.