Claude Platform Docs

Ambienti

Crea ambiente
BetaEnvironment Beta.Environments.Create(parameters, cancellationToken = default)
POST/v1/environments

Crea un nuovo ambiente con la configurazione specificata.

Elenca gli ambienti
EnvironmentListPage Beta.Environments.List(parameters, cancellationToken = default)
GET/v1/environments

Elenca gli ambienti con supporto per la paginazione.

Ottieni ambiente
BetaEnvironment Beta.Environments.Retrieve(parameters, cancellationToken = default)
GET/v1/environments/{environment_id}

Recupera un ambiente specifico tramite ID.

Aggiorna ambiente
BetaEnvironment Beta.Environments.Update(parameters, cancellationToken = default)
POST/v1/environments/{environment_id}

Aggiorna la configurazione di un ambiente esistente.

Elimina ambiente
BetaEnvironmentDeleteResponse Beta.Environments.Delete(parameters, cancellationToken = default)
DELETE/v1/environments/{environment_id}

Elimina un ambiente tramite ID. Restituisce una conferma dell'eliminazione.

Archivia ambiente
BetaEnvironment Beta.Environments.Archive(parameters, cancellationToken = default)
POST/v1/environments/{environment_id}/archive

Archivia un ambiente tramite ID. Gli ambienti archiviati non possono essere utilizzati per creare nuove sessioni.

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; ArchivedAt; /* 7 more */ }

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

class BetaEnvironmentDeleteResponse { Type; ID; }

Response after deleting an environment.

required Type Type

The type of response

required string ID

Environment identifier

class BetaLimitedNetwork { Type = "limited"; AllowMcpServers; AllowPackageManagers; AllowedHosts; }

Limited network access.

JsonElement Type = "limited"

Network policy type

required bool AllowMcpServers

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

required bool AllowPackageManagers

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

required IReadOnlyList<string> AllowedHosts

Specifies domains the container can reach.

class BetaLimitedNetworkParams { Type = "limited"; AllowMcpServers; AllowPackageManagers; AllowedHosts; }

Limited network request params.

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

JsonElement Type = "limited"

Network policy type

bool? AllowMcpServers

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

bool? 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.

IReadOnlyList<string>? AllowedHosts

Specifies domains the container can reach.

class BetaPackages { Type; Apt; Cargo; /* 4 more */ }

Packages (and their versions) available in this environment.

Type Type

Package configuration type

required IReadOnlyList<string> Apt

Ubuntu/Debian packages to install

required IReadOnlyList<string> Cargo

Rust packages to install

required IReadOnlyList<string> Gem

Ruby packages to install

required IReadOnlyList<string> Go

Go packages to install

required IReadOnlyList<string> Npm

Node.js packages to install

required IReadOnlyList<string> Pip

Python packages to install

class BetaPackagesParams { Type; 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 Type

Package configuration type

IReadOnlyList<string>? Apt

Ubuntu/Debian packages to install

IReadOnlyList<string>? Cargo

Rust packages to install

IReadOnlyList<string>? Gem

Ruby packages to install

IReadOnlyList<string>? Go

Go packages to install

IReadOnlyList<string>? Npm

Node.js packages to install

IReadOnlyList<string>? Pip

Python packages to install

class BetaSelfHostedConfig { Type = "self_hosted"; }

Configuration for self-hosted environments.

JsonElement Type = "self_hosted"

Environment type

class BetaSelfHostedConfigParams { Type = "self_hosted"; }

Request params for self_hosted environment configuration.

JsonElement Type = "self_hosted"

Environment type

class BetaUnrestrictedNetwork { Type = "unrestricted"; }

Unrestricted network access.

JsonElement Type = "unrestricted"

Network policy type

AmbientiLavoro

Ottieni elemento di lavoro
BetaSelfHostedWork Beta.Environments.Work.Retrieve(parameters, cancellationToken = default)
GET/v1/environments/{environment_id}/work/{work_id}

Nota: questi endpoint vengono chiamati automaticamente dal worker di ambiente predefinito fornito negli SDK e nella CLI, per orchestrare le sessioni con ambienti sandbox self-hosted. Sono inclusi qui come riferimento; non è necessario invocarli direttamente.

Esegui polling del lavoro
BetaSelfHostedWork? Beta.Environments.Work.Poll(parameters, cancellationToken = default)
GET/v1/environments/{environment_id}/work/poll

Nota: questi endpoint vengono chiamati automaticamente dal worker di ambiente predefinito fornito negli SDK e nella CLI, per orchestrare le sessioni con ambienti sandbox self-hosted. Sono inclusi qui come riferimento; non è necessario invocarli direttamente.

Conferma ricezione del lavoro
BetaSelfHostedWork Beta.Environments.Work.Ack(parameters, cancellationToken = default)
POST/v1/environments/{environment_id}/work/{work_id}/ack

Nota: questi endpoint vengono chiamati automaticamente dal worker di ambiente predefinito fornito negli SDK e nella CLI, per orchestrare le sessioni con ambienti sandbox self-hosted. Sono inclusi qui come riferimento; non è necessario invocarli direttamente.

Registra heartbeat
BetaSelfHostedWorkHeartbeatResponse Beta.Environments.Work.Heartbeat(parameters, cancellationToken = default)
POST/v1/environments/{environment_id}/work/{work_id}/heartbeat

Nota: questi endpoint vengono chiamati automaticamente dal worker di ambiente predefinito fornito negli SDK e nella CLI, per orchestrare le sessioni con ambienti sandbox self-hosted. Sono inclusi qui come riferimento; non è necessario invocarli direttamente.

Arresta lavoro
BetaSelfHostedWork Beta.Environments.Work.Stop(parameters, cancellationToken = default)
POST/v1/environments/{environment_id}/work/{work_id}/stop

Nota: questi endpoint vengono chiamati automaticamente dal worker di ambiente predefinito fornito negli SDK e nella CLI, per orchestrare le sessioni con ambienti sandbox self-hosted. Sono inclusi qui come riferimento; non è necessario invocarli direttamente.

Elenca gli elementi di lavoro
WorkListPage Beta.Environments.Work.List(parameters, cancellationToken = default)
GET/v1/environments/{environment_id}/work

Nota: questi endpoint vengono chiamati automaticamente dal worker di ambiente predefinito fornito negli SDK e nella CLI, per orchestrare le sessioni con ambienti sandbox self-hosted. Sono inclusi qui come riferimento; non è necessario invocarli direttamente.

Aggiorna elemento di lavoro
BetaSelfHostedWork Beta.Environments.Work.Update(parameters, cancellationToken = default)
POST/v1/environments/{environment_id}/work/{work_id}

Nota: questi endpoint vengono chiamati automaticamente dal worker di ambiente predefinito fornito negli SDK e nella CLI, per orchestrare le sessioni con ambienti sandbox self-hosted. Sono inclusi qui come riferimento; non è necessario invocarli direttamente.

Ottieni statistiche della coda
BetaSelfHostedWorkQueueStats Beta.Environments.Work.Stats(parameters, cancellationToken = default)
GET/v1/environments/{environment_id}/work/stats

Ottieni statistiche sulla coda di lavoro per un ambiente.