Specialized APIsSensor InsightsAPI Reference

Get the Smart Alert metrics

Retrieve Smart Alert Metrics

POST /dm/v1/smartAlerts/actions/metrics

Use this endpoint to retrieve metrics for smart alerts sent for a recent daily period, up to 30 days.

Header Parameters

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 NameData TypeDescription
Authorization (required)stringHTTP Authorization request header containing a valid Bearer token: Authorization: Bearer {token}
VZ-M2M-Token (required)stringA valid session token returned by a Connectivity Management POST /session/login request.
Content-Type (required)stringMust be application/json.

HTTP Request

POST https://thingspace.verizon.com/api/dm/v1/smartAlerts/actions/metrics

Request Parameters

Note: All parameters are required unless marked (optional)

ParameterData TypeDescription
daysintegerThe period of days to query. This value is for days up to the day the request is made.

Request Body

Example Request:

{
  "days": 30
}

Success Response

Status 200 This is a synchronous response, so the tallies of smart alerts received in the period specified will be returned. Example Response:

{
  "critical": 0,
  "major": 0,
  "minor": 0,
  "noalert": 1,
  "total": 1,
  "deltacritical": -3,
  "deltamajor": -1,
  "deltaminor": 0,
  "deltanoalert": -15
}

Success Parameters

ParameterData TypeDescription
criticalintegerThe number of critical alerts in the time period queried.
majorintegerThe number of major alerts in the time period queried.
minorintegerthe number of minor alerts in the time period queried.
noalertintegerThe number of times a sensor reported with no alerts in the time period queried.
totalintegerThe total number of alerts in the time period queried.
deltacriticalintegerThe change in the number of critical alerts reported in the time period queried.
deltamajorintegerThe change in the number of major alerts reported in the time period queried.
deltaminorintegerThe change in the number of minor alerts reported in the time period queried.
deltanoalertintegerThe change in the number of times a sensor reported with no alerts in the time period queried.

Failure Responses

Example Response:

{
  "error": "Error name or code",
  "error_description": "A longer error description.",
  "cause": "A cause for the error"
}

On this page