Premium APIsSoftware ManagementSoftware Management V1API Reference V1

Get the status of a firmware upgrade

Get Upgrades by Status:

GET /reports/{account}/status/{upgradeStatus}

Returns a list of all upgrades with a specified status. ThingSpace keeps upgrade history for six months.

Request Components

HTTP Request

GET https://thingspace.verizon.com/api/fota/v1/reports/{account}/status/{upgradeStatus}/index/{startIndex})

Resource Path and Query Parameters

You must include the account name and upgrade status in the path, plus the startIndex to specify the starting record.

Parameter NameData TypeDescription
account (required)stringThe name of the account. An account name is usually numeric, and must include any leading zeros.
upgradeStatus (required)stringThe status of the upgrades that you want to retrieve: RequestPending, Queued, RequestFailed, InProgress, Finished, UpgradeFailed
startIndex (required)integerThe zero-based number of the first record to return. Set startIndex=0 for the first request. If hasMoreFlag=true in the response, use the lastSeenUpgradeId value from the response as the startIndex in the next request.

Header Parameters

The request header must set the content-type to JSON, contain a current ThingSpace authorization token and a current VZ-M2M session token. For more details on how to get these tokens, visit Getting Started.

Parameter NameData TypeDescription
Authorization (required)stringHTTP Authorization bearer token: Authorization: Bearer {token}
VZ-M2M-Token (required)stringA valid session token: VZ-M2M-Token: {M2Mtoken}
Content-Type (required)stringMust be application/json Content-Type: application/json

Request Body

None.

Example Request

Request a list of all queued upgrades for an account:

curl https://thingspace.verizon.com/api/fota/v1/reports/$ACCOUNT/status/Queued/index/0  -H 'Authorization: Bearer $AUTH_TOKEN' -H 'VZ-M2M-Token: $M2M_TOKEN'

Success Responses

Status 200

A success response contains an array of firmware upgrades that have the specified status, sorted oldest to newest by upgrade date.

Parameter NameData TypeDescription
hasMoreFlagbooleanTrue if there are more records available.
lastSeenUpgradeIdintegerThe startIndex value to be used in the next request if hasMoreFlag is true.
reportListarrayArray of upgrade objects with the specified status.
idUUID stringThe unique identifier for the upgrade.
accountNamestringThe name (number) of the billing account.
firmwareNamestringThe name of the firmware image that will be used for the upgrade.
firmwareTostringThe name of the firmware version that will be on the devices after a successful upgrade.
startDatestringThe date that the upgrade is/was scheduled to start. An upgrade for a large number of devices may take more than one day to complete.
statusstringThe status of the upgrade.
deviceListarray of objectsA JSON object for each device that was included in the upgrade, showing the device IMEI, the status of the upgrade, and additional information about the status.
deviceIdstringThe device IMEI.
statusstringThe status of the upgrade for this device, which may be different from the overall upgrade status.
resultReasonstringMore information about the device’s upgrade status.
endDatestringThe date that the upgrade is scheduled to end.
autoAssignLicenseFlagbooleanValid values include: True and False:
autoAddDevicesFlagbooleanValid values include: True: and False:

Example Success Response

{
    "hasMoreFlag": false,
    "lastSeenUpgrdadeId": "efb8206b-eeee-ffff-gggg-31d8e87cd95f",
    "reportList": [
        {
            "id": "3ac8c863-eeee-ffff-gggg-dd5473e973bb",
            "accountName": "0242078689-00001",
            "firmwareName": "FOTA_Verizon_Model-A_01To02_HF",
            "firmwareTo": "VerizonFirmwareVersion-02",
            "startDate": "2018-04-02",
            "status": "Queued",
            "deviceList": [
                {
                    "deviceId": "900000000000002",
                    "status": "Device Accepted",
                    "resultReason": "success"
                },
                {
                    "deviceId": "900000000000003",
                    "status": "Device Accepted",
                    "resultReason": "success"
                }
            ],
            "endDate": "2018-04-04",
            "autoAssignLicenseFlag": true,
            "autoAddDevicesFlag": true
        },
        {
            "id": "efb8206b-eeee-ffff-gggg-31d8e87cd95f",
            "accountName": "0242078689-00001",
            "firmwareName": "FOTA_Verizon_Model-A_01To02_HF",
            "firmwareTo": "VerizonFirmwareVersion-02",
            "startDate": "2018-04-03",
            "status": "Queued",
            "deviceList": [
                {
                    "deviceId": "900000000000008",
                    "status": "Device Accepted",
                    "resultReason": "success"
                }
            ],
            "endDate": "2018-04-04",
            "autoAssignLicenseFlag": true,
            "autoAddDevicesFlag": true
        }
    ]
}

Failure Responses

Status 400

All error messages are returned in this format:

{
  "errorCode": "error code string",
  "errorMessage": "error message string"
}

Error codes and messages are listed on the Error Messages page, along with explanations and suggestions for corrective actions.

On this page