Get Session Report for a Device

Get Session Report for a Device

POST /report/sessions

Detailed report of session duration and number of bytes transferred per day for an individual device.

Contents

See also:

Request Components

A vz-m2m-token is required to use these APIs. To obtain a token, please visit Getting Started to get a token.

HTTP Request

POST https://thingspace.verizon.com/api/hyper-precise/v1/report/sessions

Request Parameters

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 International Mobile Device Identifier. The unique identifier of the device.
durationLow integer The Low value of session duration.
durationHigh integer The High value of session duration.

Request Body

Example request:

{
  "accountNumber": "string",
  "startDate": "string",
  "endDate": "string",
  "imei": "string",
  "durationLow": 0,
  "durationHigh": 0
}

Success Responses

Status 200

A successful request returns the device's session information and a Transaction ID (txid) for the report request.

Example response:

{
  "sessions": [
    {
      "startTime": "string",
      "endTime": "string",
      "numBytes": 0
    }
  ],
  "id": "{10-digit device ID}",
  "txid": "string"
}

Response Parameters

Parameter Data Type Description
sessions array An object containing the start and end time of the session with the amount of data transferred.
startTime string Start date of session. ISO 8601 format.
endTime string End date of session. ISO 8601 format.
numBytes integer Amount of data transferred, measured in Bytes.
id string The 10-digit ID of the device.
txid string Transaction ID of the request.


Failure Responses

Code and Meaning Format
400 - Bad Request.
{
  "errorCode": "INVALID_PARAMETER",
  "errorMessage": "Device Not Found, Request will be queued"
}
401 - Unauthorized request. Access token is missing or invalid.
{
  "errorCode": "INVALID_ACCESS",
  "errorMessage": "The access policy denied the resource operation for this user"
}
403 - Forbidden request.
{
  "errorCode": "INVALID_PARAMETER",
  "errorMessage": "Device Not Certified"
}
404 - Bad request. Not found.
{
  "errorCode": "INVALID_PARAMETER",
  "errorMessage": "Device inactive"
}
409 - Bad request. Conflict state.
{
  "errorCode": "INVALID_PARAMETER",
  "errorMessage": "Service Not Purchased"
}

500 - Internal Server Error.

{
  "errorCode": "INTERNAL_ERROR",
  "errorMessage": "Device is active in several accounts"
}