跳转至

获取用户组成员列表

1. 接口说明

用于查询获取指定用户组的用户列表。

2. 接口URL

POST http://{anymetrics_host:anymetrics_port}/anymetrics/api/v1/userGroup/member/list

anymetrics_host:anymetrics_port 获取方式请参考:调用方式

3. 公共请求参数(HEADERS)

参数 类型 是否必选 描述
tenant-id String 租户 ID,用于标识资源所属租户
auth-type String 认证方式:
UID:使用 UID 认证
APIKEY:使用 APIKEY 认证
ACCOUNT:使用 ACCOUNT 认证
auth-value String 与 auth-type 对应的认证值

3.1 公共参数获取方式

tenant-id 与 auth-value:在 Aloudata CAN 顶部导航栏选择指标应用,左边菜单栏选择 API 集成。在 API 集成界面获取租户 ID 与认证值。

image.png

3.2. 请求体参数:

参数 类型 是否必选 描述
groupIdentityType String 用户组标识类型(USER_GROUP_ID 或 USER_GROUP_CODE)
value String 用户组ID或用户组编码
keyword String 搜索关键字(搜索用户账号或昵称)
pageNumber Integer 页码,默认 1
pageSize Integer 每页大小,默认 20

4. 请求示例:

curl --location 'http://localhost:8083/anymetrics/api/v1/userGroup/member/list' \
--header 'tenant-id: tn_21571046' \
--header 'auth-value: authority_test' \
--header 'auth-type: ACCOUNT' \
--header 'Content-Type: application/json' \
--data '{
  "groupIdentityType": "USER_GROUP_ID",
  "value": "g_1001",
  "keyword": "zhang",
  "pageNumber": 1,
  "pageSize": 20
}'

5. 返回示例:

{
    "data": {
        "data": [
            {
                "userId": "606549427745718272",
                "nickname": "xxx",
                "account": "63689egd",
                "photo": null,
                "cloudAccount": "4lwbtsdjnhmo@aloudata.com",
                "ban": null,
                "creationMode": "SYNC",
                "userSource": null
            }
        ],
        "total": 1,
        "pageNumber": 1,
        "pageSize": 20
    },
    "success": true,
    "code": "200",
    "errorMsg": null,
    "detailErrorMsg": null,
    "traceId": "27cb89dae3b64e238acc50d5458e93e5.188.17761339928042095"
}