场景最后一次触发信息
更新时间:2025-11-21 13:22:46
调用该接口查询场景最后一次触发信息。
| 描述 | 值 |
|---|---|
| 路径 | /platform/scene/last/trigger/info |
| 版本号 | 1.0.0 |
| 协议 | HTTPS |
| 请求方法 | POST |
请求参数:
公共请求参数见 公共请求参数
| 请求字段 | 类型 | 必选 | 描述 |
|---|---|---|---|
| sceneId | Long | 是 | 场景id |
返回参数:
| 返回字段 | 类型 | 描述 |
|---|---|---|
| id | String | 用于识别请求记录,即对应的请求ID。 |
| code | Int | 接口返回码字段,请求成功时返回200;请求失败时返回详细的错误码。 |
| message | String | 调用失败时,返回的出错信息 |
| data | Object | 响应的结果。 |
| triggerTimestamp | Long | 场景触发的时间戳,utc 13位毫秒时间戳 |
| conditionUri | String | 匹配的场景条件类型,condition/device/property:属性规则,condition/device/event:事件规则 |
| message | String | 触发本次场景的消息内容, 消息内容格式同 数据同步-物的属性变更消息,数据同步-物的事件变更消息 |
请求示例:
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\" } }"
}
}