Premium APIsSoftware ManagementSoftware Management V1API Reference V1

Modify a scheduled firmware upgrade

Modify a Scheduled Upgrade:

PUT /upgrades/{account}/upgrade/{upgradeId}

Adds devices to a scheduled upgrade campaign, or removes devices from the campaign. You cannot add or remove devices once an upgrade has started.

Request Components

HTTP Request

PUT https://thingspace.verizon.com/api/fota/v1/upgrades/{account}/upgrade/{upgradeId}

Resource Path and Query Parameters

You must include the account name in the path and the ID of the upgrade.

Parameter NameData TypeDescription
account (required)stringThe name of the account that has the scheduled upgrade. An account name is usually numeric, and must include any leading zeros.
upgradeId (required)UUID stringThe UUID of the upgrade, returned by POST /upgrades when the upgrade was scheduled.

Header Parameters

The request header must set the content-type to JSON, 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}
Content-Type (required)stringMust be application/json Content-Type: application/json

Request Body

The request body sets the type of operation (add or remove) and specifies the devices.

ParameterData TypeDescription
type (required)string, enumThe type of operation, either “append” or “remove”
deviceList (required)arrayof IMEI strings The IMEIs of the devices that you want to add or remove from the upgrade.

Example Request

Request the details of a scheduled upgrade for an account:

curl -X PUT https://thingspace.verizon.com/api/fota/v1/upgrades/$ACCOUNT/upgrade/$UPGRADE_ID  -H 'Authorization: Bearer $AUTH_TOKEN' -H 'VZ-M2M-Token: $M2M_TOKEN'
{
  "type": "append", 
  "devicelist": [
    "990003425730535", 
    "990000473475989"
  ]
}

Success Responses

Status 200

A success response contains these upgrade details:

ParameterData TypeDescription
accountNamestringThe name (number) of the billing account.
idstringUnique upgrade identifier.
deviceListarray of objectsA JSON object for each device that was included in the request, showing the device IMEI, the status of the addition or removal, and additional information about the status.
deviceList.deviceIdstringThe device IMEI.
deviceList.statusstringWhether the device was added or removed from the upgrade campaign successfully. For example, “AddDeviceSucceed”
deviceList.ReasonstringMore information about the status.

Example Success Response

{
    “id”: “string”, 
    “accountName”: “string”, 
    “firmwareName”: “string”, 
    “firmwareTo”: “string”, 
    “startDate”: “string”, 
    “status”: “string”, 
    “deviceList”: [ { 
        “deviceId”: “string”, 
        “status”: “string”, 
        “resultReason”: 
        “string” 
        } 
    ]
}
{  
  "accountName":"0402196254-00001",
  "id":"60b5d639-ccdc-4db8-8824-069bd94c95bf",
  "deviceList": [
    {
      "deviceId": "990003425730535",
      "status": "AddDeviceSucceed",
      "Reason": "Device added Successfully"
    },
    {
      "deviceId": "990000473475989",
      "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.

On this page