POST /licenses/{acc}/assign
Assigns FOTA licenses to a list of devices. When licenses are assigned, the ThingSpace Software Management begins monitoring the devices for reachability.
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/v3/firmware/licenses/{acc}/assign
You must include the account name in the path.
Parameter Name | Data Type | Description |
---|---|---|
acc required |
string | Account identifier. |
The request header must contain a current ThingSpace authorization token, set the content to "JSON" 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 . |
The request body provides the device list.
Parameter Name | Data Type | Description |
---|---|---|
devceList required |
array | The IMEIs of the devices to assign licenses to. |
Assign licenses to two devices.
curl POST https://thingspace.verizon.com/api/fota/v3/licenses/{acc}/assign
-H 'VZ-M2M-Token: {M2M token}' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {bearer token}' \
{
"deviceList": [
"15-digit IMEI",
"15-digit IMEI"
]
}
Status 200
Parameter Name | Data Type | Description |
---|---|---|
accountName | string | Account identifier |
licTotalCount | integer | Total FOTA license count. |
licUsedCount | integer | Assigned FOTA license count. |
deviceList | array | |
deviceId | string | Device IMEI. |
status | string | Status of the license assignment. Valid values include:
|
Reason | string | More information about the status: "Device license preexisting" or a reason for a failure such as "Device Not Found." |
{
"accountName": "0000123456-00001",
"licCount": 2,
"licUsedCount": 2,
"deviceList": [
{
"deviceId": "15-digit IMEI",
"status": "LicenseAssignSuccess",
"Reason": "Device license preexisting"
},
{
"deviceId": "15-digit IMEI",
"status": "LicenseAssignSuccess",
"Reason": "Device license preexisting"
}
]
}
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.