智读表API文档

查询不同状态的设备列表

基本信息

API前缀:详见简介

Path: /manage/device/status

Method: GET

接口描述:

companyId、applicationId、productKey都为空时查询所有设备,需要超级管理员权限;
productKey不为空时查询产品下所有设备,需要产品用户权限;
applicationId不为空时查询应用下所有设备,需要应用用户权限;
companyId不为空时查询公司下所有设备,需要企业用户权限;

请求参数

Headers

参数名称 参数值 是否必须 示例 备注
Content-Type application/x-www-form-urlencoded

Query

参数名称 参数类型 是否必须 示例 备注
currentPage text 当前页
pageSize text 每页大小
deviceStatus text 设备状态:1: 在线, 2: 休眠, 3: 离线, 4: 未激活
companyId text 公司ID:不为空时查询公司下的设备列表
applicationId text 应用ID(一级目录ID):不为空时查询应用下的设备列表
productKey text 产品KEY(二级目录):不为空时查询产品下的设备列表
access_token text 访问令牌,获取步骤详见 获取或者刷新token

返回数据

{
  "code": 200,
  "msg": "OK",
  "data": {
    "total": 1,
    "list": [
      {
        "id": 103,    //设备id                       
        "deviceName": "542a436b9c3b02f3", //设备名称(UUID序列号)
        "deviceTypeCode": 263,            //设备类型code
        "productId": 2,                   //产品id
        "deviceSecret": "COLsZpbqZj7lQxuRLVKQZdWBg55rZm2t",//密钥
        "productKey": "ZOtDKJz6YLm",                       //产品key
        "gmtCreate": "2019-03-08 21:33:04",                //创建时间
        "deviceStatus": 2,                                 //设备状态
        "longitude": null,                                  //经度
        "latitude": null,                                   //纬度
        "height": null,                                     //高度
        "networkType": 5,                                   //网络类型
        "description": "test_sever",                        //设备描述
        "sysVersion": "3.0.4",                              //系统版本号(固件版本号)
        "electricity": null,                                //电量
        "requestId": null,                                  //请求id
        "periodId": null,                                   //周期id
        "lastTime": null,                 
        "lastLogin": "2019-03-08 23:22:24",                 //上次登录时间
        "signal": null,                                     //信号
        "powerSupply": false,                               //供电方式,0电池供电,1电源供电
        "newBattery": 1,                                    //旧电池0,新电池1,电源供电2
        "batteryCapacity": 3800,                            //电池容量
        "meterNumber": null,                                //表计编号
        "houseNumber": null,                                //户号
        "houseName": null,                                  //户名
        "caliber": null,                                    //口径
        "meterLocationNumber": null,                        //表计位号
        "address": null,                                    //安装地址
        "maxCorrectValue": 500,
        "minCorrectValue": 10,
        "value": null,                                      
        "cValue": null,                                     
        "localIncrement": null,
        "cloudIncrement": null,
        "autoCorrecte": false,
        "repairStatus": "1",
        "dataServerIp": "0.0.0.0",
        "dataServerPort": 0,
        "recentPicPath": null,
        "energyId": null,
        "functionCode": null,
        "buildingId": null,
        "dataFrom": 0,
        "unit": null,
        "magnification": null,
        "dataBeanList": null,
        "deviceMotor": null
      }
    ],
    "pageNum": 1,
    "pageSize": 10,
    "size": 1,
    "startRow": 1,
    "endRow": 1,
    "pages": 1,
    "prePage": 0,
    "nextPage": 0,
    "isFirstPage": true,
    "isLastPage": true,
    "hasPreviousPage": false,
    "hasNextPage": false,
    "navigatePages": 8,
    "navigatepageNums": [
      1
    ],
    "navigateFirstPage": 1,
    "navigateLastPage": 1,
    "firstPage": 1,
    "lastPage": 1
  }
}