Get Diagnostics History Data

Get Diagnostics History Data:
POST /history/actions/$search

Retrieve historical streamed attribute information about selected devices.

Contents

Uses and Requirements

You can retrieve the history data for selected devices and attributes over specific time periods. You are able filter this data by time period or number of devices. If both the time period and the number of devices are specified, the number of records returned will be determined by the condition that is met first.

Request Components

HTTP Request

POST https://thingspace.verizon.com/api/diagnostics/v1/history/actions/$search

Resource Path and Query Parameters

None.

Header Parameters

The request header must contain a current ThingSpace authorization bearer token and a valid VZ-M2M session token, and must set the content-type to JSON.

Parameter Name Data Type Description
Authorization
required
string HTTP Authorization bearer token.
VZ-M2M-Token
required
string A valid session token returned by POST /api/m2m/v1/session/login.
Content-Type
required
string Must be application/json.

Request Body

Parameter Name Data Type Description
accountName
required
string The name of the billing account for which you want retrieve history data. An account name is usually numeric, and must include any leading zeros.
device
required
device data object The devices for which you want to retrieve history data.
device.id
required
string A device identifier value
device.kind
required
string Type of identifier
  • IMEI
  • ESN
  • MEID
attributes
required
attributes data object Streaming RF parameters for which you want to retrieve history data.
attributes.name
required
string examples:
  • RADIO_SIGNAL_STRENGTH
  • LINK_QUALITY
  • NETWORK_BEARER
  • CELL_ID
$limitNumber
optional
integer($int32) The maximum number of historical attributes to include in the response. If the request matches more than this number of attributes, the response will contain an X-Next value in the header that can be used as the page value in the next request to retrieve the next page of events.
$limitTime
limitTime data object The time period for which this request should retrieve data, beginning with the limitTime.startOn and proceeding with the limitTime.duration.
$limitTime.startOn
optional
string($date-time) The starting date-time for this request
$limitTime.duration
optional
limitTime duration data object The duration for which this request should retriev data.
$limitTime.duration.value
optional
integer($int32)
$limitTime.duration.unit
optional
string
  • SECOND
  • MINUTE
  • HOUR
  • DAY
$page
optional
string Page number for pagination purposes.

Example Request Body

{
  "$filter": {
    "accountName": "string",
    "device": {
      "id": "864508030026238",
      "kind": "IMEI"
    },
    "attributes": {
      "name": "string"
    }
  },
  "$limitNumber": 0,
  "$limitTime": {
    "startOn": "2019-09-07T20:08:15.513Z",
    "duration": {
      "value": 5,
      "unit": "SECOND"
    }
  },
  "$page": "string"
}

Success Responses

Status 200

Parameter Name Data Type Description
accountName string The name of the account for which you want retrieve history data. An account name is usually numeric, and must include any leading zeros.
device device data object The devices for which you want to retrieve history data.
device.id string A device identifier value
device.kind string Type of identifier
  • IMEI
  • ESN
  • MEID
attributes attributes data object Streaming RF parameters for which you want to retrieve history data.
attributes.name string examples:
  • RADIO_SIGNAL_STRENGTH
  • LINK_QUALITY
  • NETWORK_BEARER
  • CELL_ID
attributes.value string
attributes.createdOn string($date-time) Date and time the request was created.

Example Success Response

[
  {
    "accountName": "string",
    "device": {
      "id": "864508030026238",
      "kind": "IMEI"
    },
    "attributes": {
      "name": "string",
      "value": "string",
      "createdOn": "2019-09-07T20:08:15.552Z"
    }
  }
]

Example Success Response Headers
Reponse headers, with pagination, are added when the number of records returned are more than (>) 100.

Name Description Type
X-Next Used for pagination, needs to be passed in the next request body $page field. string

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 Codes page, along with explanations and suggestions for corrective actions.

Try It Out!