/v1/vmsReturns 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
pageintegerPage number, starting at 1. Values below 1 (or non-numbers) are treated as 1. Sending this enables pagination.
min 1
page_sizeintegerItems per page. Defaults to 10. Values above 100 are capped at 100. Sending this enables pagination.
Default 10min 1 · max 100
qstringCase-insensitive substring search across the VM's name, slug, private IP, app hostname, status and display status. Only applied when paginating.
Headers
X-Workspace-SlugstringRequiredSlug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.
Response
The workspace's VMs. pagination is only present when page or page_size was sent.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataarray of objectsShow item attributesHide item attributes
uidstringRequiredUnique identifier of the VM.
namestringRequiredDisplay name of the VM.
slugstringRequiredURL-safe form of the name. Unique among the workspace's VMs.
kindstringRequiredephemeral VMs are deleted when they expire at expires_at. persistent VMs run until you delete them.
One ofpersistentephemeral
statusstringRequiredLifecycle state of the VM.
One ofprovisioningrunningstoppedsuspendeddeletingdeletedfailed
desired_statusstringRequiredLifecycle state of the VM.
One ofprovisioningrunningstoppedsuspendeddeletingdeletedfailed
actual_statusstringRequiredLifecycle state of the VM.
One ofprovisioningrunningstoppedsuspendeddeletingdeletedfailed
display_statusstringRequiredLifecycle state of the VM.
One ofprovisioningrunningstoppedsuspendeddeletingdeletedfailed
plan_slugstringSlug of the VM's compute plan.
vcpuintegerVirtual CPUs from the VM's plan.
memory_mibintegerMemory in MiB from the VM's plan.
image_slugstringSlug of the image the VM was created from.
image_namestringDisplay name of the image.
desktopbooleanPresent and true when the VM runs a desktop image.
zone_slugstringRequiredZone the VM runs in.
private_ipstringPrivate IP address in the VM's VPC. Omitted until assigned.
guest_usernamestringRequiredUser to log in as over SSH. root for VMs created from an image.
disk_gibintegerRequiredProvisioned root disk size in GiB.
app_namestringName of the VM's default app route. Omitted if HTTP access is not configured.
app_hostnamestringPublic hostname of the VM's app URL. Point a custom domain's CNAME here.
app_urlstringPublic HTTPS URL that forwards to app_port on the VM.
app_portintegerPort on the VM that app_url forwards to. Defaults to 8080.
expires_atstring (date-time)When an ephemeral VM expires. Omitted for persistent VMs.
usageobjectRoot filesystem (/) usage reported by the guest agent. Omitted until the first sample arrives.
Show attributesHide attributes
total_bytesintegerRequiredSize of the root filesystem in bytes.
used_bytesintegerRequiredBytes in use.
available_bytesintegerRequiredBytes free.
used_percentnumberRequiredPercentage of the filesystem in use.
sampled_atstring (date-time)RequiredWhen the sample was taken.
stalebooleanRequiredtrue when the sample is more than two minutes old.
ssh_keysarray of objectsSSH keys installed on the VM. Omitted when there are none.
Show item attributesHide item attributes
uidstringRequiredUnique identifier of the SSH key.
namestringRequiredLabel of the SSH key.
fingerprintstringRequiredSHA256 fingerprint of the public key.
created_atstring (date-time)RequiredWhen the key was added.
created_atstring (date-time)RequiredWhen the VM was created.
paginationobjectPaging details. Only present when page or page_size was sent.
Show attributesHide attributes
pageintegerRequiredCurrent page number.
page_sizeintegerRequiredItems per page.
totalintegerRequiredTotal number of matching items.
total_pagesintegerRequiredTotal number of pages.
Errors
| Status | Meaning |
|---|---|
400 | The request was malformed or failed validation. |
401 | The API key is missing, invalid, expired or revoked. |
403 | You cannot access the workspace, your role does not allow this action, or the account is suspended. |
Errors use the standard error format.