
# 分页查询用户 - SearchUsers
#### 描述
企业管理员通过该接口分页查询企业用户。
#### 调试
您可以在[API Explorer](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=Meeting&api=SearchUsers)中调试该接口。
#### URI
GET /v1/usg/dcs/corp/member
#### 请求参数
表1参数说明 
| 参数               | 是否必须 | 类型                | 位置     | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|:---|:---|:---|:---|:---|
| offset           | 否    | Integer           | Query  | 查询偏移量, 若超过最大数量，则返回最后一页。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| limit            | 否    | Integer           | Query  | 查询数量。 默认值：10                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| searchKey        | 否    | String            | Query  | 搜索条件，支持名称、手机、邮箱、账号、第三方User ID模糊搜索。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| sortField        | 否    | String            | Query  | 排序字段名称。 支持的取值： - userType  - adminType  - ldapAccount  - deptCode  - status  - sortLevel   |
| isAsc            | 否    | Boolean           | Query  | 是否按升序排序。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| deptCode         | 否    | String            | Query  | 部门编码，不带则查询所有。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| enableSubDept    | 否    | Boolean           | Query  | 是否查询子部门。 默认值: true                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| adminType        | 否    | Integer           | Query  | 根据管理员类型查询。 - 1：普通管理员  - 2：非管理员                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| enableRoom       | 否    | Boolean           | Query  | 查询SmartRooms用户。 说明： 该参数将废弃，请勿使用。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| userType         | 否    | Array of integers | Query  | 用户类型，若不携带，则默认查询普通用户。 - 2：普通用户  - 13：IdeaHub用户  - 14：SmartRooms用户                                                                                                                                                                                                                                                                                                                      |
| status           | 否    | Integer           | Query  | 用户状态。不带则查询所有。 - 0：正常  - 1：停用                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| containsUnActive | 否    | Boolean           | Query  | 是否查询未激活的终端。 默认值：false 说明： 该参数将废弃，请勿使用。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| X-Access-Token   | 是    | String            | Header | 授权令牌。获取"[执行App ID鉴权](https://support.huaweicloud.com/api-meeting/meeting_21_0311.html)"响应的accessToken。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| X-Request-Id     | 否    | String            | Header | 请求requestId，用来标识一路请求，用于问题跟踪定位，建议使用UUID，若不携带，则后台自动生成。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Accept-Language  | 否    | String            | Header | 语言参数，默认为中文zh-CN，英文为en-US。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
   
#### 状态码
表2状态码说明 
| HTTP状态码 | 描述        |
|:---|:---|
| 200     | 操作成功。     |
| 400     | 参数异常。     |
| 401     | 未鉴权或鉴权失败。 |
| 403     | 权限受限。     |
| 500     | 服务端异常     |
   
#### 响应参数
表3响应参数 
| 参数     | 类型                                                                                  | 描述                                                           |
|:---|:---|:---|
| count  | Integer                                                                             | 总数量。                                                         |
| limit  | Integer                                                                             | 每页显示的条目数量。 默认值：10。 |
| offset | Integer                                                                             | 页面起始页，从0开始。                                                  |
| data   | Array of [SearchUserResultDTO] objects | 分页查询企业用户信息。                                                  |
   
 表4SearchUserResultDTO 数据结构 
