API Reference
## Get Diagnostics History Data ### POST /history/actions/$search Retrieve historical streamed attribute information about selected devices. ### 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](/docs/premium-apis/device-diagnostics/api-endpoints/diagnostics-history/getdiagnosticshistory) ### 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 /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 | | attribute required | attributes data object | Streaming RF parameters for which you want to retrieve history data. | | attribute.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 ```json { "$filter": { "accountName": "0000123456-00001", "device": { "id": "15-digit IMEI", "kind": "IMEI" }, "attribute": { "name": "LINK_QUALITY" } } } ``` ### 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 | | attribute | attributes data object | Streaming RF parameters for which you want to retrieve history data. | | attribute.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 ```json [ { "accountName": "0000123456-00001", "attribute": { "updatedOn": "2022-02-10T16:02:21.406Z", "name": "LINK_QUALITY", "value": "47" }, "device": { "id": "15-digit IMEI", "kind": "IMEI" } }, { "accountName": "0000123456-00001", "attribute": { "updatedOn": "2022-02-10T16:02:05.316Z", "name": "LINK_QUALITY", "value": "47" }, "device": { "id": "15-digit IMEI", "kind": "IMEI" } } ] ``` #### 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: ```json { "errorCode": "error code string", "errorMessage": "error message string" } ```