/v1/vms/{uid}Returns one VM, including its plan, image, app URL, SSH keys and the latest root disk usage reported by the guest agent.
Authentication
Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.
Path parameters
uidstringRequiredThe VM's uid.
Headers
X-Workspace-SlugstringRequiredSlug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.
Response
The VM.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide 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.
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. |
404 | The resource does not exist or you cannot access it. |
Errors use the standard error format.