Appearance
设备列表查询接口
- 功能:分页查询设备列表。
- 请求路径:/v1/device/queryDeviceByPage
- 请求方式:GET
- 请求参数:
| 名称 | 类型 | 必须 | 描述 |
|---|---|---|---|
| sn | string | 否 | 设备号 |
| pageNo | int | 是 | 第几页,从1开始 |
| pageSize | int | 是 | 每页数量,最大值为100 |
- 返回值:
| 名称 | 类型 | 描述 |
|---|---|---|
| total | int | 数据总数 |
| pages | int | 总页数 |
| size | int | 每页数量 |
| current | int | 第几页 |
| records | list | 设备数据列表 |
records返回值:
| 名称 | 类型 | 描述 |
|---|---|---|
| sn | string | 节点SN |
| deviceType | int | 设备类型(1小盒子,2工控机,3x86,4手机) |
| modelType | int | 设备架构:1 android,2 arm,3 x86 |
| osName | string | 操作系统名称 |
| archName | string | CPU架构 |
| osVersion | string | 操作系统版本 |
| province | string | 省份 |
| city | string | 城市 |
| isp | string | 运营商 |
| macAddr | string | mac地址 |
| onlineCode | int | 在线状态 |
| lastPingTime | date | 最后心跳时间 |
| bizOnlineCode | int | 业务在线状态 |
| bizOnlineUpdatedAt | date | 最后心跳时间 |
| bizStatus | int | 调度状态 |
| bizName | string | 业务名称 |
| upStreamNatType | int | 上游NAT类型 |
| upBandwidth | double | 上行带宽 |
| upBandwidthTime | date | 上行带宽检测时间 |
| createdAt | date | 上机时间 |
返回示例:
json
//正常请求:
//http code 0
{
"code": 0,
"message": "操作成功!",
"data": {
"records": [
{
"sn": "XXXXXX",
"deviceType": 1,
"modelType": 2,
"osName": "linux",
"archName": "arm64",
"osVersion": "18.04",
"province": "北京",
"city": "北京",
"isp": "联通",
"macAddr": "00:e0:4c:58:06:f3",
"onlineCode": 1,
"lastPingTime": "2025-11-06 12:39:54",
"bizOnlineCode": 1,
"bizOnlineUpdatedAt": "2025-11-12 10:20:11",
"bizStatus": 1,
"bizName": "W1",
"upStreamNatType": -1,
"upBandwidth": 1.0,
"upBandwidthTime": "2025-11-06 06:23:51",
"createdAt": "2025-11-05 15:45:00"
},
{...}
],
"total": 2,
"size": 100,
"current": 1,
"orders": [],
"hitCount": false,
"searchCount": true,
"pages": 1
}
}json
//异常请求:
//http code 4xx/5xx
{
"code": 500,
"message": "签名失败",
"data": null
}