Get Upgrade Information
# Get Upgrade Information ### `GET /campaigns/{accountName}/{campaignId}` Returns information about a specified upgrade, including the target date of the upgrade. 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. The campaign can be cancelled if it is in Queued status and if it is before the Start Date, which becomes **CampaignCancelled** state. If the campaign is deleted after the start date, that becomes the **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, The campaign can still be aborted. 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. ## HTTP Request [GET https://thingspace.verizon.com/api/fota/v3/campaigns/{accountName}/{campaignId}](/docs/premium-apis/software-management/software-management-v2/api-endpoints/campaigns-v2/getcampaigninformation) ## Header Parameters The request header must contain a current ThingSpace authorization token, set the content to "JSON" and a current VZ-M2M-session token. |Parameter Name|Data Type|Description| |-----|-----|-----| | **Authorization** *(required)* | string | HTTP Authorization request header containing a valid Bearer token: `Authorization: Bearer {token}` | | **VZ-M2M-Token** *(required)* | string | A valid session token returned by a Connectivity Management `POST /session/login` request. | | **Content-Type** *(required)* | string | Must be `application/json`. | ## Request Parameters |Parameter Name|Data Type|Description| |-----|-----|-----| | **accountName** *(required)* | string | The billing name of the account. An account name is usually numeric, and must include any leading zeros. | | **campaignId** *(required)* | string | Software upgrade identifier, returned in the "id" value of the POST /{campaigns}/{accountName} response when the upgrade was scheduled. | ## Request Body None ## Success Responses **Status 200** Example Success Response ```json { "id": "f858b8c4-2153-11ec-8c44-aeb16d1aa652", "accountName": "0642233522-00001", "campaignName": "Smart FOTA", "protocol": "LWM2M", "make": "SEQUANS Communications", "model": "GM01Q", "status": "CampaignPreScheduled", "startDate": "2021-09-29", "endDate": "2021-10-01", "firmwareName": "SEQUANSCommunications_GM01Q_SR1.2.0.0-10512_SR1.2.0.0-10657", "firmwareFrom": "SR1.2.0.0-10512", "firmwareTo": "SR1.2.0.0-10657", "timeWindowList": [ { "startTime": 18, "endTime": 22 } ] "autoAssignLicenseFlag":"false", "autoAddDevicesFlag":"false" } ``` ## Success Parameters |Parameter Name|Data Type|Description| |-----|-----|-----| | **id** | string | The campaign name. This is a 32 or 34-bit UUID.| | **accountName** | string | The billing account number. | | **campaignName** | string | The campaign name. | | **firmwareName** | string | The name of the firmware which is being upgraded. | | **protocol** | string | The protocol of the firmware distribution: **LWM2M**. | | **make** | string | FOTA make of the device. | | **model** | string | FOTA model of the device. | | **status** | string | Campaign level status. | | **firmwareFrom** | string | The name of the old firmware on the device. | | **firmwareTo** | string | The name of the new firmware being upgraded to. | | **startDate** | string ($date) | Campaign start date. | | **endDate** | string ($date) | Campaign end date. | | **campaignTimeWindowList** | array | | | **startTime** | integer | Start hour in range [0-23], current hour >= `startTime`. When the current hour falls between the `startTime` and the `endTime`, the campaign starts. | | **endTime** | integer | End hour in range [1-24], current hour < `endTime`. The `endTime` must be at least 4 hours after the `startTime`. | | **autoAssignLicenseFlag** | boolean | Valid values include: **True:** Any devices included in the device list which does not have a license will automatically assign a FOTA license assuming there are enough FOTA licenses available. **False:** Only devices included in the device list with a license will be campaigned. | | **autoAddDevicesFlag** | boolean | Valid values include: **True:** Beyond the devices included on the device list, any other device(s) which matches the eligibility criteria (same make, model, current firmware, protocol, billing account) will automatically be added to the campaign list during the life of the campaign. Note this feature requires autoAssignLicenseFlag also to be set to true. **False: Do not automatically add devices to the campaign. | ## Failure Responses 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](https://thingspace.verizon.com/documentation/api-documentation.html#/http/software-management/guides/error-messages), along with explanations and suggestions for corrective actions.