@soszrg
2019-06-19T02:41:37.000000Z
字数 851
阅读 348
v3文档
PUT /v3/ota/product/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| productid | string | 是 | 产品ID |
| dsn | string | 否 | 设备串号或MAC地址 |
| component | string | 否 | 固件名称 |
返回值
{"meta":{"message":"ota file info","code":0},"data":{"files":[{"file_url":"https://test.com/a.bin","component":"test1","md5":"1abx..","version":"1.0.1","customize":""},{"file_url":"https://test.com/a.bin","component":"test2","md5":"1safa...","version":"1.0.1","customize":""}],"otid":25}}
字段说明
| 返回值字段 | 字段类型 | 字段说明 |
|---|---|---|
| need_upgrade | bool | 是否需要升级 |
| otid | int | 任务ID |
| files | list | 升级文件列表 |
错误码
| 错误代码 | 错误说明 |
|---|---|
| 10000 | 参数错误:具体信息见Response的message字段 |
PUT /v3/ota/product/log/
请求参数
| 参数名 | 类型 | 必须 | 说明 |
|---|---|---|---|
| productid | string | 是 | 设备ID |
| dsn | string | 是 | 设备串号或MAC地址 |
| otid | string | 是 | 任务ID |
| isfinished | bool | 否 | 设备固件是否全部更新完成,默认为true |
| components | string Array | 否 | 本次更新完成的固件名称列表 |
| customize | string | 否 | 用户自定义字符串 |
返回值
{"meta":{"message":"ok","code":0},"data":{}}
错误码
| 错误代码 | 错误说明 |
|---|---|
| 10000 | 参数错误:具体信息见Response的message字段 |