Add or Remove Devices in an Upgrade

PUT /campaigns/{acc}/{campaignId}

Allows you to add or remove devices from a software upgrade.

Uses and Requirements

You cannot add or remove devices once an upgrade is in a Scheduled state.

Request Components

HTTP Request

PUT https://thingspace.verizon.com/api/fota/v3/campaigns/{acc}/{campaignId}

Resource Path and Query Parameters

Parameter Name Data Type Description
acc
required
string The account name. The account name is numeric and must include any leading zeros
campaignId
required
string Software upgrade identifier, returned in the "id" value of the POST /campaigns/firmware/{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.

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.
Content-Type
required
string Must be application/json.

Request Body

Parameter Name Data Type Description
addOrRemoveDevice
object Adds or removes devices to existing software upgrade information
    Type
string

The type of action you want to take. Valid values include:

  • append (add)

  • remove

    deviceList

object List of device IMEIs

Example Request

Request a software upgrade.

curl -X PUT https://thingspace.verizon.com/api/fota/v3/campaigns/{acc}/{campaignId} 
-H 'VZ-M2M-Token: {M2M token}' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {bearer token}' \
{
  "addOrRemoveDevice": [
   {
     "type": "remove",
     "deviceList":[
     "15-digit IMEI",
     "15-digit IMEI",
     "15-digit IMEI"
      ]
    }
  ]
}

Success Response

Status 200

Parameter Name Data Type Description
accountName
string The account name. The account name is numeric and must include any leading zeros
id
string Software upgrade identifier, returned in the "id" value of the POST /campaigns/firmware/{acc} response when the upgrade was scheduled
deviceList array Array of devices changed
    deviceID string IMEI associated with device
    status string Status of the change. Either "Success" or "Failed"
    reason string Details on status result

Example Success Response

{  
  "accountName":"0000123456-00001",
  "id":"60b5d639-ccdc-4db8-8824-069bd94c95bf",
  "deviceList": [
    {
      "deviceId": "15-digit IMEI",
      "status": "AddDeviceSucceed",
      "Reason": "Device added Successfully"
    },
    {
      "deviceId": "15-digit IMEI",
      "status": "AddDeviceSucceed",
      "Reason": "Device added Successfully"
    }
  ]
}

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.