POST /devices/usage/actions/list/aggregate
This endpoint retrieves an aggregate, or summary, of usage for the device specified.
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 Name | Data Type | Description |
---|---|---|
Authorization required |
string | HTTP Authorization bearer token: |
VZ-M2M-Token required |
string | A valid session token: |
Content-Type required |
string | Must be application/json: |
POST https://thingspace.verizon.com/api/m2m/v1/devices/usage/actions/list/aggregate
Parameter | Data Type | Description |
---|---|---|
deviceIds |
array | The device ID value |
id |
string | The numeric value of the device ID type. |
kind |
string | The type of device ID represented by the ID value. Only the following are supported by the request and both values must be present:
NOTE: for this query, only EID is valid. |
accountName required |
string | The numeric name of the account. This is in the format "0000123456-00001". Leading zeros must be included. |
startTime required |
string ($datetime) | The start of the time period requested. |
endTime required |
string ($datetime) | The end of the time period requested. |
Example request:
{
"deviceIds": [
{
"id": "32-digit EID",
"kind": "eid"
}
],
"accountName": "0000123456-00001",
"startTime": "2023-10-01T00:00:00Z",
"endTime": "2023-10-30T00:00:00Z"
}
Status 200
A successful response shows a system generated request ID to track the request.
Example Response:
{
"requestId": "d1f08526-5443-4054-9a29-4456490ea9f8"
}
These endpoints send responses asynchronously. In order to read the results a callback is required. To learn more about callbacks, please visit About Callback Services.
Example callback responses:
{
"requestId": "d1f08526-5443-4054-9a29-4456490ea9f8",
"deviceResponse": {
"usageResponse": [
{
"deviceIds": [
{
"id": "32-digit EID",
"kind": "eid"
}
],
"dataUsage": "245971989",
"smsUsage": "6",
"startDate": "2023-10-01T00:00:00.0000000+00:00",
"endDate": "2023-10-30T00:00:00.0000000+00:00",
"moSms": "5",
"mtSms": "1"
}
]
},
"callbackCount": 1,
"maxCallbackThreshold": 4
}
Parameter | Data Type | Description |
---|---|---|
requestId | string | The requestId being viewed. This is a system generated value from the request above. |
deviceResponse | object | Contains the response from the device queried. |
usageResponse | array | The record of usage from the device queried. |
deviceIds |
array | An array of devices being queried by the request. Each deviceId will contain:
|
id |
string | The numeric value of the device ID. |
kind |
string | The type of device ID represented by the ID value:
|
dataUsage | string | The total amount of data used (in Bytes) for that time period.. |
smsUsage | string | The total number of SMS (text) messages sent and received |
startDate | string ($datetime) | The starting point of the time period queried. |
endDate | string ($datetime) | The ending point of the time period queried. |
moSms | string | Mobile Originating SMS. Text messages sent. |
mtSms | string | Mobile Terminating SMS. Text messages received. |
callbackCount | string | The number of responses for deviceResponse found. |
maxCallbackThreshold | string | The maximum number of responses for deviceResponse allowed. |
All error responses will be in the following format
{
"errorCode": "The 3-digit HTML error code",
"errorMessage": "string"
}