Premium APIsSoftware ManagementSoftware Management V2API Reference V2

Modify a scheduled firmware upgrade

Change Campaign Dates and Time Windows

PUT /campaigns/{accountName}/{campaignId}/dates

Allows you to change campaign dates and time windows.

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.)

Uses and Requirements

The following limitations apply to changing campaign dates and time windows:

  • Before the campaign starts, you can:
    • Change the campaign start date
    • Add or remove campaign time windows
    • Change the end date
  • After the campaign has begun, but before it ends, you can:
    • Change the end date to no earlier than +24 hours from now
    • Add more download windows, but not remove any existing download windows
    • Add more install windows, but not remove any existing install windows
  • If you are modifying any campaign dates or windows, you must provide the full payload in the request, including any modified fields.

HTTP Request

PUT https://thingspace.verizon.com/api/fota/v2/campaigns/{accountName}/{campaignId}/dates

Resource Path and Query Parameters

Parameter NameData TypeDescription
accountName
required
stringAccount identifier.
campaignId
required
stringSoftware 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.

Parameter NameData TypeDescription
Authorization
required
stringHTTP Authorization bearer token:
Authorization: Bearer {token}
VZ-M2M-Token
required
stringA valid session token:
VZ-M2M-Token: {M2Mtoken}

Request Body

The request body identifies the devices that you want to upgrade.

Parameter NameData TypeDescription
startDate
required
string($date)Campaign start date.
endDate
required
string($date)Campaign end date.
downloadAfterDatestring($date)Specifies the starting date the client should download the package. If null, client downloads as soon as possible.
downloadTimeWindowListArray of startTime and endTime objectsList of allowed download time windows.
downloadTimeWindowList.startTime
required
integerStart hour in range [0-23], current hour >= startTime. When the current hour falls between the startTime and the endTime, it starts.
downloadTimeWindowList.endTime
required
integerEnd hour in range [1-24], current hour < endTime.
installAfterDatestring($date)The date after which you will install the package. If null, install as soon as possible.
installTimeWindowListArray of startTime and endTime objectsList of allowed install time windows.
installTimeWindowList.startTime
required
integerStart hour in range [0-23], current hour >= startTime. When the current hour falls between the startTime and the endTime, it starts.
installTimeWindowList.endTime
required
integerEnd hour in range [1-24], current hour < endTime.

Example Request if Modifying Existing Time Windows

Modify a software upgrade.

curl -X PUT https://thingspace.verizon.com/api/fota/v2/campaigns/$ACC/$CAMPAIGN_ID/dates -H 'Authorization: Bearer $AUTH_TOKEN' -H 'VZ-M2M-Token: $M2M_TOKEN' -H 'Content-Type: application/json' -d
{
    "startDate": "2020-08-21",
    "endDate": "2020-08-22",
    "downloadAfterDate": "2020-08-21",
    "downloadTimeWindowList": [
       {
          "startTime": 3,
          "endTime": 4
       }
    ],
      "installAfterDate": "2020-08-21",
      "installTimeWindowList": [
       {
          "startTime": 5,
          "endTime": 6
       }
    ]
}

Example Request if Adding Additional Time Windows

In this example, some fields are unchanged from the original request, but even unchanged fields must be provided in the requested. This request also includes an additional downloadTimeWindowList and an additional installTimeWindowList.

curl -X PUT https://thingspace.verizon.com/api/fota/v2/campaigns/$ACC/$CAMPAIGN_ID/dates -H 'Authorization: Bearer $AUTH_TOKEN' -H 'VZ-M2M-Token: $M2M_TOKEN' -H 'Content-Type: application/json' -d
{
    "startDate": "2020-08-21",
    "endDate": "2020-08-22",
    "downloadAfterDate": "2020-08-21",
    "downloadTimeWindowList": [
        {
          "startTime": 3,
          "endTime": 4
        },
        {
          "startTime": 5,
          "endTime": 6
        }
      ],
      "installAfterDate": "2020-08-21",
      "installTimeWindowList": [
        {
          "startTime": 5,
          "endTime": 6
        },
        {
          "startTime": 6,
          "endTime": 7
        }
      ]
}

Success Responses

Status 200

Parameter NameData TypeDescription
idstringUpgrade identifier.
accountNamestringThe account name.
campaignNamestringThe campaign name.
softwareNamestringThe name of the software to which you are upgrading.
distributionTypestringValid values include:
  • LWM2M
  • OMA
  • HTTP
makestringApplicable make.
modelstringApplicable model.
softwareFromstringThe name of the old software on the device.
softwareTostringThe name of the new software to which you are upgrading.
startDatestring($date)Campaign start date.
endDatestring($date)Campaign end date.
downloadAfterDatestring($date)Specifies the starting date the client should download the package. If null, client downloads as soon as possible.
downloadTimeWindowListArray of startTime and endTime objectsList of allowed download time windows.
downloadTimeWindowList.startTime
required
integerStart hour in range [0-23], current hour >= startTime. When the current hour falls between the startTime and the endTime, it starts.
downloadTimeWindowList.endTime
required
integerEnd hour in range [1-24], current hour < endTime.
installAfterDatestring($date)The date after which you install the package. If null, installs as soon as possible.
installTimeWindowListArray of startTime and endTime objectsList of allowed install time windows.
installTimeWindowList.startTimeintegerStart hour in range [0-23], startTime >= current hour.
installTimeWindowList.endTimeintegerEnd hour in range [1-24], endTime < current hour.
statusstringSoftware upgrade status.

Example Success Response

{
      "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": 3,
          "endTime": 4
        },
        {
          "startTime": 5,
          "endTime": 6
        }
      ],
      "installAfterDate": "2020-08-21",
      "installTimeWindowList": [
        {
          "startTime": 5,
          "endTime": 6
        },
        {
          "startTime": 6,
          "endTime": 7
        }
      ],
      "status": "RequestPending"
}

Failure Responses

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.

On this page