Claude Platform Docs

Environments

Create Environment
BetaEnvironment beta().environments().create(EnvironmentCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/environments
List Environments
EnvironmentListPage beta().environments().list(EnvironmentListParamsparams = EnvironmentListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/environments
Get Environment
BetaEnvironment beta().environments().retrieve(EnvironmentRetrieveParamsparams = EnvironmentRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/environments/{environment_id}
Update Environment
BetaEnvironment beta().environments().update(EnvironmentUpdateParamsparams = EnvironmentUpdateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/environments/{environment_id}
Delete Environment
BetaEnvironmentDeleteResponse beta().environments().delete(EnvironmentDeleteParamsparams = EnvironmentDeleteParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
DELETE/v1/environments/{environment_id}
Archive Environment
BetaEnvironment beta().environments().archive(EnvironmentArchiveParamsparams = EnvironmentArchiveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/environments/{environment_id}/archive
Models
class BetaCloudConfig:

cloud environment configuration.

class BetaCloudConfigParams:

Request params for cloud environment configuration.

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

class BetaEnvironment:

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

class BetaEnvironmentDeleteResponse:

Response after deleting an environment.

String id

Environment identifier

Type type

The type of response

class BetaLimitedNetwork:

Limited network access.

boolean allowMcpServers

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

boolean allowPackageManagers

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

List<String> allowedHosts

Specifies domains the container can reach.

JsonValue type "limited"constant

Network policy type

class BetaLimitedNetworkParams:

Limited network request params.

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

JsonValue type "limited"constant

Network policy type

Optional<Boolean> allowMcpServers

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

Optional<Boolean> allowPackageManagers

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.

Optional<List<String>> allowedHosts

Specifies domains the container can reach.

class BetaPackages:

Packages (and their versions) available in this environment.

List<String> apt

Ubuntu/Debian packages to install

List<String> cargo

Rust packages to install

List<String> gem

Ruby packages to install

List<String> go

Go packages to install

List<String> npm

Node.js packages to install

List<String> pip

Python packages to install

Optional<Type> type

Package configuration type

class BetaPackagesParams:

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.

Optional<List<String>> apt

Ubuntu/Debian packages to install

Optional<List<String>> cargo

Rust packages to install

Optional<List<String>> gem

Ruby packages to install

Optional<List<String>> go

Go packages to install

Optional<List<String>> npm

Node.js packages to install

Optional<List<String>> pip

Python packages to install

Optional<Type> type

Package configuration type

class BetaSelfHostedConfig:

Configuration for self-hosted environments.

JsonValue type "self_hosted"constant

Environment type

class BetaSelfHostedConfigParams:

Request params for self_hosted environment configuration.

JsonValue type "self_hosted"constant

Environment type

class BetaUnrestrictedNetwork:

Unrestricted network access.

JsonValue type "unrestricted"constant

Network policy type

EnvironmentsWork

Get Work Item
BetaSelfHostedWork beta().environments().work().retrieve(WorkRetrieveParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/environments/{environment_id}/work/{work_id}
Poll for Work
BetaSelfHostedWork beta().environments().work().poll(WorkPollParamsparams = WorkPollParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/environments/{environment_id}/work/poll
Acknowledge Work
BetaSelfHostedWork beta().environments().work().ack(WorkAckParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/environments/{environment_id}/work/{work_id}/ack
Record Heartbeat
BetaSelfHostedWorkHeartbeatResponse beta().environments().work().heartbeat(WorkHeartbeatParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/environments/{environment_id}/work/{work_id}/heartbeat
Stop Work
BetaSelfHostedWork beta().environments().work().stop(WorkStopParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/environments/{environment_id}/work/{work_id}/stop
List Work Items
WorkListPage beta().environments().work().list(WorkListParamsparams = WorkListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/environments/{environment_id}/work
Update Work Item
BetaSelfHostedWork beta().environments().work().update(WorkUpdateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/v1/environments/{environment_id}/work/{work_id}
Get Queue Statistics
BetaSelfHostedWorkQueueStats beta().environments().work().stats(WorkStatsParamsparams = WorkStatsParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/environments/{environment_id}/work/stats