跳到主要内容

场景最后一次触发信息

更新时间:2025-11-21 13:22:46

调用该接口查询场景最后一次触发信息。


描述
路径/platform/scene/last/trigger/info
版本号1.0.0
协议HTTPS
请求方法POST

请求参数:

公共请求参数见 公共请求参数

请求字段类型必选描述
sceneIdLong场景id

返回参数:

返回字段类型描述
idString用于识别请求记录,即对应的请求ID。
codeInt接口返回码字段,请求成功时返回200;请求失败时返回详细的错误码。
messageString调用失败时,返回的出错信息
dataObject响应的结果。
triggerTimestampLong场景触发的时间戳,utc 13位毫秒时间戳
conditionUriString匹配的场景条件类型,condition/device/property:属性规则,condition/device/event:事件规则
messageString触发本次场景的消息内容, 消息内容格式同 数据同步-物的属性变更消息数据同步-物的事件变更消息

请求示例:

x-ca-key: xxxxxxxx
x-ca-timestamp: 1728634151000
x-ca-nonce: 7b25fc15b9434dd98587a077a92b7e42
x-ca-signature: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
Content-Type: application/json;charset=UTF-8

{
"id": "49a7be925e******9b08ba0facf7",
"version": "1.0",
"request": {
"apiVer": "1.0.0"
},
"params": {
"sceneId": 1
}
}

成功返回示例:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache

{
"id": "49a7be925e******9b08ba0facf7",
"code": 200,
"message": "success",
"data": {
"triggerTimestamp": 1590000000000,
"conditionUri": "condition/device/event",
"message": "{ \"deviceType\": \"常电摄像机\", \"identifier\": \"Open****\", \"iotId\": \"OfEiaUv**********fXQzu\", \"name\": \"开****通知\", \"time\": 1737083508000, \"type\": \"info\", \"productKey\": \"OfEiaUv******fP\", \"deviceName\": \"TSV**********fXQzu\", \"value\": { \"KeyID\": \"x8******DY\", \"Method\": \"fin******t\" } }"
}
}