List¶
GET /api/v1/workspace/member_group/list
Overview¶
List the teams in the current Workspace along with their active members and associated roles.
Before Calling and Usage Steps¶
Only team name search is supported. Results are not paginated; read the content array directly. Results are sorted by team record id in ascending order. member_count counts only member profiles that are still active in the current Workspace and can be resolved, so it may differ from the number of historical association records. The order of members and roles is not guaranteed to be fixed. For an empty team, role_infos may be empty even if roles have been configured. When you need to verify authorization, use the existing configuration together with the role management page; do not determine that no roles exist solely based on an empty array.
Request Headers¶
| Parameter | 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 the required permission from API Key management in the target Workspace. |
Query Request Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| search | string | Fuzzy search by team name; omit to query all active teams. Allows null: False Example: 生产How to obtain or enter: Enter a team name keyword. |
Additional Parameter Notes¶
The returned team uuid can be used for modification, deletion, and object permission configuration. The team list does not have pageIndex/pageSize parameters.
Request Example¶
curl --get 'https://openapi.guance.com/api/v1/workspace/member_group/list' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-urlencode 'search=生产'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content | array<object> |
Array of active teams; [] if there are no results. |
| content[].id | integer | Database record ID; operations use uuid. |
| content[].uuid | string | Team UUID. |
| content[].name | string | Team name. |
| content[].workspaceUUID | string | UUID of the Workspace to which the team belongs. |
| content[].status | integer | 0 for active teams. |
| content[].creator | string | Creator identity. |
| content[].updator | string | Updater identity; may be empty. |
| content[].createAt | integer | Creation time in Unix seconds. |
| content[].updateAt | integer | Entity update time in Unix seconds; -1 if not updated. Current modifications are not guaranteed to update this field, so it cannot be used to determine whether members/roles have changed. |
| content[].deleteAt | integer | Deletion time in Unix seconds; -1 if not deleted. |
| content[].member_count | integer | Number of currently resolvable active members. |
| content[].member_name_list | array<string> |
List of member display names; the Workspace nickname is preferred, otherwise the account name is used. |
| content[].member_name_list[] | string | Display name of a single member. |
| content[].member_infos | array<object> |
Active member profiles. |
| content[].role_infos | array<object> |
Role summaries found through the current member association path; an empty team may return an empty array. |
| content[].declaration | object or null | Workspace common declaration for each team entry. |
| content[].member_infos[].id | integer | Member database ID. |
| content[].member_infos[].uuid | string | Member account UUID. |
| content[].member_infos[].name | string | Account display name. |
| content[].member_infos[].email | string | Account email. |
| content[].member_infos[].acntWsNickname | string | Nickname in this Workspace; an empty string if not set. |
| content[].member_infos[].username | string | Account login username. |
| content[].member_infos[].source | string | Account source. |
| content[].member_infos[].userIconUrl | string | Avatar URL; an empty string if not set. |
| content[].member_infos[].exterId | string | External identity system ID; may be empty. |
| content[].member_infos[].mobile | string | Mobile number; may be empty. |
| content[].member_infos[].countryCode | string | Country/region code for the mobile number; may be empty. |
| content[].member_infos[].namespace | string | Account namespace. |
| content[].member_infos[].attributes | JSON value | Raw account attributes; usually an object or array, and {} if parsing fails. |
| content[].member_infos[].attributes.dynamic field | JSON value | Raw attribute names and values defined by the identity provider; there is no uniform fixed structure. |
| content[].member_infos[].customAttributes | JSON value | Custom account attributes; usually an object or array, and {} if parsing fails. |
| content[].member_infos[].customAttributes.dynamic field | JSON value | Custom attributes configured by the user or identity system. |
| content[].member_infos[].defaultWebhook | object | Raw Webhook configuration present only for some agent members; omitted for regular members. |
| content[].member_infos[].defaultWebhook.dynamic field | JSON value | Configuration fields saved by the agent; the API only reads them as-is, and there is no fixed subfield contract. |
| content[].role_infos[].uuid | string | Role UUID or built-in role identifier; can be used as a roleUUIDs element. |
| content[].role_infos[].name | string | Role display name. |
{
"code": 200,
"content": [
{
"id": 42,
"uuid": "group_example",
"name": "生产运维",
"workspaceUUID": "wksp_example",
"status": 0,
"creator": "wsak_example",
"updator": "",
"createAt": 1785427200,
"updateAt": -1,
"deleteAt": -1,
"member_count": 1,
"member_name_list": [
"运维成员"
],
"member_infos": [
{
"id": 1,
"uuid": "acnt_example",
"name": "运维成员",
"email": "xxx@guance.com",
"acntWsNickname": "",
"username": "xxx@guance.com",
"source": "local",
"userIconUrl": "",
"exterId": "",
"mobile": "",
"countryCode": "",
"namespace": "",
"attributes": {},
"customAttributes": {}
}
],
"role_infos": [
{
"uuid": "role_example",
"name": "运维只读"
}
],
"declaration": {}
}
],
"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 | Handling |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | Using an undeclared Query parameter or a parameter that violates the rules | Parameter parsing failed | Check the Query parameter table and examples. |
| 500 | ft.InternalServerError | Failed to read the database or member profiles | Internal error | Record the traceId and retry later or contact support. |