getDeviceApLatestAlarmMessage:查询配件最近一条报警消息
功能详情
查询配件最近一条报警消息。
请求地址
https://openapi.lechange.cn/openapi/getDeviceApLatestAlarmMessage
子账户token请求所需最小权限
"Permission":"DevControl" "Resource":"dev:序列号"
传入参数说明
参数名 | 参数类型 | 是否必填 | 默认值 | 合法值 | 参数说明 |
---|---|---|---|---|---|
token | String | 是 | 管理员或者子账户accessToken | ||
deviceId | String | 是 | G2、TP7i等具有网关功能的设备序列号 | ||
apId | String | 是 | 配件序列号 |
样例输入
{
"system":{
"ver":"1.0",
"appId":"lcdxxxxxxxxx",
"sign":"85384489874412a2e9aa7ac3a8b08309",
"time":1603350639,
"nonce":"350f4c7a-a352-46cf-ae03-f4f526f5d99f"
},
"id":"b8f45dbb-79ad-4a7e-8b24-7eb618c5191f",
"params":{
"token":"At_00000ad9e6e87f0142eb92e207aec46a",
"deviceId":"MEGREZ0000001842",
"apId":"MEGREZ0000001452"
}
}
返回data字段说明
字段名 | 字段类型 | 字段说明 | |
---|---|---|---|
apAlarms | alarmId | Long | 配件告警消息id |
apId | String | 配件序列号 | |
name | String | 配件名称 | |
time | String | 设备本地报警时间,格式:yyyy-MM-dd HH:mm:ss | |
type | String | 配件报警类型 | |
apType | String | 配件类型 | |
hasLinkage | Boolean | 是否存在联动消息,true/false |
样例输出
{
"id":"b8f45dbb-79ad-4a7e-8b24-7eb618c5191f",
"result":{
"code":"0",
"msg":"操作成功",
"data": {
"apAlarms":[
{
"alarmId":123,
"apId":"MEGREZ0000001452",
"name":"test",
"time":"2020-08-10 12:12:00",
"type":"smokeAlarm",
"apType":"alarmBell",
"hasLinkage":"true"
}
]
}
}
}