
# 分页查询终端 - SearchDevices
#### 描述
企业管理员通过该接口分页查询专业会议终端信息。
![](https://support.huaweicloud.com/api-meeting/public_sys-resources/note_3.0-zh-cn.png)
如果需要查询IdeaHub、SmartRooms请使用"[分页查询用户](https://support.huaweicloud.com/api-meeting/meeting_21_0071.html)"接口。
#### 调试
您可以在[API Explorer](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=Meeting&api=SearchDevices)中调试该接口。
#### URI
GET /v1/usg/dcs/corp/device
#### 请求参数
表1参数说明 
| 参数              | 是否必须 | 类型      | 位置     | 描述                                                                                                                                                                                                                                               |
|:---|:---|:---|:---|:---|
| offset          | 否    | Integer | Query  | 查询偏移量，若超过最大数量，则返回最后一页。                                                                                                                                                                                                                           |
| limit           | 否    | Integer | Query  | 查询数量。 默认值：10                                                                                                                                                                                             |
| searchKey       | 否    | String  | Query  | 搜索条件。支持名称、SN模糊查询。                                                                                                                                                                                                                                |
| model           | 否    | String  | Query  | 终端型号，枚举类型。当前支持TE系列硬件终端，具体的终端类型可以通过[获取所有终端类型 - ShowDeviceTypes](https://support.huaweicloud.com/api-meeting/meeting_21_0092.html)接口查询。 maxLength：128 minLength：0 |
| deptCode        | 否    | String  | Query  | 部门编码，默认为根部门。 默认值：1 maxLength：32 minLength：0                                                                         |
| enableSubDept   | 否    | Boolean | Query  | 是否查询子部门。 默认值：true                                                                                                                                                                                        |
| 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 [QueryDeviceResultDTO](https://support.huaweicloud.com/api-meeting/meeting_21_0088.html#ZH-CN_TOPIC_0212714487__table362024854114) objects | 终端信息列表。                                                    |
   
#### 请求消息示例
```
GET /v1/usg/dcs/corp/device 
Connection: keep-alive
X-Access-Token: stbVbWSIgzfOQ8JnbmPIoBIR3ig8xnVScQOF
Content-Type: application/json
Content-Length: 119
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: 481
Connection: keep-alive
Pragma: No-cache
Cache-Control: no-cache
Server: api-gateway
X-Request-Id: 3df9b4a1b0f8e77050d27a858add946c 
{
    "offset": 0,
    "limit": 10,
    "count": 1,
    "data": [
        {
            "name": "test",
            "type": "TE",
            "model": "TE20",
            "sn": "asdasfscasd",
            "account": "df8bce2178294683bb83a4985fef7165",
            "number": "+991118029589",
            "prjCodeMode": 0,
            "deptCode": "1",
            "deptName": "wangyue",
            "deptNamePath": "wangyue",
            "phone": "+86***********",
            "country": "chinaPR",
            "email": "******",
            "description": "test",
            "status": 0
        }
    ]
}
```
#### 错误码
当您使用华为云会议服务端API时，如果遇到"MMC"或者"USG"开头的错误码，请参考[华为云API错误中心](https://apierrorcenter.developer.huaweicloud.com/apierrorcenter/errorcode?product=Meeting)。
#### CURL命令示例
```
curl -k -i -X GET -H 'X-Access-Token: stbVbWSIgzfOQ8JnbmPIoBIR3ig8xnVScQOF' https://api.meeting.huaweicloud.com/v1/usg/dcs/corp/device
```
