Premium APIsSoftware ManagementSoftware Management V1API Reference V1

Get the device information list

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.

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 NameData TypeDescription
account (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.
startIndex (required)integerOnly 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)stringFilter by the specified client type (device management protocol), either “OMADM” or “LWM2M.”

Header Parameters

The request header must set the content-type to JSON, 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}
Content-Type (required)stringMust be application/json Content-Type: application/json

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 NameData TypeDescription
accountNamestringThe name (number) of the billing account.
hasMoreDataBooleanTrue if there are more devices to retrieve.
lastSeenDeviceIdintegerIf hasMoreData=true, this is the startIndex value to use for the next request. 0 if hasMoreData=false.
deviceListarray of device objectsThe list of devices in the account.
deviceList.deviceIdstringThe IMEI of the device.
deviceList.mdnstringThe MDN (phone number) of the device.
deviceList.modelstringThe device model name.
deviceList.makestringThe device make.
deviceList.firmwarestringThe last reported name of the firmware image on the device. Note: ThingSpace syncs nightly with the FOTA servers including reported firmware.
deviceList.fotaEligibleBooleanTrue if the device firmware can be upgraded over the air using the Software Management Services API.
deviceList.licenseAssignedBooleanTrue if an MRC license has been assigned to this device.
deviceList.upgradeTimestringThe 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.statusstringThe current provisioning state of the device, which will be one of these values: Pre-active, active, deactive, suspend, pending state-change-name
deviceList.clientTypestringThe 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.

On this page