Schedule a File Upgrade

POST /campaigns/files/{acc}

Schedules a file upgrade.

Uses and Requirements

You can upload configuration files and schedule them in a campaign to devices. When uploading configuration files, ThingSpace Software Management requires metadata about the files including version, make and model.

NOTE: Support of this feature requires explicit direction from the Device OEM who is responsible for providing templates and documentation for the files. ThingSpace Software Management acts as a delivery mechanism of the file and is not responsible for any misconfiguration done to the device. Please do not use this feature if your OEM has not instructed you on how to do it.

See also:

Get a List of Available Files 
Upload a File

Request Components

HTTP Request

POST https://thingspace.verizon.com/api/fota/v2/campaigns/files/{acc}

Resource Path and Query Parameters

You must include the account name in the path.

Parameter Name Data Type Description
acc
required
string Account identifier.

Header Parameters

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.

Request Body Parameters

Parameter Name Data Type Description
campaignName string The campaign name.
fileName
required
string The name of the file you are upgrading to.
fileVersion
required
string The version of the file you are upgrading to.
distributionType
required
string Valid values include:
  • OMA
  • HTTP
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.

Example Request Body

{

  "campaignName": "string",
  "fileName": "string",
  "fileVersion": "string",
  "distributionType": "string",
  "startDate": "2021-02-08",
  "endDate": "2021-02-08",
  "downloadAfterDate": "2021-02-08",
  "downloadTimeWindowList": [
    {
      "startTime": 0,
      "endTime": 0
    }
  ],
  "installAfterDate": "2021-02-08",
  "installTimeWindowList": [
    {
      "startTime": 0,
      "endTime": 0
    }
  ],
  "deviceList": [
    "string"
  ]
}

 

Success Responses

Status 200

 

Response Parameters

Parameter Name Data Type Description
id string Updgrade identifier.
accountName string Account identifer
campaignName string The campaign name.
softwareName string The name of the software or file you are upgrading to.
softwareFrom string The name of the old software or file on the device.
softwareTo string The name of the old software or file on the device.
fileName
required
string The name of the file you are upgrading to.
fileVersion
required
string The version of the file you are upgrading to.
distributionType
required
string Valid values include:
  • OMA
  • HTTP
make string Applicable make.
model string Applicable model.
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.
status
required
string Software update status.

Example Success Response

{
  "id": "string",
  "accountName": "string",
  "campaignName": "string",
  "softwareName": "string",
  "softwareFrom": "string",
  "softwareTo": "string",
  "fileName": "string",
  "fileVersion": "string",
  "distributionType": "string",
  "make": "string",
  "model": "string",
  "startDate": "2021-02-08",
  "endDate": "2021-02-08",
  "downloadAfterDate": "2021-02-08",
  "downloadTimeWindowList": [
    {
      "startTime": 0,
      "endTime": 0
    }
  ],
  "installAfterDate": "2021-02-08",
  "installTimeWindowList": [
    {
      "startTime": 0,
      "endTime": 0
    }
  ],
  "status": "string"
}

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.