Ensure Worktree Endpoint
Ensure a worktree exists, creating if needed.
If name is "main", returns the main worktree. Otherwise, creates/returns a named worktree.
Request
- Base URLhttps://docs.omnara.com (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
Request body
Request to ensure a worktree exists, creating if needed.
Workspace ID to create worktree in
Worktree name (null for main worktree)
Filesystem path for the worktree (null for main worktree)
Response
Successful Response
Serialized worktree entity returned to API clients.
Unique worktree identifier
Parent workspace identifier
Worktree name (null for the main worktree)
Whether this is the main/default worktree for the workspace
Filesystem path for the worktree on the machine
Type of worktree: LOCAL (user machine) or REMOTE (sandbox)
Machine path information associated with a LOCAL worktree.
Managed machine ID if worktree_type is REMOTE
Most recent liveness heartbeat received from the sandbox container (REMOTE only).
ID of the last checkpoint that was successfully synced to cloud storage. This may differ from current_checkpoint_id if a recent checkpoint failed to sync.
Whether a checkpoint needs to be restored on next local session start
Identifier of the current checkpoint for this worktree
Metadata associated with the current checkpoint (e.g., commit info)
Timestamp when the worktree was created
Timestamp when the worktree was last updated
Changes
No recorded changes to this operation across all 1 revision of this API.