Skip to content

queryDeviceMsg

调用该接口查询设备消息。

使用说明

暂无

接口地址

/gateway/openapi

请求方式

POST

请求参数

请求头

名称类型描述
tokenauthorizationString平台颁发的token
apiCodeString固定值:queryDeviceMsg

请求参数

QueryDeviceMsgRequest

名称类型是否必选描述
productKeyString产品key
deviceNameString设备名称
blockPidString模块标识符,默认是defaultModule

返回数据

QueryDeviceMsgResponse

名称类型描述
codeString调用成功,返回0,调用失败,查看错误信息。
msgString调用成功,提示"操作成功",调用失败,查看错误信息。
dataObject返回结果。结果内容详情,查看下方示例。

deviceMsgList

名称类型描述
deviceIdString设备ID
productKeyString产品Key
deviceNameString设备名称
propertyIdString属性id
blockIdString模块id
pidString参数标识符
nameString参数名称
typeString数据类型
desiredString属性期望值
newValueString属性最新值
specsUnitNameString属性单位id(int、float、double类型特有)
updateTimeDate更新时间:格式为yyyy-MM-dd HH:mm:ss
startTimeDate查询开始时间:格式为yyyy-MM-dd HH:mm:ss
endTimeDate查询结束时间:格式为yyyy-MM-dd HH:mm:ss
rateString频率
blockPidString模块标识符

示例

请求示例

json
{
  "blockId": "54abbeacdb2d4ce287da69f294f1cd23",
  "blockPid": "defaultModule",
  "deviceId": "652be77b0d0147c3805807e4b8e55e8e",
  "productKey": "r1FnjRnGR",
  "deviceName": "X2ZQe4QS4"
}

返回示例

json
{
    "code": "0",
    "msg": "操作成功",
    "data": [
      {
        "deviceId": "6b80757247c74a63a48c881813d13dc9",
        "productKey": "r1FnjRnGR",
        "deviceName": "U2cX8vXkv",
        "propertyId": "fceb9ffe6d0843f6aaa8dda47d93fe2c",
        "blockId": "54abbeacdb2d4ce287da69f294f1cd23",
        "pid": "bts",
        "name": "基站信息",
        "type": "text",
        "desired": null,
        "newValue": "460,11,9523,116975893,-60|",
        "specsUnitName": null,
        "updateTime": "2023-10-10 19:42:52",
        "startTime": null,
        "endTime": null,
        "rate": null,
        "blockPid": null
      }
    ]
}