| 参数                   | 类型      | 描述                                                                                                                                                                                                                                                                                                                                                                                                         |
|:---|:---|:---|
| activeCode           | String  | 激活码。                                                                                                                                                                                                                                                                                                                                                                                                       |
| activeCodeExpireTime | Long    | 激活码到期时间，utc时间戳。                                                                                                                                                                                                                                                                                                                                                                                            |
| activeTime           | Long    | 激活时间，utc时间戳。                                                                                                                                                                                                                                                                                                                                                                                               |
| adminType            | Integer | 管理员类型。 - 0：默认（超级）管理员  - 1：普通管理员  - 2：非管理员（即为普通企业成员，UserType是2时有效）   |
| country              | String  | 手机所属国家。                                                                                                                                                                                                                                                                                                                                                                                                    |
| deptCode             | String  | 部门编码。                                                                                                                                                                                                                                                                                                                                                                                                      |
| deptNamePath         | String  | 部门完整名称。                                                                                                                                                                                                                                                                                                                                                                                                    |
| desc                 | String  | 备注。                                                                                                                                                                                                                                                                                                                                                                                                        |
| email                | String  | 邮箱。                                                                                                                                                                                                                                                                                                                                                                                                        |
| englishName          | String  | 英文名称。                                                                                                                                                                                                                                                                                                                                                                                                      |
| expireTime           | Long    | 已激活的终端到期时间，utc时间戳。                                                                                                                                                                                                                                                                                                                                                                                         |
| hidePhone            | Boolean | 是否隐藏手机号码。                                                                                                                                                                                                                                                                                                                                                                                                  |
| id                   | String  | 用户UUID。                                                                                                                                                                                                                                                                                                                                                                                                    |
| license              | Integer | 许可证。 - 0：商用  - 1：免费试用                                                                  |
| name                 | String  | 名称。                                                                                                                                                                                                                                                                                                                                                                                                        |
| phone                | String  | 联系电话。                                                                                                                                                                                                                                                                                                                                                                                                      |
| signature            | String  | 签名。                                                                                                                                                                                                                                                                                                                                                                                                        |
| sortLevel            | Integer | 通讯录排序等级，序号越低优先级越高。 maximum：10000 minimum：1                                                                                                                                                                                                                                                                                 |
| status               | Integer | 用户状态。 - 0：正常  - 1：停用                                                                                                                                          |
| thirdAccount         | String  | 第三方User ID。                                                                                                                                                                                                                                                                                                                                                                                                |
| title                | String  | 职位。                                                                                                                                                                                                                                                                                                                                                                                                        |
| userAccount          | String  | 华为云会议账号。                                                                                                                                                                                                                                                                                                                                                                                                   |
| userType             | Integer | 用户类型。 - 2：普通用户  - 13：IdeaHub用户  - 14：SmartRooms用户           |
| visionAccount        | String  | 智慧屏账号。                                                                                                                                                                                                                                                                                                                                                                                                     |
| vmrId                | String  | 个人会议ID。                                                                                                                                                                                                                                                                                                                                                                                                    |
   
#### 请求消息示例
```
GET /v1/usg/dcs/corp/member
Connection: keep-alive
X-Access-Token: stb7PzruAmA6d3JJD578jlAHczGfN4SIaup9
Content-Type: application/json
Content-Length: 125
Host: api.meeting.huaweicloud.com 
User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_191)
```
#### 响应消息示例
```
HTTP/1.1 200 
Date: Wed, 18 Dec 2019 06:20:40 GMT
Content-Type: application/json;charset=UTF-8
Content-Length: 1329
Connection: keep-alive
Pragma: No-cache
Cache-Control: no-cache
Server: api-gateway
X-Request-Id: 63facce44898efa03629afd189da7f0f
{
    "count": 1,
    "data": [
        {
            "activeCode": null,
            "activeCodeExpireTime": null,
            "activeTime": 1601221696783,
            "adminType": 2,
            "country": "chinaPR",
            "deptCode": "1",
            "deptNamePath": "根部门",
            "desc": "desc",
            "email": "******",
            "englishName": "englishName",
            "expireTime": null,
            "hidePhone": false,
            "id": "a7f78791553d4ec6b3a4b721f0946286",
            "license": 0,
            "name": "name",
            "phone": "+86123456789",
            "signature": "signature",
            "sortLevel": 10000,
            "status": 0,
            "thirdAccount": "thirdAccount",
            "title": "manager",
            "userAccount": "4036ca5e54d144d9b9e3ed25b9368d3a",
            "userType": 2,
            "visionAccount": null,
            "vmrId": "911150978"
        }
    ],
    "limit": 10,
    "offset": 0
}
```
#### 错误码
当您使用华为云会议服务端API时，如果遇到"MMC"或者"USG"开头的错误码，请参考[华为云API错误中心](https://apierrorcenter.developer.huaweicloud.com/apierrorcenter/errorcode?product=Meeting)。
#### CURL命令示例
```
curl -k -i -X GET -H 'X-Access-Token: stb7PzruAmA6d3JJD578jlAHczGfN4SIaup9' https://api.meeting.huaweicloud.com/v1/usg/dcs/corp/member
```
