设备上报文件下载结果
功能描述
设备上报文件下载结果。
Topic
Topic: $oc/devices/{device_id}/sys/events/up
参数说明
| 字段名 | 必选/可选 | 类型 | 参数描述 |
|---|---|---|---|
| object_device_id | 可选 | String | 事件对应的最终目标设备,没有携带则表示目标设备即topic中指定的设备 |
| services | 可选 | List<ServiceEvent> | 事件服务列表 |
ServiceEvent定义表
| 字段名 | 必选/可选 | 类型 | 参数描述 |
|---|---|---|---|
| service_id | 必选 | String | $file_manager |
| event_type | 必选 | String | download_result_report |
| event_time | 可选 | String | 事件时间 |
| paras | 必选 | Object | 事件参数JSON对象 |
paras参数列表
| 字段名 | 必选/可选 | 类型 | 参数描述 |
|---|---|---|---|
| object_name | 必选 | String | OBS下载对象名称 |
| result_code | 必选 | Integer | 设备下载文件状态,结果码定义如下:
|
| status_code | 可选 | Integer | 文件下载到OBS返回的状态码 |
| status_description | 可选 | String | 文件下载到OBS时状态的描述 |
示例
Topic: $oc/devices/{device_id}/sys/events/up
数据格式:
{
"object_device_id": "{object_device_id}",
"services": [{
"service_id": "$file_manager",
"event_type": "download_result_report",
"event_time": "20151212T121212Z",
"paras": {
"object_name": "c6b39067b0325db34663d3ef421a42f6_12345678_a.jpg",
"result_code": 0,
"status_code": 200,
"status_description": "download success"
}
}]
} Last Article: 平台下发文件下载临时URL
Next Article: 设备时间同步
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.