Machines

Update machine execution defaults

Changed on

Updates a machine's execution defaults: working directory, environment variables, and secret environment variables. env and secret_env replace the whole map, and changes apply to processes started afterward.

patch/orgs/{orgID}/machines/{machineID}

Request

  • Base URL
    https://api.omnara.com/v1
  • Auth
    • HTTP bearer
    • or API key in cookie __Host-omnara_session and API key in header X-Omnara-Csrf

Path parameters

orgID, string required

Organization ID (org_...).

machineID, string required

Machine ID (mch_...).

Request body

UpdateMachineRequest required
cwd, string

Default working directory for processes started on the machine.

env, object

Environment variables for processes started on the machine. Replaces the whole map; omit to keep the current one.

secret_env, object

Environment variables set from secrets, keyed by variable name, for processes started on the machine.

Response

Machine updated.

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.

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.

Changes

    • info

      added the optional property current_digest to the response with the status

    • info

      added the optional property current_digest to the response with the status

    • info

      added the optional property current_digest to the response with the status

    156 more changes in this revision