Retrieve Device Aggregate Usage

POST /v1/devices/usage/actions/promoaggregateusage

Retrives the aggregate data usage for all the MDNless devices during the promotional period.

 

See also:
Retrieve Device Usage

Request Components

HTTP Request

POST https://thingspace.verizon.com/api/m2m/v1/devices/usage/actions/promoaggregateusage

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

The request body identifies the account that Anomaly Detection willl be activated for and sets initial maximums for abnormal and very abnormal and if abnormal, very abnormal or both will be monitored.

Parameter Name Data Type Description
accountName
required
string The name of a billing account. An account name is usually numeric and must include any leading zeros.
deviceId
required
array an array of the kind of device identifier and what the value of that identifier is. 
deviceId.kind
string The type of device identifier. This will be the identifier of the SIM card or ICCID (Integrated Circuit Card ID)
deviceId.value string The 20-digit ICCID.

startTime

string (date-time) The starting time of the query period.
endTime
string(date-time)

The ending time of the query period.

Example Request

{
   "accountName":"0000123456-00001",
   "deviceIds":[
      {
         "kind":"iccid",
         "id":"20-digit ICCID"
      }
   ],
   "startTime":"2021-08-15T00:00:00Z",
   "endTime":"2021-08-16T00:00:00Z"
}

Success Response

A successful request will return a request ID to identify the request in a callback. For more information about callbacks, please visit Register a Callback Listener.

Status 200

{
    "requestId": "595f5c44-c31c-4552-8670-020a1545a84d",
}

Callback Examples

For more information about callbacks, please visit About Callback Services. There will be two callbacks received:

Example callback with a comment stating "request completed processing":
{
   "username":"null",
   "password":"null",
   "requestId":"595f5c44-c31c-4552-8670-020a1545a84d",
   "deviceResponse":{
       
   },
   "comment":"Request Completed Processing",
   "callbackCount":1,
   "maxCallbackThreshold":4
}
Example callback with usage data:
{
   "username":"null",
   "password":"null",
   "requestId":"595f5c44-c31c-4552-8670-020a1545a84d",
   "deviceResponse":{
      "devicePromoUsageResponse":[
         {
            "deviceIdentifierCollection":[
               {
                  "id":"20-digit ICCID",
                  "kind":"ICCID"
               }
            ],
            "dataUsage":"3072",
            "smsUsage":"0",
            "moSms":"0",
            "mtSms":"0",
            "startDate":"2021-08-15T00:00:00.0000000",
            "endDate":"2021-08-16T00:00:00.0000000"
         }
      ]
   },
   "callbackCount":1,
   "maxCallbackThreshold":4
}

Failure Response

All failure responses are 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.

Try It Out!