v49

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-261319281.7 MB

Get Work Item

Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.

Retrieve detailed information about a specific work item.

get/v1/environments/{environment_id}/work/{work_id}?beta=true

Path parameters

environment_idstring required
work_idstring required

Headers

anthropic-betastring

Optional header to specify the beta version(s) you want to use.

To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.

Optional header to specify the beta version(s) you want to use.

To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.

anthropic-versionstring

The version of the Claude API you want to use.

Read more about versioning and our version history here.

The version of the Claude API you want to use.

Read more about versioning and our version history here.

x-api-keystring nullable

Response

Successful Response

acknowledged_atstring nullable required

RFC 3339 timestamp when the work item was acknowledged and assigned to a self-hosted sandbox

created_atstring required

RFC 3339 timestamp when work was created

environment_idstring required

Environment identifier this work belongs to (e.g., env_...)

idstring required

Work identifier (e.g., 'work_...')

latest_heartbeat_atstring nullable required

RFC 3339 timestamp of the most recent heartbeat

metadataobject required

User-provided metadata key-value pairs associated with this work item

secretstring nullable required

Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths.

started_atstring nullable required

RFC 3339 timestamp when work execution started

state'queued' | 'starting' | 'active' | 'stopping' | 'stopped' required

Current state of the work item

stop_requested_atstring nullable required

RFC 3339 timestamp when stop was requested

stopped_atstring nullable required

RFC 3339 timestamp when work execution stopped

type'work' required

The type of object (always 'work')