Delete Member¶
POST /api/v1/workspace/member/batch_delete
Overview¶
Remove members from the current workspace, revoking direct roles, teams, and related personal access capabilities.
Before Calling and Usage Steps¶
Obtain the UUID of the member to remove from the Workspace Member List, confirm the business handover, and then submit. Removal only affects membership in the current workspace and does not delete the site account itself. There are specific restrictions for owners, the current caller, and agent members. This revokes direct roles and team relationships in this workspace, deletes currently enabled user personal keys, clears member caches and workspace login tokens, and asynchronously removes channel subscriptions. Personal key records that were already disabled are not covered by this deletion path. Workspace access inherited through account groups in the management console must be checked separately in the management group relationships; do not treat this operation as a unified unbinding of all inherited authorizations. Returns content=null, not true; a nonexistent member relationship may result in no actual change, and no per-item results are provided. Processing of member relationships, roles, tokens, and caches may be saved in steps; after an exception or timeout, first read the member and role statuses, and then decide whether to retry.
Request Headers¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| DF-API-KEY | string | Y | OpenAPI authentication credential for the workspace. Example: <DF-API-KEY>How to obtain or enter: Obtain an OpenAPI Key with permission for this operation from API Key Management in the target workspace. |
Body Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| accountUUIDs[*] | string | A single string identifier in the array. Example: acnt_exampleHow to obtain or enter: Obtain the account UUID of a member in the current workspace from content.data[].uuid in the Workspace Member List. This is not an API Key UUID or an email address. |
|
| accountUUIDs | array | Y | Array of target account UUIDs. Pass actual members of the same workspace using non-empty strings. Allow null: False Example: ["acnt_example"]How to obtain or enter: Obtain the account UUID of a member in the current workspace from content.data[].uuid in the Workspace Member List. This is not an API Key UUID or an email address. |
Additional Parameter Notes¶
Deleting a member affects their access to this workspace. After success, re-read the list and role sources to confirm the final state of direct memberships and inherited relationships.
Request Example¶
curl --request POST 'https://openapi.guance.com/api/v1/workspace/member/batch_delete' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json' \
--data-raw '{"accountUUIDs":["acnt_example"]}'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content | null | The normal flow returns no value, and the JSON is null; no per-item deletion confirmation is provided. |
{
"code": 200,
"content": null,
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Responses¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Resolution |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | A request field is missing, or a field value violates the declared validation conditions | Parameter parsing failed | Check the parameter location, field name, type, and value. |
| 400 | ft.RequestJsonFormatError | Request JSON syntax is invalid | Request JSON format error | Correct the JSON according to content.reason, line, and column. |
| 400 | ft.JsonFormatError | The JSON top level is not an object | Partial JSON file format error | Submit a single JSON object. |
| 400 | ft.ForbiddenAdminRemoveSelf | The target list contains the current caller identity | Invalid operation, administrators cannot remove themselves | Perform the operation with another identity that has member management permissions. |
| 400 | ft.InvalidActionForbiddenRemovalOwner | The target list contains the workspace owner | Invalid operation, the owner cannot be removed | First transfer ownership according to the process. |
| 400 | ft.AgentMemberCanNotDelete | The target account contains an agent member | Members from the agent source cannot be deleted | Remove it through the agent management process. |
| 500 | ft.InternalServerError | Data saving, associated resource processing, or cache processing failed | Internal error | First check the current member and permission statuses, then decide whether to retry; if the failure persists, provide the traceId and a sanitized request. |