/api/device/upgrade

Use this interface to set device upgrade.

Device operating permissions are required.

Prototype

Protocol HTTP/HTTPS POST
URL ip[:port]/api/device/upgrade
Content-Type Request: Content-Type: application/json
Response: Content-Type: application/json

Request Cookies

Parameter Description
mwcloud-sid A string that is used to identify current logged-in user.
mwcloud-uid Current logged-in username.
Request Body
Parameter Description
sn Specified set of device serial numbers that have been approved.
firmware-id Firmware ID.

Request Example

POST /api/device/upgrade HTTP/1.1
Accept: application/json, text/plain, */*
Content-Type: application/json;charset=utf-8
Content-Length: 24
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;
{
    "sn":["A304200731003"],
    "firmware-id":21
}

Response Parameters

Response Header
Parameter Description
Content-Type Value: 'application/json; charset=UTF-8'
Response Body
Parameter Description
result Result code
details Device Upgrade Status
Device Upgrade Status
Parameter Description
sn Device serial number
result Upgrading result status code

Possible device upgrade results:

Error Code Description
MW_STATUS_DEVICE_TYPE_ERROR Firmware does not match the device type
MW_STATUS_NOT_EXIST The device does not exist.
MW_STATUS_DEVICE_LOST The device is offline.
MW_STATUS_DEVICE_BUSY The device is currently being upgraded.

Response Example

HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
content-length: xx
{
    "details":[
        {
            "result":0,
            "sn":"A304200731003"
        }
    ],
    "result":0
}

results matching ""

    No results matching ""

    results matching ""

      No results matching ""