---
title: "List Work Items"
method: GET
path: "/v1/environments/{environment_id}/work?beta=true"
---

# List Work Items

`GET /v1/environments/{environment_id}/work?beta=true`

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.

List work items in an environment.

## Path parameters

- `environment_id` string, required

## Query parameters

- `limit` integer — Maximum number of work items to return
- `page` string, nullable — Opaque cursor from previous response for pagination

## Headers

- `anthropic-beta` string — 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-version` string — The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
- `authorization` string, nullable

## Response `200`

Successful Response

- BetaSelfHostedWorkListResponse — Response when listing work items with cursor-based pagination.
  - `data` BetaSelfHostedWork[], required — List of work items
    - `acknowledged_at` string, nullable, required — RFC 3339 timestamp when the work item was acknowledged and assigned to a self-hosted sandbox
    - `created_at` string, required — RFC 3339 timestamp when work was created
    - `data` BetaSessionWorkData, required — Work data for session work items. This resource type is used when work represents a session that needs to be executed in a self-hosted environment.
      - `id` string, required — Session identifier (e.g., 'session_...')
      - `type` 'session', required — Type of work data
    - `environment_id` string, required — Environment identifier this work belongs to (e.g., `env_...`)
    - `id` string, required — Work identifier (e.g., 'work_...')
    - `latest_heartbeat_at` string, nullable, required — RFC 3339 timestamp of the most recent heartbeat
    - `metadata` object, required — User-provided metadata key-value pairs associated with this work item
    - `secret` string, 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_at` string, nullable, required — RFC 3339 timestamp when work execution started
    - `state` 'queued' | 'starting' | 'active' | 'stopping' | 'stopped', required — Current state of the work item
    - `stop_requested_at` string, nullable, required — RFC 3339 timestamp when stop was requested
    - `stopped_at` string, nullable, required — RFC 3339 timestamp when work execution stopped
    - `type` 'work', required — The type of object (always 'work')
  - `next_page` string, nullable, required — Opaque cursor for fetching the next page of results

## Other responses

- `4XX` — Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.

---

[API](https://skmtc.net/anthropics/apis/anthropic-api.md) · [All operations](https://skmtc.net/anthropics/apis/anthropic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/anthropics/anthropic-api/revisions/93d8fd7d6493/schema)
