Premium APIsSoftware ManagementSoftware Management V2API Reference V2

Get a list of devices in an account

Get a List of All Devices in an Account

GET /devices/{accountName}

Returns an array of all devices in the specified account. Each device object includes information needed for managing software, including the device make and model, MDN, FOTA eligibility, distribution type, and list of software installed on the device.

Uses and Requirements

Each response includes a maximum of 1,000 devices. If the report contains more than 1,000 devices (indicated by the hasMoreData parameter in each response), you must send additional requests to retrieve the remaining devices. Use the lastSeenDeviceId parameter to return a different set of devices in each response.

HTTP Request

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

Resource Path and Query Parameters

You must include the account name in the path.

Parameter NameData TypeDescription
accountName
required
stringThe name of the account for which you want the list of devices. An account name is usually numeric, and must include any leading zeros.
lastSeenDeviceId
(required)
stringOnly return devices with IMEIs larger than this value. Use 0 for the first request. If hasMoreData=true in the response, use the lastSeenDeviceId value from the response in the next request.
distributionType
(required)
stringFilter by the specified distribution type. Valid values include: LWM2M, OMD-DM, HTTP

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

None.

Example Request

Request the list of devices for an account:

curl https://thingspace.verizon.com/api/fota/v2/devices/{accountName} -H 'Authorization: Bearer {bearer token}' -H 'VZ-M2M-Token: {M2M token}'

Success Responses

Status 200

A success response contains the account name and an array of device objects.

Parameter NameData TypeDescription
accountNamestringThe name (number) of the billing account.
hasMoreDatabooleanValue="true" if there are more devices to retrieve.
lastSeenDeviceIdstringIf hasMoreData="true", use this value for the next request. 0 if hasMoreData=false.
maxPageSizeintegerMaximum number of results included in the response.
deviceListarrayThe list of devices in the account.
deviceList.deviceIdstringThe IMEI of the device.
deviceList.mdnstringThe MDN (Mobile Device Number or phone number) of the device.
deviceList.modelstringThe device model name.
deviceList.makestringThe device make.
deviceList.fotaEligiblebooleanValue="true" if the device software can be upgraded over the air using the Software Management Services API.
deviceList.appFotaEligiblebooleanValue="true" if the device software can be upgraded over the air using the v/2 Software Management Services APIs.
deviceList.licenseAssignedbooleanValue="true" if an MRC license has been assigned to this device.
deviceList.distributionTypestringThe device management protocol supported by the device. Valid values include: LWM2M, OMD-DM, HTTP
deviceList.softwareListarrayThe list of software on the device.
deviceList.softwareList.namestringThe name of the software.
deviceList.softwareList.versionstringSoftware version.
createTimestringThe date and time when the device is created.
upgradeTimestringThe date and time when the device firmware or software is upgraded.
updateTimestringThe system timestamp associated with this status.
refreshTimestringThe date and time when the device is refreshed.

Example Success Response

This example response has been shortened to only show three devices, although there were over 1,000 devices in the original response, as indicated by hasMoreData = true.

{
    "accountName": "0000123456-00001",
    "hasMoreData": true,
    "lastSeenDeviceId": "15-digit IMEI",
    "maxPageSize": 1000,
    "deviceList": [
        {
          "deviceId": "15-digit IMEI",
          "mdn": "10-digit MDN",
          "model": "Model-A",
          "make": "Verizon",
          "fotaEligible": true,
          "appFotaEligible": true,
          "licenseAssigned": true,
          "distributionType": "HTTP",
          "softwareList": [
            {
              "name": "FOTA_Verizon_Model-A_02To03_HF",
              "version": "3",
              "upgradeTime": "2020-09-08T19:00:51.541Z"
            }
          ],
          "createTime": "2020-09-08T19:00:51.541Z",
          "upgradeTime": "2020-09-08T19:00:51.541Z",
          "updateTime": "2020-09-08T19:00:51.541Z",
          "refreshTime": "2020-09-08T19:00:51.541Z"
        },
        {
          "deviceId": "15-digit IMEI",
          "mdn": "10-digit MDN",
          "model": "Model-A",
          "make": "Verizon",
          "fotaEligible": true,
          "appFotaEligible": true,
          "licenseAssigned": true,
          "distributionType": "HTTP",
          "softwareList": [
            {
              "name": "FOTA_Verizon_Model-A_02To03_HF",
              "version": "3",
              "upgradeTime": "2020-09-08T19:00:51.541Z"
            }
          ],
          "createTime": "2020-09-08T19:00:51.541Z",
          "upgradeTime": "2020-09-08T19:00:51.541Z",
          "updateTime": "2020-09-08T19:00:51.541Z",
          "refreshTime": "2020-09-08T19:00:51.541Z"
        },
        {
          "deviceId": "15-digit IMEI",
          "mdn": "10-digit MDN",
          "model": "Model-A",
          "make": "Verizon",
          "fotaEligible": true,
          "appFotaEligible": true,
          "licenseAssigned": true,
          "distributionType": "HTTP",
          "softwareList": [
            {
              "name": "FOTA_Verizon_Model-A_02To03_HF",
              "version": "3",
              "upgradeTime": "2020-09-08T19:00:51.541Z"
            }
          ],
          "createTime": "2020-09-08T19:00:51.541Z",
          "upgradeTime": "2020-09-08T19:00:51.541Z",
          "updateTime": "2020-09-08T19:00:51.541Z",
          "refreshTime": "2020-09-08T19:00:51.541Z"
        }
    ]
}

hasMoreData = true means there are more than the first 1000 devices. lastSeenDeviceId should be used for pagination. So, to get devices beyond the first 1000, run a follow-up API request such as:

curl --location --request GET 'https://thingspace.verizon.com/api/fota/v2/reports/{accountName}/campaigns/{campaignId}/devices?lastSeenDeviceId=15-digit IMEI'

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