POST /campaigns/software/{acc}
Schedules a software upgrade for HTTP devices.
Note: Campaign time windows for downloading and installing software are available as long as the device OEM supports this. (The devices must support date windows, but the device OEM may download and install once they checked-in, provided they are in the date range.)
This API allows you to schedule a software upgrade for HTTP devices. The response includes an upgrade ID that is included in all callback notifications about the status of the upgrade that you can use to check the status of the upgrade or cancel it.
Note: A synchronous response with no errors means that the request has been accepted, but does not mean that the upgrade has been scheduled.
After you send a request to schedule an upgrade, the upgrade advances through several states:
If you have registered a callback URL, ThingSpace sends callback notification messages each time the status of an upgrade changes.
If your account has only a monthly recurring charge (MRC) subscription for the Software Management Services, you must assign a license to each device that you want to upgrade before you can schedule an upgrade for those devices.
POST https://thingspace.verizon.com/api/fota/v2/campaigns/software/{acc}
Parameter Name | Data Type | Description |
---|---|---|
acc required |
string | The account name. |
The request header must contain a current ThingSpace authorization token and a current VZ-M2M-session token.
Parameter Name | Data Type | Description |
---|---|---|
Authorization required |
string | HTTP Authorization request header containing a valid Bearer token. |
VZ-M2M-Token required |
string | A valid session token returned by a Connectivity Management POST /session/login request. |
The request body identifies the devices that you want to upgrade.
Parameter Name | Data Type | Description |
---|---|---|
campaignName | string | The campaign name. |
softwareName required |
string | The name of the software you are upgrading to. |
softwareFrom required |
string | The name of the old software on the device. |
softwareTo required |
string | The name of the new software you are upgrading to. |
distributionType required |
string | Valid values include:
|
startDate required |
string($date) | Campaign start date. |
endDate required |
string($date) | Campaign end date. |
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 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 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 required |
integer | Start hour in range [0-23], current hour >= startTime. When the current hour falls between the startTime and the endTime, it starts. |
installTimeWindowList.endTime required |
integer | End hour in range [1-24], current hour < endTime. |
deviceList required |
array of deviceID objects | Device IMEI list. |
Request a software upgrade.
curl https://thingspace.verizon.com/api/fota/v2/campaigns/software/$ACC -H 'Authorization: Bearer $AUTH_TOKEN' -H 'VZ-M2M-Token: $M2M_TOKEN' -H 'Content-Type: application/json' -d
{
"campaignName": "FOTA_Verizon_Upgrade",
"softwareName": "FOTA_Verizon_Model-A_02To03_HF",
"softwareFrom": "FOTA_Verizon_Model-A_00To01_HF",
"softwareTo": "FOTA_Verizon_Model-A_02To03_HF",
"distributionType": "HTTP",
"startDate": "2020-08-21",
"endDate": "2020-08-22",
"downloadAfterDate": "2020-08-21",
"downloadTimeWindowList": [
{
"startTime": 20,
"endTime": 21
}
],
"installAfterDate": "2020-08-21",
"installTimeWindowList": [
{
"startTime": 22,
"endTime": 23
}
],
"deviceList": [
"990013907835573",
"990013907884259"
]
}
Status 200
Parameter Name | Data Type | Description |
---|---|---|
id | string | 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:
|
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. |
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 | integer | Start hour in range [0-23], current hour >= startTime. |
downloadTimeWindowList.endTime | integer | End hour in range [1-24], current hour < endTime. |
installAfterDate | string($date) | The date after which client installs the package. If null, client installs 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. |
{
"id": "60b5d639-ccdc-4db8-8824-069bd94c95bf",
"accountName": "0402196254-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",
"downloadAfterDate": "2020-08-21",
"downloadTimeWindowList": [
{
"startTime": 20,
"endTime": 21
}
],
"installAfterDate": "2020-08-21",
"installTimeWindowList": [
{
"startTime": 22,
"endTime": 23
}
],
"status": "CampaignRequestPending"
}
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.