---
title: "Get machine"
method: GET
path: "/orgs/{orgID}/machines/{machineID}"
tags: ["Machines"]
---

# Get machine

`GET /orgs/{orgID}/machines/{machineID}`

## Request

- Base URL: `https://api.omnara.com/v1`
- URL: `https://api.omnara.com/v1/orgs/{orgID}/machines/{machineID}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-omnara_session`

Returns one active machine's full record: connection state, execution defaults (secret IDs only, never values), metadata, and the latest failure report. Machines in other lifecycle states, such as pool machines still provisioning, aren't returned.

## Path parameters

- `orgID` string, required
- `machineID` string, required

## Response `200`

Machine.

- Machine
  - `id` string, required: Identifies the machine.
  - `org_id` string, required: Organization that owns the machine.
  - `source_kind` 'byo' | 'pool', required: Whether the machine is a bring-your-own computer or was created from a machine pool.
  - `machine_pool_id` string, nullable: Machine pool ID (mpo_...).
  - `display_name` string, required: Machine name; agent configs reference a BYO machine by this as machine_name.
  - `description` string, required: Free-form note about the machine; empty if none was set.
  - `provider` string, required: Sandbox provider that hosts a pool machine; byo for bring-your-own machines.
  - `lifecycle_state` 'provisioning' | 'provision_failed' | 'active' | 'deleting' | 'delete_failed' | 'deleted', required: Where the machine is in provisioning or deletion, independent of whether its daemon is connected.
  - `connection_state` 'online' | 'asleep' | 'offline', required: Whether the machine's daemon is connected now; asleep means suspended but able to be woken.
  - `connection_state_reason` string: Why the machine's latest daemon session ended, such as daemon_lease_expired.
  - `last_observed_at` string, date-time, nullable, required
  - `cwd` string, required: Default working directory for processes started on the machine.
  - `env` object, required: Environment variables set for every process started on the machine.
  - `secret_env` object, required: Environment variable names mapped to secrets whose values are injected when processes start.
  - `lifecycle_reason_code` string, required: Machine-readable reason for the latest lifecycle change, such as idle_timeout; empty when none.
  - `lifecycle_reason_message` string, required: Human-readable detail for lifecycle_reason_code; empty when none.
  - `failure_report` MachineFailureReport: Latest setup or daemon failure reported from the machine; omitted when none is recorded.
    - `stage` 'startup_script' | 'daemon_install' | 'daemon_update' | 'daemon_runtime' | 'daemon_uninstall' | 'daemon_uninstalled', required: Setup or daemon step that failed.
    - `exit_status` integer: Exit status of the failed startup script or daemon install; omitted for other stages.
    - `output_tail` string, required: End of the failed step's output, for diagnosis.
    - `output_truncated` boolean, required: True when earlier output was dropped or output capture failed.
    - `daemon_version` string: Daemon version that was running when a daemon update failed.
    - `target_version` string: Version the daemon was trying to update to when the update failed.
    - `reported_at` string, date-time, required: When the failure was reported.
  - `next_reconcile_after` string, date-time, nullable, required
  - `provision_attempts` integer, required: Number of times Omnara has tried to provision this machine.
  - `delete_attempts` integer, required: Number of times Omnara has tried to delete this machine.
  - `metadata` Metadata, required: Key-value metadata attached to the machine.
  - `deleted_at` string, date-time, nullable, required
  - `created_at` string, date-time, required: When the machine record was created.
  - `updated_at` string, date-time, required: When the machine record last changed.

## Other responses

- `400`: The request was invalid.
- `401`: Authentication is required or invalid.
- `403`: The authenticated principal is not authorized.
- `404`: The requested resource was not found or is not visible.
- `409`: The request conflicts with current resource state or idempotency history.
- `503`: The service dependency required to satisfy the request is unavailable.
- `4XX`: Any other client error. The body carries the shared Error envelope restricted to client error codes; statuses with a dedicated response above are documented precisely.
- `5XX`: Any other server error. The body carries the shared Error envelope restricted to server error codes.

## Changes

- **2026-10-05** `3d9e2cf46e07`: 159 info
  - added the optional property `current_digest` to the response with the `400` status
  - added the optional property `current_digest` to the response with the `401` status
  - added the optional property `current_digest` to the response with the `403` status
  - added the optional property `current_digest` to the response with the `404` status
  - …155 more
  - …this revision’s changelog is incomplete
- **2026-09-28** `acddeb8fc6a5`: 7 warning, 7 info
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `400`
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `401`
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `403`
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `404`
  - …10 more
- **2026-09-17** `eab8138e750d`: 1 warning
  - added the new `daemon_runtime` enum value to the `failure_report/stage` response property for the response status `200`
- **2026-09-01** `e4978b047d7a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omnara/apis/omnara-api-2/changes/orgs/:orgID/machines/:machineID/get.md)

---

[API](https://skmtc.dev/omnara/apis/omnara-api-2.md) - [All operations](https://skmtc.dev/omnara/apis/omnara-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/omnara/apis/omnara-api-2/revisions/343aebb1dff1?raw)
