Get upgrade information
# Get Upgrade Information ### `GET /campaigns/{accountName}/{campaignId}` Returns information about a specified upgrade, including the target date of the upgrade. ## Uses and Requirements The upgrade states are listed as follows: - **CampaignRequestPending**: The upgrade request has been accepted but is not scheduled yet. - If any parameter checks fail, the state changes to **CampaignRequestFailed**. - **CampaignQueued**: The upgrade request has passed a campaign eligibility check and campaign parameters validation. The upgrade is in the queue waiting to be scheduled. - You can cancel the campaign if it is in Queued status and if it is before the Start Date, which becomes **CampaignCancelled** state. - You can delete the campaign after the start date, which becomes **CampaignAborted** state. - **CampaignFailed**: The campaign scheduling API call has failed. - **CampaignScheduled**: The upgrade is scheduled. This appears before the campaign start date. - After the start date has passed and the upgrade is in progress you can abort the campaign. Some devices may have already started or completed the upgrade. Upgrades on remaining devices might not complete the upgrade. - **CampaignEnded**: The campaign end date has passed. No more devices are allowed to upgrade if they have checked in before the campaign end date.</li> </ul> ## HTTP Request [GET https://thingspace.verizon.com/api/fota/v2/campaigns/{accountName}/{campaignId}](/docs/premium-apis/software-management/software-management-v2/api-endpoints/campaigns-v2/getcampaigninformation) ## Resource Path Parameters | Parameter Name | Data Type | Description | |:-----------------------|:-----------|:-----------------------------------------------------| | **accountName** <br> _required_ | string | Account identifier. | | **campaignId** <br> _required_ | string | Software upgrade identifier, returned in the "id" value of the `POST /{campaigns}/acc` response when the upgrade was scheduled. | ## Header Parameters The request header must 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** <br> _required_ | string | HTTP Authorization bearer token: <br> `Authorization: Bearer {token}` | | **VZ-M2M-Token** <br> _required_ | string | A valid session token: <br> `VZ-M2M-Token: {M2Mtoken}` | ## Request Body None ## Example Request Request a software upgrade. ```json curl https://thingspace.verizon.com/api/fota/v2/campaigns/$ACC/$CAMPAIGN_ID ]\ -H 'Authorization: Bearer $AUTH_TOKEN' \ -H 'VZ-M2M-Token: $M2M_TOKEN' \ -H 'Content-Type: application/json' -d ``` ## Success Responses **Status 200** | Parameter Name | Data Type | Description | |:-----------------------|:-----------|:-----------------------------------------------------------------------------| | **id** | string | Campaign upgrade identifier. | | **accountName** | string | The account name. | | **campaignName** | string | The campaign name. | | **softwareName** | string | The name of the software to which you are upgrading. | | **distributionType** | string | Valid values include: <ul><li>LWM2M</li><li>OMA</li><li>HTTP</li></ul> | | **make** | string | Applicable make. | | **model** | string | Applicable model. | | **softwareFrom** | string | The name of the old software on the device. | | **softwareTo** | string | The name of the new software to which you are upgrading. | | **startDate** | string($date) | Campaign start date. | | **endDate** | string($date) | Campaign end date. | | **autoAssignLicenseFlag** | boolean | Valid values include: **True** and **False:** | | **autoAddDevicesFlag** | boolean | Valid values include: **True:** and **False:** | | **downloadAfterDate** | string($date) | Specifies the starting date the client should download the package. If null, client downloads as soon as possible. | | **downloadTimeWindowList** | Array of startTime and endTime objects | List of allowed download time windows. | | **downloadTimeWindowList.startTime** <br> *required* | integer | Start hour in range [0-23], current hour >= startTime. When the current hour falls between the startTime and the endTime, it starts. | | **downloadTimeWindowList.endTime** <br> *required* | integer | End hour in range [1-24], current hour < endTime. | | **installAfterDate** | string($date) | The date after which you install the package. If null, install as soon as possible. | | **installTimeWindowList** | Array of startTime and endTime objects | List of allowed install time windows. | | **installTimeWindowList.startTime** | integer | Start hour in range [0-23], current hour >= startTime. | | **installTimeWindowList.endTime** | integer | End hour in range [1-24], current hour < endTime. | | **status** | string | Software upgrade status. | ## Example Success Response ```json { "id": "60b5d639-eeee-ffff-gggg-069bd94c95bf", "accountName": "0000123456-00001", "campaignName": "FOTA_Verizon_Upgrade", "softwareName": "FOTA_Verizon_Model-A_02To03_HF", "distributionType": "HTTP", "make": "Verizon", "model": "Model-A", "softwareFrom": "FOTA_Verizon_Model-A_00To01_HF", "softwareTo": "FOTA_Verizon_Model-A_02To03_HF", "startDate": "2020-08-21", "endDate": "2020-08-22", "autoAssignLicenseFlag": true, "autoAddDevicesFlag": true, "downloadAfterDate": "2020-08-21", "downloadTimeWindowList": [ { "startTime": 20, "endTime": 21 } ], "installAfterDate": "2020-08-21", "installTimeWindowList": [ { "startTime": 22, "endTime": 23 } ], "status": "CampaignEnded" } ``` ## Failure Response **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 page, along with explanations and suggestions for corrective actions.