Claude Platform Docs

工作區

將工作區新增至服務帳戶
organization.service_accounts.workspaces.add(service_account_id, **kwargs) -> ServiceAccountWorkspaceMember
POST/v1/organizations/service_accounts/{service_account_id}/workspaces

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

列出服務帳戶的工作區
organization.service_accounts.workspaces.list(service_account_id, **kwargs) -> SyncPageCursor[ServiceAccountWorkspaceMember]
GET/v1/organizations/service_accounts/{service_account_id}/workspaces

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

從服務帳戶移除工作區
organization.service_accounts.workspaces.remove(workspace_id, **kwargs) -> WorkspaceRemoveResponse
DELETE/v1/organizations/service_accounts/{service_account_id}/workspaces/{workspace_id}

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

Models
class WorkspaceRemoveResponse: type: "service_account_workspace_member_deleted"; service_account_id; workspace_id
type: Literal["service_account_workspace_member_deleted"]
defaultservice_account_workspace_member_deleted
service_account_id: str

Tagged service account ID (svac_...) named in the delete request. Removal is idempotent; see the endpoint description for the implicit-membership no-op.

workspace_id: str

Tagged workspace ID (wrkspc_...) named in the delete request.