Claude Platform Docs

서비스 계정에서 워크스페이스 제거

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

org:admin 범위의 OAuth 액세스 토큰이 필요합니다. 이 토큰은 ant auth login --scope org:admin 또는 워크로드 ID 페더레이션 규칙을 통해 얻을 수 있으며, Admin API 키는 허용되지 않습니다. Admin API로 WIF 관리를 참조하세요.

워크스페이스에서 서비스 계정을 제거합니다.

서비스 계정 측에서 접근하는 DELETE /workspaces/{workspace_id}/service_accounts/{service_account_id}의 미러입니다. 제거는 멱등적입니다(멤버십이 이미 제거된 경우에도 200을 반환). 암묵적 기본 워크스페이스 멤버십에 대한 DELETE는 200을 반환하지만 아무 작업도 수행하지 않으며 멤버십은 유지됩니다. 명시적 기본 워크스페이스 행을 삭제하면 암묵적 workspace_user 멤버십으로 되돌아갑니다. 보관된 워크스페이스는 400을 반환합니다.

Parameters
--service-account-id: string

Path param: ID of the service account.

--workspace-id: string

Path param: ID of the workspace.

--beta: optional array of AnthropicBeta

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

Returns
BetaOrganizationServiceAccountWorkspaceRemoveResponse: 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:service-accounts:workspaces remove \
  --api-key my-anthropic-api-key \
  --service-account-id service_account_id \
  --workspace-id workspace_id
Returns Examples
Response 200
{
  "service_account_id": "service_account_id",
  "type": "service_account_workspace_member_deleted",
  "workspace_id": "workspace_id"
}