查询设备列表

调用此接口,条件查询设备列表。

接口路径

/api/device/getDeviceList

请求方式

[GET]

请求参数

路径参数:

参数名称 数据类型 是否必须 说明
page number 是 页码,从0开始,默认为0
size number 是 每页记录数,最大为100,默认为10
pk String 否 产品pk
keyword String 否 模糊搜索关键词,设备名称或设备ID
deviceType String 否 节点类型。普通设备:GENERAL;中继设备:SWITCH;网关设备:GATEWAY;终端子设备:TERMINAL
online boolean 否 设备在离线状态,true为在线

Headers:

参数名称 参数值 是否必须
Authorization {token} 是

返回参数

名称 类型 是否必须 说明
totalElements number 是 查询记录总数
totalPages number 是 查询记录总页数
page String 是 页码
size String 是 每页记录数
content array 是 查询到的设备信息
以下为content内容 - - -
name String 否 设备名称
createdDate number 否 创建时间(ms)
updatedDate number 否 更新时间(ms)
enable boolean 否 是否可用
pk String 否 所属产品pk
devId String 否 设备devId
online boolean 否 在线状态
devSecret String 否 设备密钥
loginTime number 否 最近一次登录时间(ms)
logoutTime number 否 最后一次登出时间(ms)
registerTime number 否 注册时间(ms)
firstLoginTime number 否 上电激活时间(ms)
deviceType String 否 设备类型
ipInfo object 否 IP信息
moduleVersion String 否 模组固件版本
mcuVersion String 否 mcu固件版本
configVersion String 否 远程配置版本
batchName String 否 批次名称
imei String 否 设备imei

【示例】:

{
    "totalElements": 1,
    "page": 0,
    "size": 10,
    "content": [
        {
            "rootPk": "a987e**********3fef6cee",
            "name": "测试围栏3",
            "rootDevId": "loc*******eway",
            "parentPk": "a987e*********3fef6cee",
            "parentDevId": "loca******eway",
            "createdDate": 1600932306754,
            "updatedDate": 1600932317186,
            "enable": true,
            "pk": "ab235db**********90c829db85",
            "devId": "B01_F*******CE_00003",
            "online": false,
            "devSecret": "4098b97**********8fa73fbf8b",
            "loginTime": 1600932317185,
            "logoutTime": null,
            "registerTime": 1600932306754,
            "firstLoginTime": 1600932317185,
            "deviceType": "TERMINAL",
            "ipInfo": {
                "ip": "10*.*.*.9",
                "country": null,
                "province": null,
                "city": "内网IP"
            },
            "moduleVersion": null,
            "mcuVersion": null,
            "configVersion": null,
            "batchName": null,
            "imei": null,
            "tags": null
        }
    ],
    "totalPages": 1
}

results matching ""

    No results matching ""

    results matching ""

      No results matching ""