Upload a New File

POST /files/{acc}

Uploads a configuration/supplementary file for an account. ThingSpace generates a fileName after the upload and is returned in the response. You will use the generated file name when listing or scheduling a campaign for the file.

Uses and Requirements

When uploading a configuration file, ThingSpace Software Management requires metadata about the file including the version, make, and model.

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.

Once the file has been uploaded, scheduling a file campaign follows a similar model of scheduling a software campaign.

See also:

Get a List of Available Files 
Schedule a File Upgrade

Request Components

HTTP Request

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

Resource Path Parameters

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

Parameter Name Data Type Description
fileupload
required
file The file to upload.
fileVersion
required
string Version of the file.
make
required
string The software-applicable device make.
model
required
string The software-applicable device model.
localTargetPath
required
string Local target path on the device.

Example Request

Request a software upgrade.

curl --location --request POST 'https://thingspace.verizon.com/api/fota/v2/files/$ACC/' \
--header 'VZ-M2M-Token: $M2M_TOKEN' \
--header 'Authorization: Bearer $AUTH_TOKEN' \
--form 'fileupload=@"/Users/files/hello-world.txt"' \
--form 'fileVersion="1.0"' \
--form 'make="Verizon"' \
--form 'model="VZW1"' \
--form 'localTargetPath="/VZWFOTA/hello-world.txt"' \
--form 'releaseNote="Hello world initial file"'

Success Responses

Status 200

Parameter Name Data Type Description
fileName
required
string ThingSpace-generated name of the file. You will use this name when listing or scheduling campaigns for the file.
fileVersion
required
string Version of the file.
launchDate string($date-time) Software launch date.
releaseNote
required
string Software release note.
make
required
string The software-applicable device make.
model
required
string The software-applicable device model.
localTargetPath
required
string Local target path on the device.
distributionType string Valid values include:
  • LWM2M
  • OMD-DM
  • HTTP
devicePlatformId
required
string The platform (Android, iOS, etc.,) that the software can be applied to.

Example Success Response

{
    "fileName": "configfile-Verizon_VZW1_hello-world.txt",
    "fileVersion": "1.0",
    "releaseNote": "Hello world initial file",
    "make": "Verizon",
    "model": "VZW1",
    "localTargetPath": "/VZWFOTA/hello-world.txt",
    "distributionType": "HTTP",
    "devicePlatformId": "IoT"
}

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.