URL: http://ota.heclouds.com/ota/device/version
The interface needs to be called to report version number to the platform when the device is upgraded for the first time.
I only want to see examples!!!
Param-name | Format | Required or not | Description |
---|---|---|---|
Content-Type | string | Yes | Must be application/json. |
Authorization | string | Yes | Security authentication information |
Param-name | Format | Required or not | Description |
---|---|---|---|
dev_id | long | Yes | Device id |
Param-name | Format | Required or not | Description |
---|---|---|---|
f_version | string | No | Module version number |
s_version | string | No | Application service version number |
Param-name | Format | Description |
---|---|---|
errno | int | Call error code, where 0 means success. |
error | string | Error description, where “succ” means success. |
If OTA is required to be used for the upgrade of the device, the interface is needed to be called to report current version of the device;
The platform will bind corresponding version number and device for storage.
If there is an upgrade task for the device, and the version reported now is the target version of the task, the platform will set the upgrade task to “completed” status.
The version number shall consist of less than or equal to 20 characters, and be limited to one or a combination of numbers, letters, dashes, dots, and underlines.
POST http://ota/device/version?dev_id=32981907
Authorization:version=2018-10-31&res=products/33704&et=2529385073&method=sha1&sign=RccQWjT1n5OJ2khw3M4aPckkiFs=
Content-Type:application/json
Host: api.heclouds.com
{
"f_version":"1.0", //module version No.
"s_version":"2.0" //application software version No.
}
{
"errno": 0,
"error":“succ”
}