Delete a user¶
Removes the specified user’s workspace membership. After deletion, the user will no longer be able to access the current workspace.
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¶
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¶
{
"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.
{
"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 request field, workspace, or operation precondition. |
Fix the request parameters and submit again. |
401 |
|
Missing or invalid authentication credentials. |
Check the credential type, expiration, and authentication header. |
403 |
|
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 |
|
The target object or required reference was not found. |
Verify the object identifier, workspace, and current status. |
409 |
|
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 processing failed; write operations may have been partially applied. |
Retain request and trace details, and verify the current state before retrying. |
503 |
|
A business, runtime, or authorization dependency is temporarily unavailable. |
After the dependency recovers, check existing results first instead of blindly repeating writes. |