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}]((e/Software%20Management%20Reports%20V1/ListUpgradesForSpecifiedStatus)) ## 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 Name | Data Type | Description | |-----|-----|-----| | **account** *(required)* | string | The name of the account. An account name is usually numeric, and must include any leading zeros. | **upgradeStatus** *(required)* | string | The status of the upgrades that you want to retrieve: **RequestPending**, **Queued**, **RequestFailed**, **InProgress**, **Finished**, **UpgradeFailed**| | **startIndex** *(required)* | integer | The 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](https://thingspace.verizon.com/documentation/api-documentation.html#/http/session-management/guides/getting-started). | Parameter Name | Data Type | Description | |-----|-----|-----| | **Authorization** *(required)* | string | HTTP Authorization bearer token: `Authorization: Bearer {token}` | | **VZ-M2M-Token** *(required)* | string | A valid session token: `VZ-M2M-Token: {M2Mtoken}` | | **Content-Type** *(required)* | string | Must be application/json `Content-Type: application/json` | ## Request Body None. ## Example Request Request a list of all queued upgrades for an account: ```json 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 Name | Data Type | Description | |-----|-----|-----| | **hasMoreFlag** | boolean | True if there are more records available. | | **lastSeenUpgradeId** | integer | The `startIndex` value to be used in the next request if `hasMoreFlag` is true. | | **reportList** | array | Array of upgrade objects with the specified status. | | **id** | UUID string | The unique identifier for the upgrade. | | **accountName** | string | The name (number) of the billing account. | | **firmwareName** | string | The name of the firmware image that will be used for the upgrade. | | **firmwareTo** | string | The name of the firmware version that will be on the devices after a successful upgrade. | | **startDate** | string | The 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. | | **status** | string | The status of the upgrade. | | **deviceList** | array of objects | A 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. | | **deviceId** | string | The device IMEI.| | **status** | string | The status of the upgrade for this device, which may be different from the overall upgrade status. | | **resultReason** | string | More information about the device’s upgrade status. | | **endDate** | string | The date that the upgrade is scheduled to end. | | **autoAssignLicenseFlag** | boolean | Valid values include: **True** and **False:** | | **autoAddDevicesFlag** | boolean | Valid values include: **True:** and **False:** | ## Example Success Response ```json { "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: ```json { "errorCode": "error code string", "errorMessage": "error message string" } ``` Error codes and messages are listed on the [Error Messages](https://thingspace.verizon.com/documentation/api-documentation.html#/http/software-management/guides/error-messages) page, along with explanations and suggestions for corrective actions.