URL: http://ota.heclouds.com/ota/south/download/{token}/check
This API can be used as needed during device upgrade process by users, and this operation is optional.
I only want to see examples!!!
Name | Format | Required or not | Description |
---|---|---|---|
Content-Type | string | Yes | Must be application/json. |
Authorization | string | Yes | Security authentication information |
Name | Format | Required or not | Description |
---|---|---|---|
dev_id | long | Yes | Device id |
Name | Format | Description |
---|---|---|
errno | int | Call error code, where 0 means success. |
error | string | Error description, where “succ” means success. |
Error Codes | Description |
---|---|
0 | Valid |
4 | Token and did are inconsistent. |
7 | OneNET internal error. |
12 | Token is expired and device upgrade process flow is ended. |
17 | Invalid status. Token can only be verified when the upgrade task of the device is to be upgraded or under downloading. Token verification is not supported in other status. |
20 | Upgrade task is completed and device upgrade process is ended. |
21 | Invalid operation, sdk logic error. |
22 | Upgrade task is cancelled, it is unnecessary to report upgrade failure. |
After obtaining task information through task detection interface for the device, it is required to carry out token detection through token detection interface (since token is only valid within 2 days).
After token detection interface is called successfully, the platform will change device upgrade task status from “to be upgraded” to “downloading”.
{
"errno": 0,
"error": "succ"
}