Claude Platform Docs

删除服务账户工作区成员

$ ant beta:organization:workspaces:service-accounts remove
DELETE/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

需要具有 org:admin 作用域的 OAuth 访问令牌,可通过 ant auth login --scope org:admin 或工作负载身份联合规则获取;不接受 Admin API 密钥。请参阅使用 Admin API 管理 WIF

从工作区中移除服务账号。

移除操作是幂等的(即使成员资格已被移除,也会返回 200)。对隐式的默认工作区成员资格执行 DELETE 会返回 200,但不会产生任何效果,成员资格仍然保留;删除显式的默认工作区记录会恢复为隐式的 workspace_user 成员资格。已归档的工作区返回 400。

Parameters
--workspace-id: string

Path param: ID of the workspace.

--service-account-id: string

Path param: ID of the service account.

--beta: optional array of AnthropicBeta

Header param: Optional header to specify the beta version(s) you want to use.

Returns
BetaOrganizationWorkspaceServiceAccountRemoveResponse: object{ service_account_id, type, workspace_id }
service_account_id: string

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

type: "service_account_workspace_member_deleted"
workspace_id: string

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

删除服务账户工作区成员
ant beta:organization:workspaces:service-accounts remove \
  --api-key my-anthropic-api-key \
  --workspace-id workspace_id \
  --service-account-id service_account_id
Returns Examples
Response 200
{
  "service_account_id": "service_account_id",
  "type": "service_account_workspace_member_deleted",
  "workspace_id": "workspace_id"
}