/api/update/status

Use this interface to get the current status of the upgrade service.

view system configuration permissions are required.

Prototype

Protocol HTTP/HTTPS GET
URL ip[:port]/api/update/status
Content-Type 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 URL parameters

Parameter Description
start Optionally, you can set the starting sequence number of the historical versions.
count Optionally, you can set the number of historical versions.

Request Example

GET /api/update/status HTTP/1.1
Accept: application/json, text/plain, */*
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;

Response Parameters

Response Header
Parameter Description
Content-Type Value: 'application/json; charset=UTF-8'
Response Body
Parameter Description
result Result code
status Update service status, refer to Update Service Status
Update Service Status
Parameter Description
state Status, refer to Update Service Status Codes
progress When the state is MH_UPDATE_STATE_PULLING, it is valid, indicating the progress of downloading the firmware, with a value ranging from 0 to 100.
enable-update Upgrade enable status, including both online and manual
version Current firmware version
online-status Online upgrade information, refer to Online Upgrade Information
Update Service Status Codes
Value Description
0 Idle
0x1 Checking local information
0x2 Checking online version
0x4 Pulling firmware
0x8 Verifying firmware
0x10 Uploading firmware
0x20 Canceling current operation
0x40 Upgrade completed, restarting
0x100 Upgrade service unavailable
0x200 Upgrade failed, error code stored in update-result
Online Upgrade Information
Value Description
date Last check time
check-result Last check result
update-result Current update status error code
is-newest Whether it is the latest version
newest-version Latest version information
enable Whether to enable online upgrade detection
enable-expr Whether to include pre-release versions when checking online versions
versions Online version list information, refer to Online version list information
Online Version List Information
Parameter Description
start Starting number
total Total number of historical versions
list Online version list information, which may be an empty array, see version information for the structure.
Version
Parameter Description
version Version number
is-expr Pre-release version
date Release date

Response Example

{
    "result": 0,
    "status": {
        "state": 0,
        "version": "2.1.28",
        "progress": 0,
        "enable-update": true,
        "os-name": "Debian GNU/Linux 11 (bullseye)",
        "online-status": {
            "date": 1694400871,
            "check-result": 0,
            "update-result": 0,
            "is-newest": true,
            "newest-version": {
                "version": "2.1.28",
                "digest": "a487eef9d3e5a81ef9ff8deb143e61a086bc01196d1dce8ff1a1424aff9e44b3",
                "is-expr": true,
                "date": 1693884985
            },
            "enable": true,
            "enable-expr": true,
            "versions": {
                "list": [
                    {
                        "version": "2.1.27",
                        "digest": "7cd2737135b7e826d44fa9ceae65c72bd84520b0899bafe7f912cd6bda5385e5",
                        "is-expr": true,
                        "date": 1693788867
                    },
                    {
                        "version": "2.1.26",
                        "digest": "550c2abaa1453ddb912ebc6d7b5233a046006b6c1c546115507e2084c8258bca",
                        "is-expr": true,
                        "date": 1693381926
                    },
                    {
                        "version": "2.1.25",
                        "digest": "53ecb3892f3090591012dfb1387dcf0562ebe5f41589a8a75151da556e56dc40",
                        "is-expr": true,
                        "date": 1693373940
                    }
                ],
                "start": 1,
                "total": 50
            }
        },
        "info": ""
    }
}

results matching ""

    No results matching ""

    results matching ""

      No results matching ""