Skip to content

List VMs

GET/v1/vms

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

Without query parameters, every VM 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 VM's name, slug, private IP, app hostname, status and display 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 VMs. 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 VM.

namestringRequired

Display name of the VM.

slugstringRequired

URL-safe form of the name. Unique among the workspace's VMs.

kindstringRequired

ephemeral VMs are deleted when they expire at expires_at. persistent VMs run until you delete them.

One ofpersistentephemeral

statusstringRequired

Lifecycle state of the VM.

One ofprovisioningrunningstoppedsuspendeddeletingdeletedfailed

desired_statusstringRequired

Lifecycle state of the VM.

One ofprovisioningrunningstoppedsuspendeddeletingdeletedfailed

actual_statusstringRequired

Lifecycle state of the VM.

One ofprovisioningrunningstoppedsuspendeddeletingdeletedfailed

display_statusstringRequired

Lifecycle state of the VM.

One ofprovisioningrunningstoppedsuspendeddeletingdeletedfailed

plan_slugstring

Slug of the VM's compute plan.

vcpuinteger

Virtual CPUs from the VM's plan.

memory_mibinteger

Memory in MiB from the VM's plan.

image_slugstring

Slug of the image the VM was created from.

image_namestring

Display name of the image.

desktopboolean

Present and true when the VM runs a desktop image.

zone_slugstringRequired

Zone the VM runs in.

private_ipstring

Private IP address in the VM's VPC. Omitted until assigned.

guest_usernamestringRequired

User to log in as over SSH. root for VMs created from an image.

disk_gibintegerRequired

Provisioned root disk size in GiB.

app_namestring

Name of the VM's default app route. Omitted if HTTP access is not configured.

app_hostnamestring

Public hostname of the VM's app URL. Point a custom domain's CNAME here.

app_urlstring

Public HTTPS URL that forwards to app_port on the VM.

app_portinteger

Port on the VM that app_url forwards to. Defaults to 8080.

expires_atstring (date-time)

When an ephemeral VM expires. Omitted for persistent VMs.

usageobject

Root filesystem (/) usage reported by the guest agent. Omitted until the first sample arrives.

Show attributes
total_bytesintegerRequired

Size of the root filesystem in bytes.

used_bytesintegerRequired

Bytes in use.

available_bytesintegerRequired

Bytes free.

used_percentnumberRequired

Percentage of the filesystem in use.

sampled_atstring (date-time)Required

When the sample was taken.

stalebooleanRequired

true when the sample is more than two minutes old.

ssh_keysarray of objects

SSH keys installed on the VM. Omitted when there are none.

Show item attributes
uidstringRequired

Unique identifier of the SSH key.

namestringRequired

Label of the SSH key.

fingerprintstringRequired

SHA256 fingerprint of the public key.

created_atstring (date-time)Required

When the key was added.

created_atstring (date-time)Required

When the VM was created.

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
400The request was malformed or failed validation.
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.