Skip to content

Get a VM

GET/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

uidstringRequired

The VM's uid.

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 VM.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
Show 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.

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.
404The resource does not exist or you cannot access it.

Errors use the standard error format.