EndpointsGet machine

machines

Get machine

Returns a machine by ID.

GET/machines/{id}
Authorizationstringheaderrequired

Bearer token for the authenticated caller.

Optional workspace/scope context for the request. Carries a single workspace wire id (ws_…) today. Only needed for broad tokens - a workspace-owned token implies its workspace.

Required string length: 1 - 53

Example: "ws_j572abc123def4"

idstringrequired

Required string length: 3 - 54

Response

application/json

Machine details

idstringrequired

Required string length: 3 - 54

workspace_idstringrequired

Required string length: 2 - 53

region_idstringrequired

Required string length: 3 - 54

locationstringrequired

Maximum string length: 32

machine_typestringrequired

Pattern: ^[a-z][a-z0-9-]{0,31}$

Example: "cx23"

imageenum<string>required

Available options: ubuntu-24.04

labelsrecord<string, string>required

Maximum object length: 32 entries

Key pattern: ^[a-z][a-z0-9_-]{0,62}$

Example: {"team":"web"}

namestring | nullrequired

Maximum string length: 120

provider_idstring | nullrequired

The server at its provider (hcloud://<server id>); null until the provider created it.

Example: "hcloud://1234"

ipv4string | nullrequired
ipv6string | nullrequired
stateenum<string>required

Machine lifecycle state.

Available options: PROVISIONING, RUNNING, SUSPENDING, SUSPENDED, RESTORING, EXPIRED, DELETING, FAILED

conditionsobject[]required

What needs attention now; empty when nothing does. Reasons:

  • bootstrap-progress (info): the latest guest-reported stage and report time. If progress stalls, this remains the last observation, not a readiness claim.
  • bootstrap-failed (error): guest bootstrap failed at the named step with its exit code. Provider state may remain RUNNING; no automatic replacement occurs.
  • trial-ended (warning): the free trial is over and the Machine is SUSPENDED; upgrade to Pro while its snapshot is retained to restore it. Remedy upgrade-plan.
  • trial-data-expired (warning): the snapshot expired or was deleted. No server can be restored from it; a Pro upgrade still succeeds.
  • RESTORING waits for the replacement server to run and, for a pool Machine, its node to join; only then is the snapshot removed.
  • When state is FAILED, one error whose reason says why: capacity-unavailable, provider-refused, provider-unavailable or abandoned. Its server and capacity were already released.

Maximum array length: 32 elements

child attributes
conditions.reasonstringrequired

Kebab-case reason; the resource documents the reasons it reports.

Maximum string length: 64

Pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$

Example: "agent-offline"

conditions.severityenum<string>required

error: the resource failed; the condition says why. warning: it is limited or held until the person acts or it recovers. info: worth knowing, nothing to do.

Available options: error, warning, info

conditions.messagestringrequired

Safe to show the person as is.

Maximum string length: 512

conditions.remedyobject | nullrequired

What the person can do; null when nothing they do helps.

conditions.remedy.kindenum<string>required

Available options: free-capacity

conditions.remedy.metricenum<string>required

Available options: kaas/clusters, compute/machines, compute/cpu, compute/memory, compute/machines_concurrency, compute/managed_vm_trial, agents/turns_concurrency, agents/sandboxes, agents/sandboxes_running, agents/retained_filesystem_lifetime, codemode/executions, api/secrets_access, api/secrets_write, domain_routing/preview_hostnames, domain_routing/custom_domains, source_control/repositories

Maximum string length: 256

Unix timestamp (seconds) when this condition last changed.

Required range: x >= 0

trialobject | nullrequired
child attributes
trial.pauses_atinteger | nullrequired

When the free trial Machine pauses; null until it runs. Unix timestamp (seconds)

Required range: 0 <= x <= 9007199254740991

created_bystring | nullrequired

The service that created it (service:cluster for a node pool), which also deletes it; null when a person did.

Pattern: ^service:[\s\S]*?$

operation_idstringrequired

The latest Operation: the create, or the deletion.

Required string length: 2 - 192

created_atintegerrequired

Unix timestamp (seconds)

Required range: 0 <= x <= 9007199254740991

updated_atintegerrequired

Unix timestamp (seconds)

Required range: 0 <= x <= 9007199254740991

etagstringrequired