Get a List of All Devices in an Account

Get a List of All Devices in an Account

GET /devices/{acc}

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.

Request Components

HTTP Request

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

Resource Path and Query Parameters

You must include the account name in the path.

Parameter Name Data Type Description
acc
required
string The 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
(query)
integer Only 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
(query)
string Filter 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.

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.

Request Body

None.

Example Request

Request the list of devices for an account:

curl https://{{<hostUrl>}}/api/fota/v2/devices/$ACC  -H 'Authorization: Bearer $AUTH_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 Name Data Type Description
accountName string The name (number) of the billing account.
hasMoreData Boolean Value="true" if there are more devices to retrieve.
lastSeenDeviceId integer If hasMoreData="true", use this value for the next request. 0 if hasMoreData=false.
maxPageSize integer Maximum number of results included in the response.
deviceList array of device objects The list of devices in the account.
deviceList.deviceId string The IMEI of the device.
deviceList.mdn string The MDN (phone number) of the device.
deviceList.model string The device model name.
deviceList.make string The device make.
deviceList.fotaEligible Boolean Value="true" if the device software can be upgraded over the air using the Software Management Services API.
deviceList.appFotaEligible Boolean Value="true" if the device software can be upgraded over the air using the v/2 Software Management Services APIs.
deviceList.licenseAssigned Boolean Value="true" if an MRC license has been assigned to this device.
deviceList.distributionType string The device management protocol supported by the device. Valid values include:
  • LWM2M
  • OMD-DM
  • HTTP
deviceList.softwareList array of software objects The list of software on the device.
deviceList.softwareList.name string The name of the software.
deviceList.softwareList.version string Software version.
createTime string($date-time) The date and time when the device is created.
upgradeTime string($date-time) The date and time when the device firmware or software is upgraded.
updateTime string($date-time) The date and time when the device is updated.
refreshTime string($date-time) The 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": "0402196254-00001",
  "hasMoreData": true,
  "lastSeenDeviceId": "990013907833575",
  "maxPageSize": 1000,
  "deviceList": [
    {
      "deviceId": "990013907835573",
      "mdn": "2145551212",
      "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": "990013907837533",
      "mdn": "2145551313",
      "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": "990013907833575",
      "mdn": "2145551414",
      "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"
    }
  ]
}

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.