Delete a user

Removes the specified user’s workspace membership. After deletion, the user will no longer be able to access the current workspace.

HTTP
POST $CLOUDSIGMA_API_BASE/user/delete

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First select user and confirm that the user should be removed from the current workspace.

Prepare personal access token and target workspace ID with corresponding permissions for the target workspace.

Request body

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/user/delete" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "user-001"
  }'

Parameter

Type

Required

Description

id

string or number

Yes

The user’s product account UID or IAM reference. Exact strings are recommended. Numeric input preserves the text of numeric tokens and does no integer normalization.

id in the request body is recommended to use a string to fill in the product account UID or IAM reference. The interface also accepts JSON numbers, but the text format of the number is preserved and is not converted to a standard integer. null or null value is invalid, do not apply rules for IAM path user ID.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": null
}

Field

Type

Description

code

string

OK when successful.

msg

string

OK when successful.

data

null

Fixed to null on success.

Error response

This operation only removes members in the target workspace and does not delete global accounts. The service handles membership status, auditing, database identity, and tenant records. Protected members cannot be removed.

Failed, Incomplete, and Unknown indicate failure, processing incomplete, and unknown result respectively. When you receive the error, some cleanup may have been completed. Confirm the current member status first and do not automatically retry.

JSON
{
  "code": "INVALID_ARGUMENT",
  "msg": "请求参数无效",
  "data": null
}

Field

Type

Description

code

string

error code.

msg

string

error message.

data

null

—。

Common HTTP errors

HTTP status

Error code

Common cause

Recommended action

400

INVALID_ARGUMENT, ErrParamInvalid, ErrIAMInheritanceInvalid, ErrIAMRoleLifecycleInvalid, ErrIAMRoleDeleteInvalid

Invalid request field, workspace, or operation precondition.

Fix the request parameters and submit again.

401

Unauthorized

Missing or invalid authentication credentials.

Check the credential type, expiration, and authentication header.

403

ErrForbidden, ErrWorkspaceAccessDenied, IAM_ERROR_CODE_PERMISSION_DENIED

The current identity or active role does not have permission for this operation.

Use an authorized identity or contact an administrator to grant access.

404

USER_NOT_FOUND, ErrNotFound, ErrIAMResourceNotFound, IAM_ERROR_CODE_RESOURCE_NOT_FOUND

The target object or required reference was not found.

Verify the object identifier, workspace, and current status.

409

IAM_ERROR_CODE_IDEMPOTENCY_CONFLICT, IAM_ERROR_CODE_LIFECYCLE_CONFLICT, ErrIAMInheritanceConflict, ErrIAMRoleDeleteConflict, ErrIAMRoleDeleteResultUnknown, ErrIAMWorkspaceMemberLifecycleResultUnknown

Conflict in resource state, request payload, or concurrent modification.

Re-read the current state and version, then handle according to the latest result.

500

INTERNAL, ErrIAMRoleDeleteFailed, ErrIAMWorkspaceMemberLifecycleFailed, ErrIAMWorkspaceMemberLifecycleIncomplete, ErrIAMRoleWriteFailed

Internal processing failed; write operations may have been partially applied.

Retain request and trace details, and verify the current state before retrying.

503

ErrCoreAuthorizeUnavailable, IAM_ERROR_CODE_CORE_AUTHORIZE_UNAVAILABLE, ErrIAMRoleReadUnavailable, ErrIAMRolePermissionViewUnavailable, ErrIAMRoleInheritanceUnavailable, ErrIAMRoleAdministrationUnavailable

A business, runtime, or authorization dependency is temporarily unavailable.

After the dependency recovers, check existing results first instead of blindly repeating writes.

Last updated on