Get a list of all devices in an account:

GET /devices/{account}

Returns an array of all devices in the specified account. Each device object includes information needed for managing firmware, including the device make and model, MDN and IMEI, and current firmware version.

Contents

See also:
Get a list of available firmware for an account
Schedule a firmware upgrade

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 startIndex parameter to return a different set of devices in each response.

Request Components

HTTP Request

GET https://thingspace.verizon.com/api/fota/v1/devices/{account}/index/{startIndex}

Resource Path and Query Parameters

You must include the account name in the path and the startIndex to specify the starting record.

Parameter Name Data Type Description
account
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.
startIndex
required
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 as the startIndex in the next request.
clientType
optional
string Filter by the specified client type (device management protocol), either “OMADM” or “LWM2M.”

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/v1/devices/$ACCOUNT/index/0  -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 True if there are more devices to retrieve.
lastSeenDeviceId integer If hasMoreData=true, this is the startIndex value to use for the next request. 0 if hasMoreData=false.
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.firmware string

The last reported name of the firmware image on the device.

Note: ThingSpace syncs nightly with the FOTA servers including reported firmware.

deviceList.fotaEligible Boolean True if the device firmware can be upgraded over the air using the Software Management Services API.
deviceList.licenseAssigned Boolean True if an MRC license has been assigned to this device.
deviceList.upgradeTime string The date and time that the device firmware was last upgraded. If a device has never been upgraded, the upgradeTime will be 01/01/1900 0:0:0.
deviceList.status string The current provisioning state of the device, which will be one of these values:
  • Pre-active
  • active
  • deactive
  • suspend
  • pending state-change-name
deviceList.clientType string The device management protocol supported by the device, either “OMADM” or “LWM2M.”

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": "0242078698-00001",
  "hasMoreData": true,
  "lastSeenDeviceId": "900000000001000",
  "deviceList": [
    {
      "deviceId": "900000000000001",
      "mdn": "0000040881",
      "model": "Model-A",
      "make": "Verizon",
      "firmware": "VerizonFirmwareVersion-01",
      "fotaEligible": true,
      "licenseAssigned": true,
      "upgradeTime": "2018-03-03 00:28:33.152 +0000 UTC"
    },
    {
      "deviceId": "900000000000999",
      "mdn": "0000041879",
      "model": "Model-A",
      "make": "Verizon",
      "firmware": "VerizonFirmwareVersion-01",
      "fotaEligible": true,
      "licenseAssigned": true,
      "upgradeTime": "2018-03-03 00:28:34.067 +0000 UTC"
    },
    {
      "deviceId": "900000000001000",
      "mdn": "0000041880",
      "model": "Model-A",
      "make": "Verizon",
      "firmware": "VerizonFirmwareVersion-01",
      "fotaEligible": true,
      "licenseAssigned": true,
      "upgradeTime": "2018-03-03 00:28:34.068 +0000 UTC"
    }
  ]
}

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.