Report status
Request format:
POST
URL: http//ota.heclouds.com/ota/south/report
When using the API, it is needed to be called twice. Download-related status code shall be reported first (Result=1xx), and then upgrade-related status code shall be reported (Result=2xx).
I only want to see examples!!!
Name |
Format |
Required or not |
Description |
Authorization |
string |
Yes |
Security authentication information |
http request parameter
Name |
Format |
Required or not |
Description |
dev_id |
long |
Yes |
Device id |
token |
string |
Yes |
Detect the token returned by the upgrade task. |
http body content
Name |
Format |
Required or not |
Description |
result |
int |
Yes |
Please refer to result explanation for details. |
Return Parameter
Name |
Format |
Description |
errno |
int |
Call error code, please refer to the description of error code. |
error |
string |
Error description, where “succ” means success. |
result explanation
result Code | Description | result Code | Description |
101 | Upgrade package downloaded successfully | 102 | Download failed, insufficient space |
103 | Download failed, memory overflow | 104 | Download failed, download request timed out |
105 | Download failed, battery low | 106 | Download failed, weak signal |
107 | Download failed, unknown exception | - | - |
201 | Upgrade succeed | 202 | Upgrade failed, battery low |
203 | Upgrade failed, memory overflow | 204 | Upgrade failed, inconsistent version |
203 | Upgrade failed, memory overflow | 204 | Upgrade failed, inconsistent version |
205 | Upgrade failed, MD5 verification failed | 206 | Upgrade failed, unknown exception |
207 | Maximum number of times of retry reached | 208 | Device upgrade expired |
Error Code Description
Error Codes | Description |
0 | Information reported successfully. |
1 | Information report failed, token authentication failed |
2 | Report failed, status code reported cannot be recognized. |
20 | Information report failed, upgrade task completed. |
21 | Invalid operation, sdk logic error. |
22 | Information report failed, upgrade task cancelled. |
24 | Request content result error. |
Request parameter example
{
"result": 101
}
Return Example
{
"errno": 0,
"error": "succ"
}