Claude Platform Docs

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

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을 반환합니다.

Path parameters
service_account_id: string

ID of the service account.

workspace_id: string

ID of the workspace.

Headers
"anthropic-beta": optional array of string

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

To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.

Returns
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"
defaultservice_account_workspace_member_deleted
workspace_id: string

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

서비스 계정에서 워크스페이스 제거
cURL
curl https://api.anthropic.com/v1/organizations/service_accounts/$SERVICE_ACCOUNT_ID/workspaces/$WORKSPACE_ID \
    -X DELETE \
    -H 'anthropic-version: 2023-06-01' \
    -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN"
Returns Examples
Response 200
{
  "service_account_id": "service_account_id",
  "type": "service_account_workspace_member_deleted",
  "workspace_id": "workspace_id"
}