start-upgrade
Use the interface to update firmware for one or multiple devices.
Batch update requires the devices with the same Product family ID, Product model ID and hardware version.
Only available for users with administrative rights.
Ensure that the target firmware file is available before operation. You can get all firmware version of specified devices by using get-all-firmwares.
Prototype
Protocol |
HTTP/HTTPS POST |
URL |
ip[:port]/sc_cloud/upgrade/start |
Data Format |
Request: Content-Type: application/json Response: Content-Type: application/json |
Request Cookies
Parameter |
Description |
mwcloud-sid |
A string value that is used to uniquely identify user logged-in. |
mwcloud-uid |
Current logged-in username. |
Request Body
Parameter |
Description |
sn |
Specify the device SN which will perform update operation. |
firmware-id |
Firmware index on Cloud obtained using get-all-firmwares. |
Request Example
POST /sc_cloud/upgrade/start HTTP/1.1
Accept: application/json, text/plain, */*
Content-Type: application/json;charset=utf-8
Content-Length: 41
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;
{
"sn":["A302190930002"],
"firmware-id":21
}
Response Parameters
Parameter |
Description |
Content-Type |
Value: 'application/json; charset=UTF-8' |
Response Body
Parameter |
Description |
result |
Result code. The options are as follows:- 0: success.
- Other values. For details about the result codes, please refer to API Status.
|
method |
start-upgrade |
details |
Update results. |
details
Update results are as follows.
Parameter |
Description |
result |
Result code. The options are as follows:- 0: success.
- 1: repeat operations.
- Other values. For details about the result codes, please refer to API Status.
|
sn |
the SN of update devices. |
Response Example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 83
{
"result": 0,
"method": "start-upgrade",
"details": [
{
"sn": "A302190930002",
"result": 0
}
]
}