Modify¶
POST /api/v1/workspace/member_group/{group_uuid}/modify
Overview¶
Fully replace a workspace team and its member and role associations.
Before Calling and Usage Steps¶
First use Team Details to save the existing team name, complete member list, and roles, then submit the three complete fields; this is not a partial update. accountUUIDs=[] removes all members, and roleUUIDs=[] removes all associated roles. Do not pass null instead of an empty array. First prepare workspace members through Workspace Member List, and select roles assignable to the team through Role List. Team roles can be inherited by members. After a change, alert caches are cleared and permissions are refreshed asynchronously; do not treat a successful response as meaning that all logged-in sessions have been refreshed immediately. Database operations and subsequent cache/task processing are performed in separate steps. After a timeout or 500, check the list or details first to confirm the result, to avoid duplicate creation or overwriting new configuration.
Path Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| group_uuid | string | Yes | UUID of the target team; must belong to the current workspace. Example: group_exampleHow to obtain or enter: Obtain the team UUID from content[].uuid in Team List. |
Request Headers¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| DF-API-KEY | string | Yes | 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 | Type | Required | Description |
|---|---|---|---|
| accountUUIDs[*] | string | A single workspace member account UUID string. During modification, UUIDs outside the current member scope are filtered out; during creation, this endpoint does not verify that the member actually exists. Example: acnt_exampleHow to obtain or enter: Obtain the member uuid from the response of Workspace Member List. |
|
| roleUUIDs[*] | string | A single role UUID string. During creation, validity of arbitrary custom UUIDs is not guaranteed to be verified; use actual values from the list. Example: role_exampleHow to obtain or enter: Copy the role uuid from Role List, excluding owner and wsAdmin. |
|
| name | string | Yes | Team name, up to 48 characters; active teams in the same workspace cannot have duplicate names. Null allowed: False Maximum length: 48 Example: 生产运维How to obtain or enter: Use Team List to check existing names in the workspace, and enter a non-empty name. |
| accountUUIDs | array | Yes | Complete array of member UUIDs. If omitted or null during creation, no members are added; for modification, it is required and replaces the entire set. [] clears members; null causes an internal error and cannot be used instead of []. Null allowed: True Example: ["acnt_example"]How to obtain or enter: Obtain actual member UUIDs in this workspace from Workspace Member List; membersNotInGroup in the details can also provide candidates. |
| roleUUIDs | array | Yes | Complete array of roles associated with the team. If omitted or null during creation, no roles are added; for modification, it is required and replaces the entire set. [] or null clears roles; explicitly using [] is recommended. Owner or administrator roles cannot be granted through a team. Null allowed: True Example: ["role_example"]How to obtain or enter: Obtain assignable role UUIDs from Role List; owner or wsAdmin cannot be used. |
Additional Parameter Notes¶
The creation response provides only the uuid and does not return the complete team entity; the modification response is true. Read actual members and roles through the list or details.
Request Example¶
curl --request POST 'https://openapi.guance.com/api/v1/workspace/member_group/group_example/modify' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json' \
--data-raw '{"name":"Production Operations","accountUUIDs":["acnt_example"],"roleUUIDs":["role_example"]}'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content | boolean | true when the configuration modification is complete. |
{
"code": 200,
"content": true,
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Response¶
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 | Request field is missing, or field value violates the declared validation conditions | Parameter parsing failed | Verify parameter location, field name, type, and value. |
| 400 | ft.RequestJsonFormatError | Invalid request JSON syntax | Request JSON format error | Correct the JSON according to content.reason, line, and column. |
| 400 | ft.JsonFormatError | Top-level JSON is not an object | Some JSON file format errors | Use a single JSON object. |
| 400 | ft.MemberGroupNameExists | An active team with the same name already exists in this workspace | A team with the same name already exists | Query existing names and choose an unused team name. |
| 400 | ft.TeamRoleAddPermissionError | roleUUIDs contains owner or wsAdmin | Team roles cannot be administrator or owner | Remove owner/administrator identifiers and use only allowed roles; this endpoint cannot bypass team authorization restrictions. |
| 404 | ft.MemberGroupNoExists | The target team does not exist, has been deleted, or is not in this workspace | Team does not exist | Copy the active team UUID again from Team List. |
| 500 | ft.InternalServerError | Database, notification cache cleanup, asynchronous permission refresh submission, or audit failure | Internal error | First check whether the team configuration has taken effect, and decide whether to retry after confirmation; record the traceId. accountUUIDs=null in modify may also cause this error; use an explicit array. |