Premium APIsThingSpace IntelligenceAnomaly DetectionAPI Reference

Create a Trigger for Service Impacting Events

POST /v2/triggers

This API allows an application to register for callback notifications during a relevant network outage. It is recommended to also subscribe to the Reachability API service to receive subsequent callbacks when devices come back online after a Service Impacting Event.

Creating a trigger for Service Impacting Events Is similar to creating any trigger in Connectivity Management. The only difference is a few additional values for Service Impacting Events. This page will cover the values Service Impacting Events and provide examples of what requests look like with the new values. The API Reference page for creating a trigger can be found at Create a Trigger for Usage Notifications.

HTTP Request

POST https://thingspace.verizon.com/api/m2m/v2/triggers

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 bearer token:
Authorization: Bearer {token}
VZ-M2M-Token
required
stringA valid session token:
VZ-M2M-Token: {M2Mtoken}
Content-Type
required
stringMust be application/json:
Content-Type: application/json

Request Parameters

All parameters are required unless marked "optional".

ParameterData TypeDescription
triggerNamestringThe name of the trigger as defined by the user.
triggerCategorystringThe type of trigger being created. For these triggers, the type will always be ServiceImpactingEvents
serviceImpactingEventsTriggerobjectFiltering details for what the trigger will apply to.
  filterCriteriaobjectContains the filter details.
   accountNamestringThe numeric name of the account. This must include all leading zeros.
   deviceGroupNamestringThe user-assigned name of the group.
notificationobjectContains details about the notification
  notificationTypestringThe type of notification must be “PerEvent” for ServiceImpactingEvents.
  callbackbooleanWill be set to "true" if callbacks are requested to be enabled for this trigger.
  severitystringDesired severity for notifications. Valid values include:
  • Critical
  • Major
  • Minor
  • Notice
  • NotApplicable
activebooleanThe status of the trigger. If the trigger is active, this will show "true". If the trigger is not active, this will show "false".

Request Body

Example request:

{
    "triggerName": "user-defined trigger name",
    "triggerCategory": "ServiceImpactingEvents",
    "serviceImpactingEventsTrigger": {
        "filterCriteria": {
            "accountName": "0000123456-00001",
            "deviceGroupName": "user-defined group name"
        }
    },
    "notification": {
        "notificationType": "PerEvent",
        "callback": true,
        "severity": "Minor"
    },
    "active": true
}

Success Responses

Status 200

Example Success Response

{
  "requestId": "d1f08526-5443-4054-9a29-4456490ea9f8"
}

Callback Response

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 response:

{
  "username": "user's login (used for callback registration)",
  "password": "user's password",
  "requestId": "d1f08526-5443-4054-9a29-4456490ea9f8",
  "deviceResponse": {
    "alertServiceResponse": {
      "triggerId": "system generated trigger identifier",
      "triggerName": "user-defined trigger name",
      "triggerDateTime": "6/9/2023 10:23:47 PM",
      "message": "Service Impacting Event Alert for Account Number 0000123456-00001 on 06/09/2023 ",
      "notificationType": "Per Event",
      "accountName": "0000123456-00001",
      "serviceImpactingEvents": {
        "deviceIds": [
          {
            "id": "10-digit phone number",
            "kind": "MDN"
          },
          {
            "id": "10-digit phone number",
            "kind": "MDN"
          }
        ],
        "date": "2022-08-02T11:40:04",
        "reason": "OUTAGE",
        "service": "service name or identifier",
        "city": "Irving",
        "state": "TX"
      }
    }
  },
  "callbackCount": 1,
  "maxCallbackThreshold": 4
}

Callback Parameters

ParameterData TypeDescription
usernamestringThe user's login information.
passwordobjectThe user's password.
requestIdstringThe requestId being viewed. This is a system generated value from the request above.
deviceResponseobjectContains the response details from the device(s).
 alertServiceResponseobjectContains the details of the alert causing the trigger to respond.
  triggerIdstringSystem generated ID.
  triggerNamestringThe user-defined name of the trigger.
  triggerDateTimestringThe timestamp of when the trigger responded.
  messagestringA system generated message.
  notificationTypestringThe type of notification must be “PerEvent” for ServiceImpactingEvents.
  accountNamestringThe numeric name of the account, including leading zeros.
  serviceImpactingEventsobjectDetails about the service impact causing the alert.
   deviceIdsarrayA list of devices impacted.
    idstringThe value of the identifier
    kindstringThe type of identifier.
   datestringThe timestamp of the network event.
   reasonstringThe description of the specific service impacting event
   servicestringThe name of the service impacted by the event.
   citystringThe name of the city where the event occurred.
   statestringThe 2 letter state code. This conforms to ISO-3166.
callbackCountstringThe number of responses for deviceResponse found.
maxCallbackThresholdstringThe maximum number of responses for deviceResponse allowed.

Failure Responses

Status 400

All error messages are returned in this format:

{
  "errorCode": "The 3-digit HTML error code",
  "errorMessage": "string"
}

On this page