Get device firmware upgrade history
# Get a Device’s Firmware Upgrade History: #### GET /reports/{account}/devices/{deviceId} Returns the upgrade history of the specified device from the previous six months. ## Request Components #### HTTP Request #### `GET https://thingspace.verizon.com/api/fota/v1/reports/{account}/devices/{deviceId}` ## Resource Path and Query Parameters You must include the account name and the device IMEI in the path. | 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. | | **deviceId** *(required)* | IMEI string | The IMEI of the device for which you want the upgrade history. | ## 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 the upgrade history of a device: ```json curl https://thingspace.verizon.com/api/fota/v1/reports/0402196254-00001/device/990000473475989 -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 the device has had, and each upgrade object has these details: | Parameter Name | Data Type | Description | |-----|-----|-----| | **deviceId** | string | The IMEI of the device. | | **id** | UUID | string The unique identifier for the upgrade. | **accountName** | string | The name (number) of the billing account. | | **firmwareFrom** | string | The firmware version that was on the device before the upgrade. | | **firmwareTo** | string | The name of the firmware version that was on the device after the upgrade. | | **startDate** | string | The date of the upgrade. | | **upgradeStartTime** | string | The date and time that the upgrade actually started for this device. | | **status** | string | The status of the upgrade for this device, which may be different from the overall upgrade status. If, within one day of the start date, the campaign fails this status will show failure. However, ThingSpace queues OMA-DM upgrades in the network indefinitely so the upgrade may actually be successful. Use the Device List API to check the latest reported firmware on the device. | | **reason** | string | More information about the status. | ## Example Success Response ```json [ { "deviceId": "900000000000001", "id": "f574fbb8-b291-4cc7-bf22-4e3f27977558", "accountName": "0242078689-00001", "firmwareFrom": "VerizonFirmwareVersion-02", "firmwareTo": "VerizonFirmwareVersion-03", "startDate": "2018-03-05", "upgradeStartTime": "2018-03-05T19:07:21Z", "status": "UpgradeSuccess", "reason": "success" }, { "deviceId": "900000000000001", "id": "5edade25-c06c-4b13-ba2a-fbb9ada93579", "accountName": "0242078689-00001", "firmwareFrom": "VerizonFirmwareVersion-01", "firmwareTo": "VerizonFirmwareVersion-02", "startDate": "2018-02-20", "upgradeStartTime": "2018-02-20T00:03:19Z", "status": "UpgradeSuccess", "reason": "success" } ] ``` ## 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.