Skip to main content
GET
Get Machine

Authorizations

Authorization
string
header
required

A Fly API token with access to the requested organization or resource. Send it as Authorization: Bearer <Fly API token>.

Path Parameters

app_name
string
required

Fly App Name

machine_id
string
required

Machine ID

Query Parameters

version
string

26-character Machine version ID; returns that version of the Machine instead of the current one

include_leases
boolean

Include machine lease

Response

200 - application/json

OK

checks
object[]

Status of each health check: the Machine's top-level checks and its services' checks.

config
object

The Machine's configuration, as provided when it was created or last updated, with metadata and mounts reflecting their current values. Null when the host is not reachable (host_status is not ok) or summary=true was requested; see incomplete_config.

cordoned
boolean

Whether the Machine is cordoned, meaning Fly Proxy does not route requests to it. See the Cordon Machine endpoint.

created_at
string

When the Machine was created.

events
object[]

Up to 5 of the most recent events of the current Machine version, newest first. Use the List Events endpoint for more.

host_features
string[]

Features of the Machine's host, for comparison with config.guest.required_host_features. Only returned when the request sets the fly-include-host-features: true header.

host_status
enum<string>

Whether Fly.io could reach the Machine's host: ok if it could, unreachable if it could not, in which case the response is built from last known state. unknown if the host's status was not reported.

Available options:
ok,
unknown,
unreachable
id
string

Unique ID of the Machine.

image_ref
object

The image the Machine runs, as resolved when it was last created or updated.

incomplete_config
object

Last known configuration, returned in place of config when the host could not be reached (host_status is not ok) or when listing Machines with summary=true. It comes from Fly.io's replicated state rather than the host, so it may be stale or lack fields.

instance_id
string

Same value as version.

Deprecated: use version.

lease
object

The lease currently held on the Machine. Only returned when include_leases=true was requested and a lease is held.

name
string

Name of the Machine. Generated when not provided at creation. Names are not required to be unique.

nonce
string

Nonce of the lease acquired on the Machine at creation. Only returned when creating a Machine with lease_ttl set. Pass it in the fly-machine-lease-nonce header to act on the Machine while the lease is held.

private_ip
string

The Machine's address on the organization's private (6PN) IPv6 network.

region
string

Code of the region the Machine runs in, such as iad.

state
string

Current state of the Machine, taken from the status of its most recent event. One of created, starting, started, stopping, stopped, suspending, suspended, replacing, replaced, destroying, destroyed, failed, migrating, migrated, archived, or pending. See https://fly.io/docs/machines/machine-states/.

updated_at
string

Time of the Machine's most recent event, truncated to whole seconds. The zero time (0001-01-01T00:00:00Z) if the host could not be reached. With summary=true, the time Fly.io last recorded a change to the Machine.

version
string

Unique ID of this version of the Machine. Every update creates a new version. Pass it as current_version when updating the Machine to reject the update if the Machine has changed since this version.