获取设备列表

接口调用说明

请求地址 : /v1/api/device/get_list
请求方式 : POST

请求头

参数名 参数值 是否必须
Content-Type application/json
X-Token 实际accessToken

请求报文体

名称 类型 是否必须 备注
pageStart int 分页起始页(起始页=1)
pageSize int 分页大小(取值范围1~500)
deviceSnList String[] 设备序列号集合
//示例数据
{
    "pageStart": 1,
    "pageSize": 10,
    "deviceSnList": [
        "A10000010001",
        "A10000010002",
        "A10000010003",
        "A10000010004"
    ]
}

响应报文

名称 类型 是否必须 备注
code int 状态码
msg String 状态码解释信息
data Object 返回内容(详情见下表)

data内容如下:

名称 类型 是否必须 备注
page object 分页信息
items object[] 设备列表信息

page内容如下:

名称 类型 是否必须 备注
total int 总行数
curPage int 当前页数
size int 页大小

items内容如下:

名称 类型 是否必须 备注
deviceSn String 设备序列号
deviceType String 设备类型 (IPC/NVR/IPDOME/DVR)
deviceName String 设备名称
deviceState int 设备状态 (0离线 1在线 3未注册)
addTime String 设备添加时间,RFC3339格式
protocolType int 协议类型:1-中维协议3.0(原公有云协议),2-国标,3-国标下级平台
mac String 设备网卡地址
model String 设备型号
firmware String 固件版本
manufacture String 厂商
//示例数据
{
    "code": 1000,
    "msg": "OK",
    "data": {
        "page": {
            "total": 4,
            "curPage": 1,
            "size": 10
        },
        "items": [{
            "deviceSn": "A10000010001",
            "deviceType": "NVR",
            "deviceName": "JV NVR",
            "deviceState": 0,
            "addTime": "2020-08-27T18:32:52.000+08:00",
            "protocolType":2,
            "mac": "aa:bb:cc:dd:ee:ff",
            "model": "H6EV2-1",
            "firmware": "V2.210601",
            "manufacture": "JOVISION"
        }, {
            "deviceSn": "A10000010002",
            "deviceType": "",
            "deviceName": "",
            "deviceState": 0,
            "addTime": "2020-08-29T11:02:47.000+08:00",
            "protocolType":2,
            "mac": "aa:bb:cc:dd:ee:ff",
            "model": "H6EV2-1",
            "firmware": "V2.210601",
            "manufacture": "JOVISION"
        }, {
            "deviceSn": "A10000010003",
            "deviceType": "IPC",
            "deviceName": "CR1",
            "deviceState": 1,
            "addTime": "2020-08-29T17:35:32.000+08:00",
            "protocolType":1,
            "mac": "aa:bb:cc:dd:ee:ff",
            "model": "H6EV2-1",
            "firmware": "V2.210601",
            "manufacture": "JOVISION"
        }, {
            "deviceSn": "A10000010004",
            "deviceType": "IPC",
            "deviceName": "CR1 test",
            "deviceState": 1,
            "addTime": "2020-09-14T22:00:44.000+08:00",
            "protocolType":1,
            "mac": "aa:bb:cc:dd:ee:ff",
            "model": "H6EV2-1",
            "firmware": "V2.210601",
            "manufacture": "JOVISION"
        }]
    }
}

错误码

状态码 状态描述
1000 成功
1001 参数错误
1002 请求异常
1006 AccessToken异常或过期
1007 没有查询到数据

results matching ""

    No results matching ""