---
title: "Get project machine grant"
method: GET
path: "/orgs/{orgID}/projects/{projectID}/machine-grants/{grantID}"
tags: ["Machines"]
---

# Get project machine grant

`GET /orgs/{orgID}/projects/{projectID}/machine-grants/{grantID}`

## Request

- Base URL: `https://api.omnara.com/v1`
- URL: `https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/machine-grants/{grantID}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-omnara_session`

Returns one explicit machine grant with its machine. Pool-derived machine access is managed through project machine pool grants.

## Path parameters

- `orgID` string, required
- `projectID` string, required
- `grantID` string, required

## Response `200`

The machine grant and its machine.

- CreateProjectMachineGrantResponse
  - `grant` ProjectMachineGrant, required
    - `id` string, required: Identifies the machine grant.
    - `org_id` string, required: Organization that owns the grant.
    - `project_id` string, required: Project the grant gives access to.
    - `machine_id` string, required: Machine the project's agents may use.
    - `source_kind` 'explicit' | 'pool', required: Whether the grant was made directly or created for a machine from a pool grant.
    - `project_machine_pool_grant_id` string, nullable
    - `description` string, required: Free-form note about the grant; empty if none was set.
    - `metadata` Metadata, required: Key-value metadata attached to the grant.
    - `created_at` string, date-time, required: When the grant was created.
    - `updated_at` string, date-time, required: When the grant last changed.
  - `machine` Machine, required
    - `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-11-06** `63a75cbc7e95`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omnara/apis/omnara-api-2/changes/orgs/:orgID/projects/:projectID/machine-grants/:grantID/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)
