[关闭]
@soszrg 2019-06-19T02:41:37.000000Z 字数 851 阅读 348

非FogCloud平台设备OTA

v3文档


设备用OTA接口


设备通过产品ID检查OTA

PUT /v3/ota/product/

请求参数

参数名 类型 必须 说明
productid string 产品ID
dsn string 设备串号或MAC地址
component string 固件名称

返回值

  1. {
  2. "meta":{
  3. "message":"ota file info",
  4. "code":0
  5. },
  6. "data":{
  7. "files":[
  8. {
  9. "file_url":"https://test.com/a.bin",
  10. "component":"test1",
  11. "md5":"1abx..",
  12. "version":"1.0.1",
  13. "customize":""
  14. },
  15. {
  16. "file_url":"https://test.com/a.bin",
  17. "component":"test2",
  18. "md5":"1safa...",
  19. "version":"1.0.1",
  20. "customize":""
  21. }
  22. ],
  23. "otid":25
  24. }
  25. }

字段说明

返回值字段 字段类型 字段说明
need_upgrade bool 是否需要升级
otid int 任务ID
files list 升级文件列表

错误码

错误代码 错误说明
10000 参数错误:具体信息见Response的message字段

设备通过产品ID上报OTA完成的通知

PUT /v3/ota/product/log/

请求参数

参数名 类型 必须 说明
productid string 设备ID
dsn string 设备串号或MAC地址
otid string 任务ID
isfinished bool 设备固件是否全部更新完成,默认为true
components string Array 本次更新完成的固件名称列表
customize string 用户自定义字符串

返回值

  1. {
  2. "meta":{
  3. "message":"ok",
  4. "code":0
  5. },
  6. "data":{
  7. }
  8. }

错误码

错误代码 错误说明
10000 参数错误:具体信息见Response的message字段

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注