POST /report/aggregateCalculate aggregated report by day with number of sessions and usage information. User will receive a synchronous response for a specified list of devices (Max 10) and date range (Max 180 days).
See also:
POST /report/async/aggregate - Usage report, run asynchronous, to allow for more responsesPOST /report/sessions - Daily usage for an individual deviceA vz-m2m-token is required to use these APIs. To obtain a token, please visit Getting Started to get a token.
POST https://thingspace.verizon.com/api/hyper-precise/v1/report/aggregate
| Parameter | Data Type | Description |
|---|---|---|
| accountNumber required |
string | The unique identifier for the account. |
| startDate | string | Start date of session to include. If not specified information will be shown from the earliest available (180 days). ISO 8601 format.. |
| endDate | string | End date of session to include. If not specified information will be shown to the latest available. ISO 8601 format.. |
| imei required |
string | Number of devices returning usage info. Could be 0, 1 or more. If 0 the query will return all devices belonging to customer. |
| deviceGroup | string | User defined group name the devices are a member of. |
| dataPlan | string | The data plan the devices beign queried belong to. |
| noSessionFlag | string | Filters on devices which return only "no sessions". |
Example request:
curl -X 'POST' \
'https://thingspace.verizon.com/api/hyper-precise/v1/report/aggregate' \
-H 'accept: application/json' \
-H 'VZ-M2M-Token: {token}' \
-H 'accountNumber: {accountNumber}' \
-H 'imei: 0' \
-H 'Content-Type: application/json' \
-d '{
"accountNumber": "string",
"startDate": "string",
"endDate": "string",
"imei": "string",
"deviceGroup": "string",
"dataPlan": "string",
"noSessionFlag": "string"
}'
Status 200
A successful response shows session and usage details for up to 10 devices.
Example response:
{
"txid": "string",
"usage": [
{
"imei": "string",
"numberOfSessions": 0,
"bytesTransferred": 0
}
],
"errors": [
{
"imei": "string",
"errorMessage": "string",
"errorResponse": {
"errorCode": "INVALID_ACCESS",
"errorMessage": "string",
"httpStatusCode": "100 CONTINUE",
"detailErrorMessage": "string"
}
}
]
}
| Parameter | Data Type | Description |
|---|---|---|
| txid | string | Transaction ID. The unique ID of the report request |
| usage | string | An object conatining the imei, number of sessions and data transferred in Bytes. |
| imei | string | International Mobile Equipment Idnetifier. This is the ID of the device reporting usage. |
| numberOfSessions | integer | Number of sessions established by the device reporting usage. |
| bytesTransferred | integer | The amount of data transferred by the device reporting usage, maesured in Bytes. |
| errors | string | An object containing any errors reported by the device, using the following parameters: |
| imei | string | International Mobile Equipment Idnetifier. This is the ID of the device reporting errors. |
| errorMessage | string | A general error message. |
| errorResponse | array | An array of the following parameters |
| errorCode | string | The error code sent to the device. |
| errorMessage | string | Details and additional information about the error code. |
| httpStatusCode | string | HTML error code and description. |
| detailErrorMessage | string | More detail and information about the HTML error code. |
| Code and Meaning | Format |
|---|---|
| 400 - Bad Request. |
|
| 401 - Unauthorized request. Access token is missing or invalid. |
|
| 403 - Forbidden request. |
|
| 404 - Bad request. Not found. |
|
| 409 - Bad request. Conflict state. |
|
500 - Internal Server Error. |
|