Premium APIsSoftware ManagementSoftware Management V2API Reference V2

Upload a new file

POST /files/{accountName}

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.

HTTP Request

GET https://thingspace.verizon.com/api/fota/v2/files/{accountName}

Resource Path Parameters

Parameter NameData TypeDescription
accountName
required
stringThe account name.

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

Parameter NameData TypeDescription
fileupload
required
fileThe file to upload.
fileVersion
required
stringVersion of the file.
make
required
stringThe software-applicable device make.
model
required
stringThe software-applicable device make.
localTargetPath
required
stringLocal 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 NameData TypeDescription
fileName
required
stringThingSpace-generated name of the file. You will use this name when listing or scheduling campaigns for the file.
fileVersion
required
stringVersion of the file.
launchDatestring($date-time)Software launch date.
releaseNote
required
stringSoftware release note.
make
required
stringThe software-applicable device make.
model
required
stringThe software-applicable device model.
localTargetPath
required
stringLocal target path on the device.
distributionTypestringValid values include:
  • LWM2M
  • OMD-DM
  • HTTP
devicePlatformId
required
stringThe 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 Response

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