Claude Platform Docs

작업

작업 항목 조회
BetaSelfHostedWork Beta.Environments.Work.Retrieve(parameters, cancellationToken = default)
GET/v1/environments/{environment_id}/work/{work_id}

참고: 이 엔드포인트는 자체 호스팅 샌드박스 환경에서 세션을 오케스트레이션하기 위해 SDK 및 CLI에서 제공하는 사전 빌드된 환경 워커에 의해 자동으로 호출됩니다. 참조용으로 여기에 포함되어 있으며, 직접 호출할 필요는 없습니다.

작업 폴링
BetaSelfHostedWork? Beta.Environments.Work.Poll(parameters, cancellationToken = default)
GET/v1/environments/{environment_id}/work/poll

참고: 이 엔드포인트는 자체 호스팅 샌드박스 환경에서 세션을 오케스트레이션하기 위해 SDK 및 CLI에서 제공하는 사전 빌드된 환경 워커에 의해 자동으로 호출됩니다. 참조용으로 여기에 포함되어 있으며, 직접 호출할 필요는 없습니다.

작업 확인
BetaSelfHostedWork Beta.Environments.Work.Ack(parameters, cancellationToken = default)
POST/v1/environments/{environment_id}/work/{work_id}/ack

참고: 이러한 엔드포인트는 자체 호스팅 샌드박스 환경과의 세션을 오케스트레이션하기 위해 SDK 및 CLI에서 제공되는 사전 빌드된 환경 워커에 의해 자동으로 호출됩니다. 참조용으로 여기에 포함되어 있으며, 직접 호출할 필요는 없습니다.

하트비트 기록
BetaSelfHostedWorkHeartbeatResponse Beta.Environments.Work.Heartbeat(parameters, cancellationToken = default)
POST/v1/environments/{environment_id}/work/{work_id}/heartbeat

참고: 이러한 엔드포인트는 자체 호스팅 샌드박스 환경과의 세션을 오케스트레이션하기 위해 SDK 및 CLI에서 제공되는 사전 빌드된 환경 워커에 의해 자동으로 호출됩니다. 참조용으로 여기에 포함되어 있으며, 직접 호출할 필요는 없습니다.

작업 중지
BetaSelfHostedWork Beta.Environments.Work.Stop(parameters, cancellationToken = default)
POST/v1/environments/{environment_id}/work/{work_id}/stop

참고: 이러한 엔드포인트는 자체 호스팅 샌드박스 환경과의 세션을 오케스트레이션하기 위해 SDK 및 CLI에서 제공되는 사전 빌드된 환경 워커에 의해 자동으로 호출됩니다. 참조용으로 여기에 포함되어 있으며, 직접 호출할 필요는 없습니다.

작업 항목 나열
WorkListPage Beta.Environments.Work.List(parameters, cancellationToken = default)
GET/v1/environments/{environment_id}/work

참고: 이러한 엔드포인트는 자체 호스팅 샌드박스 환경과의 세션을 오케스트레이션하기 위해 SDK 및 CLI에서 제공되는 사전 빌드된 환경 워커에 의해 자동으로 호출됩니다. 참조용으로 여기에 포함되어 있으며, 직접 호출할 필요는 없습니다.

작업 항목 업데이트
BetaSelfHostedWork Beta.Environments.Work.Update(parameters, cancellationToken = default)
POST/v1/environments/{environment_id}/work/{work_id}

참고: 이러한 엔드포인트는 자체 호스팅 샌드박스 환경과의 세션을 오케스트레이션하기 위해 SDK 및 CLI에서 제공되는 사전 빌드된 환경 워커에 의해 자동으로 호출됩니다. 참조용으로 여기에 포함되어 있으며, 직접 호출할 필요는 없습니다.

큐 통계 가져오기
BetaSelfHostedWorkQueueStats Beta.Environments.Work.Stats(parameters, cancellationToken = default)
GET/v1/environments/{environment_id}/work/stats

환경의 작업 큐에 대한 통계를 가져옵니다.

Models
class BetaSelfHostedWork { Type = "work"; ID; AcknowledgedAt; /* 10 more */ }

Work resource representing a unit of work in a self-hosted environment.

Work items are queued when sessions are created or when long-dormant sessions receive new messages. The environment worker polls for work to execute in a self-hosted sandbox.

class BetaSelfHostedWorkHeartbeatResponse { Type = "work_heartbeat"; LastHeartbeat; LeaseExtended; /* 2 more */ }

Response after recording a heartbeat for a work item.

JsonElement Type = "work_heartbeat"

The type of response

required string LastHeartbeat

RFC 3339 timestamp of the actual heartbeat from DB

required bool LeaseExtended

Whether the heartbeat succeeded in extending the lease

required State State

Current state of the work item (active/stopping/stopped)

One of the following:
Queued("queued")
Starting("starting")
Active("active")
Stopping("stopping")
Stopped("stopped")
required long TtlSeconds

Effective TTL applied to the lease

class BetaSelfHostedWorkListResponse { Data; NextPage; }

Response when listing work items with cursor-based pagination.

class BetaSelfHostedWorkQueueStats { Type = "work_queue_stats"; Depth; OldestQueuedAt; /* 2 more */ }

Statistics about the work queue for an environment.

Uses Redis Stream consumer group metrics for O(1) queries.

JsonElement Type = "work_queue_stats"

The type of object

required long Depth

Number of work items waiting to be picked up (lag from consumer group)

required string? OldestQueuedAt

RFC 3339 timestamp of oldest item in the work stream (includes both queued and pending items), null if stream empty

required long Pending

Number of work items being processed (polled but not acknowledged)

required long? WorkersPolling

Number of workers that have polled for work in the last 30 seconds. Requires worker_id to be sent with poll requests.

class BetaSelfHostedWorkStopRequest { Force; }

Request to stop a work item.

bool Force

If true, immediately stop work without graceful shutdown

class BetaSelfHostedWorkUpdateRequest { Metadata; }

Request to update work item metadata.

required IReadOnlyDictionary<string, string> Metadata

Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve existing metadata.

class BetaSessionWorkData { Type = "session"; ID; }

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.

JsonElement Type = "session"

Type of work data

required string ID

Session identifier (e.g., 'session_...')