Update a Trigger for Service Impacting Events

PUT /v2/triggers

Updating a trigger for Service Impacting Events is similar to updating any trigger in Connectivity Management. The only difference is a few additional values added for Service Impacting Events. This page will cover the additional values for Service Impacting Events and provide examples of what requests look like with these values. The API Reference page for updating a trigger can be found at Update a Trigger.

Request Components

HTTP Request

PUT 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 Name Data Type Description
Authorization
required
string

HTTP Authorization bearer token:
Authorization: Bearer {token}

VZ-M2M-Token
required
string

A valid session token:
VZ-M2M-Token: {M2Mtoken}

Content-Type
required
string

Must be application/json:
Content-Type: application/json

Request Parameters

All parameters are required unless marked "optional".

Parameter Name Data Type Description
triggerId
string The system assigned name of the trigger being updated
triggerName
string The user defined name of the trigger
triggerCategory
string The type of trigger used. For these triggers, the type will always be ServiceImpactingEvents
serviceImpactingEventsTrigger
object The details of the ServiceImpactingEvents trigger.
   filterCriteria
object Contains the filter details.
      accountName
string An account name is usually numeric, and must include any leading zeros.

      deviceGroups

string The user-defined names of the groups.

   notification

object Contains details about the notification.

      notificationType

string The type of notification must be “PerEvent” for ServiceImpactingEvents.

      callback

boolean

Will be set to "true" if callbacks are requested to be enabled for this trigger.

      severity string

Desired severity for notifications. Valid values include:

 

  • Critical
  • Major
  • Minor
  • Notice
  • NotApplicable

 

active boolean

Indicates if the trigger is active or not.

  • True - Trigger is active
  • False - Trigger is not active

Request Body

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

Success Response

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

Status 200

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

Failure Response

All failure responses are in this format:

{
    "errorCode": "error code string",
    "errorMessage": "error message string"
}

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. The callback service to be subscribed to is AlertService.

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": "PerEvent",
      "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

Parameter Data Type Description
username string The user's login information.
password object The user's password.
requestId string The requestId being viewed. This is a system generated value from the request above.
deviceResponse object Contains the response details from the device(s).
   alertServiceResponse  object

Contains the details of the alert causing the trigger to respond.

      triggerId string System generated ID.
      triggerName string The user-defined name of the trigger.
      triggerDateTime string The timestamp of when the trigger responded.
      message string

A system generated message.

      notificationType string The type of notification, i.e. "DailySummary" or "PerEvent".
      accountName string The numeric name of the account, including leading zeros.
      serviceImpactingEvents object Details about the service impact causing the alert.
         deviceIds array A list of devices impacted.
            id string The value of the identifier
            kind string The type of identifier.
         date string The timestamp of the network event.
         reason string The description of the specific service impacting event
         service string The name of the service impacted by the event.
         city string The name of the city where the event occurred.
         state string The 2 letter state code. This conforms to ISO-3166.
callbackCount string The number of responses for deviceResponse found.
maxCallbackThreshold string The maximum number of responses for deviceResponse allowed.

Error codes and messages are listed on the Error Messages page, along with explanations and suggestions for corrective actions.

Try It Out!