POST /licenses/{account}/assign
Assigns licenses to a specified list of devices so that firmware upgrades can be scheduled for those devices.
Note: This request is only needed for accounts that have a monthly recurring charge (MRC) subscription. Accounts with event-based billing do not need to assign licenses.
See also:
Schedule a firmware upgrade
Remove licenses from devices
Get a list of devices
The account must have unused licenses available to assign to the devices. You can get the total number of licenses and the number of used licenses with the GET /licenses/{account}
request.
POST https://thingspace.verizon.com/api/fota/v1/licenses/{account}/assign
You must include the account name in the path.
Parameter Name | Data Type | Description |
---|---|---|
account required |
string | The name of the account for which you want to assign licenses. An account name is usually numeric, and must include any leading zeros. |
The request header must contain a current ThingSpace authorization token and a current VZ-M2M session token, and must set the Content-Type to JSON.
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 . |
The request body identifies the devices to assign licenses to.
Parameter Name | Data Type | Description |
---|---|---|
deviceList required |
array of IMEI strings | The IMEIs of the devices to assign licenses to. |
Assign licenses to two devices:
curl https://thingspace.verizon.com/api/fota/v1/licenses/$ACCOUNT/assign -H 'Authorization: Bearer $AUTH_TOKEN' -H 'VZ-M2M-Token: $M2M_TOKEN' -H 'Content-Type: application/json' -d
{
"deviceList": [
"990003425730535",
"990000473475989"
]
}
Status 200
A success response includes this information:
Parameter Name | Data Type | Description |
---|---|---|
accountName | string | The name (number) of the billing account. |
licCount | integer | The total number of monthly licenses in the MRC subscription. |
licUsedCount | integer | The number of licenses assigned to devices. |
deviceList | array of objects | A JSON object for each device that was in the request |
deviceId
|
string | The IMEI of the device. |
status
|
string | “LicenseAssignSuccess” or “LicenseAssignFailed. |
Reason
|
string | More information about the status, such as “Success” “Device license preexisting” or a reason for a failure, such as “Device Not Found.” |
{
"accountName": "0242078689-00001",
"licCount": 9000,
"licUsedCount": 1000,
"deviceList": [
{
"deviceId": "900000000000001",
"status": "LicenseAssignSuccess",
"Reason": "Success"
},
{
"deviceId": "900000000000999",
"status": "LicenseAssignSuccess",
"Reason": "Success"
}
]
}
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.