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.

Request Components

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 Name Data Type Description
accountName
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)
string 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://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 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 string 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.
     deviceId string The IMEI of the device.
     mdn string The MDN (Mobile Device Number or phone number) of the device.
     model string The device model name.
     make string The device make.
     fotaEligible Boolean Value="true" if the device software can be upgraded over the air using the Software Management Services API.
     appFotaEligible Boolean Value="true" if the device software can be upgraded over the air using the v/2 Software Management Services APIs.
     licenseAssigned Boolean Value="true" if an MRC license has been assigned to this device.
     distributionType string The device management protocol supported by the device. Valid values include:
  • LWM2M
  • OMD-DM
  • HTTP
     softwareList array of software objects The list of software on the device.
          name string The name of the software.
          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 system timestamp associated with this status.
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": "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 is more than the first 1000. 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/{capaignId}/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.