Claude Platform Docs

환경

환경 생성
beta.environments.create(**kwargs) -> BetaEnvironment
POST/v1/environments

지정된 구성으로 새 환경을 생성합니다.

환경 목록 조회
beta.environments.list(**kwargs) -> PageCursor<BetaEnvironment>
GET/v1/environments

페이지네이션을 지원하는 환경 목록을 조회합니다.

환경 조회
beta.environments.retrieve(environment_id, **kwargs) -> BetaEnvironment
GET/v1/environments/{environment_id}

ID로 특정 환경을 조회합니다.

환경 업데이트
beta.environments.update(environment_id, **kwargs) -> BetaEnvironment
POST/v1/environments/{environment_id}

기존 환경의 구성을 업데이트합니다.

환경 삭제
beta.environments.delete(environment_id, **kwargs) -> BetaEnvironmentDeleteResponse
DELETE/v1/environments/{environment_id}

ID로 환경을 삭제합니다. 삭제 확인을 반환합니다.

환경 보관
beta.environments.archive(environment_id, **kwargs) -> BetaEnvironment
POST/v1/environments/{environment_id}/archive

ID로 환경을 보관합니다. 보관된 환경은 새 세션을 생성하는 데 사용할 수 없습니다.

Models
class BetaCloudConfig { type: :cloud, networking, packages }

cloud environment configuration.

class BetaCloudConfigParams { type: :cloud, networking, packages }

Request params for cloud environment configuration.

Fields default to null; on update, omitted fields preserve the existing value.

class BetaEnvironment { type: :environment, id, archived_at, 7 more }

Unified Environment resource for both cloud and self-hosted environments.

class BetaEnvironmentDeleteResponse { type: :environment_deleted, id }

Response after deleting an environment.

type: :environment_deleted

The type of response

id: String

Environment identifier

class BetaLimitedNetwork { type: :limited, allow_mcp_servers, allow_package_managers, allowed_hosts }

Limited network access.

type: :limited

Network policy type

allow_mcp_servers: bool

Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the allowed_hosts array.

allow_package_managers: bool

Permits outbound access to public package registries (PyPI, npm, etc.) beyond those listed in the allowed_hosts array.

allowed_hosts: Array[String]

Specifies domains the container can reach.

class BetaLimitedNetworkParams { type: :limited, allow_mcp_servers, allow_package_managers, allowed_hosts }

Limited network request params.

Fields default to null; on update, omitted fields preserve the existing value.

type: :limited

Network policy type

allow_mcp_servers: bool

Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the allowed_hosts array. Defaults to false.

allow_package_managers: bool

Permits outbound access to public package registries (PyPI, npm, etc.) beyond those listed in the allowed_hosts array. Defaults to false on creation. Must be true when packages are specified.

allowed_hosts: Array[String]

Specifies domains the container can reach.

class BetaPackages { type: :packages, apt, cargo, 4 more }

Packages (and their versions) available in this environment.

type: :packages

Package configuration type

apt: Array[String]

Ubuntu/Debian packages to install

cargo: Array[String]

Rust packages to install

gem_: Array[String]

Ruby packages to install

go: Array[String]

Go packages to install

npm: Array[String]

Node.js packages to install

pip: Array[String]

Python packages to install

class BetaPackagesParams { type: :packages, apt, cargo, 4 more }

Specify packages (and optionally their versions) available in this environment.

When versioning, use the version semantics relevant for the package manager, e.g. for pip use package==1.0.0. You are responsible for validating the package and version exist. Unversioned installs the latest.

Under limited networking, requires networking.allow_package_managers to be true.

type: :packages

Package configuration type

apt: Array[String]

Ubuntu/Debian packages to install

cargo: Array[String]

Rust packages to install

gem_: Array[String]

Ruby packages to install

go: Array[String]

Go packages to install

npm: Array[String]

Node.js packages to install

pip: Array[String]

Python packages to install

class BetaSelfHostedConfig { type: :self_hosted }

Configuration for self-hosted environments.

type: :self_hosted

Environment type

class BetaSelfHostedConfigParams { type: :self_hosted }

Request params for self_hosted environment configuration.

type: :self_hosted

Environment type

class BetaUnrestrictedNetwork { type: :unrestricted }

Unrestricted network access.

type: :unrestricted

Network policy type

환경작업

작업 항목 조회
beta.environments.work.retrieve(work_id, **kwargs) -> BetaSelfHostedWork
GET/v1/environments/{environment_id}/work/{work_id}

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

작업 폴링
beta.environments.work.poll(environment_id, **kwargs) -> BetaSelfHostedWork
GET/v1/environments/{environment_id}/work/poll

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

작업 확인
beta.environments.work.ack(work_id, **kwargs) -> BetaSelfHostedWork
POST/v1/environments/{environment_id}/work/{work_id}/ack

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

하트비트 기록
beta.environments.work.heartbeat(work_id, **kwargs) -> BetaSelfHostedWorkHeartbeatResponse
POST/v1/environments/{environment_id}/work/{work_id}/heartbeat

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

작업 중지
beta.environments.work.stop(work_id, **kwargs) -> BetaSelfHostedWork
POST/v1/environments/{environment_id}/work/{work_id}/stop

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

작업 항목 나열
beta.environments.work.list(environment_id, **kwargs) -> PageCursor<BetaSelfHostedWork>
GET/v1/environments/{environment_id}/work

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

작업 항목 업데이트
beta.environments.work.update(work_id, **kwargs) -> BetaSelfHostedWork
POST/v1/environments/{environment_id}/work/{work_id}

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

큐 통계 가져오기
beta.environments.work.stats(environment_id, **kwargs) -> BetaSelfHostedWorkQueueStats
GET/v1/environments/{environment_id}/work/stats

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