Update a Trigger for Anomaly Detection

PUT /v2/triggers

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

Request Body

Parameter Name Data Type Description
triggerId
required
string The system assigned name of the trigger being updated
triggerName
string The user defined name of the trigger
triggerCategory
required
string UsageAnomaly - This is the value to use in the request body to detect anomalous behaivior. The values in this table will only be relevant when this parameter is set to this value.
accountName
required
string The name of a billing account. An account name is usually numeric, and must include any leading zeros.
anomalyTriggerRequest
object The details of the UsageAnomaly trigger.
anomalyTriggerRequest.accountNames
either accountNames or deviceGroup is required
string

The Verizon billing account associated with the anomaly triggers for this trigger to be active for devices in those accounts. This should match the accountName parameter from above

An account name is usually numeric, and must include any leading zeros.

anomalyTriggerRequest.deviceGroups
either accountNames or deviceGroup is required

string The names of device groups associated with the anomaly triggers for this trigger to be active for devices in those groups.

anomalyTriggerRequest.includeAbnormal
required

boolean

Whether or not to include  anomalies classified as “abnormal".

  • true
  • false

Classification is set as part of ThingSpace Intelligence anomaly detection settings.

anomalyTriggerRequest.includeVeryAbnormal
required

boolean

Whether or not to include anomalies classified as “very abnormal”.

  • true
  • false

Classification is set as part of ThingSpace Intelligence anomaly detection settings.

anomalyTriggerRequest.includeUnderExpectedUsage
required

boolean

Whether or not to include anomalies that are directionally under the expected usage.

  • true
  • false

anomalyTriggerRequest.includeOverExpectedUsage
required

boolean

Whether or not to include anomalies that are directionally over the expected usage. 

  • true
  • false

notification

object The notification details of the trigger.

notification.notificationType
required

string The type of notification, i.e. "DailySummary".

notification.callback
required

boolean

Whether or not the notification should be sent via callback.

  • true
  • false

notification.emailNotification
required

boolean

Whether or not the notification should be sent via e-mail.

  • true
  • false
notification.notificationGroupName string Name for the notification group
notification.notificationFrequencyFactor integer how often notifications will occur once the threshold is met
notification.notificationFrequencyInterval integer How much time between notifications

notification.externalEmailRecipients
required when emailNotification = true

string E-mail address(es) where the notification should be delivered.
notification.smsNotification boolean

If notifications will be sent out as SMS messages to cellphones.

  • True - SMS messages will be sent
  • False - SMS messages will not be sent
notification.smsNumbers string A comma seperated list of 10-digit cellphone numbers to send notifications to.
notification.reminder boolean

If a daily reminder from the trigger will be sent regardless of the threshold being met or not.

  • True - Send a daily reminder
  • False - No reminder will be sent
notification.severity string

Severity level associated with the notification. Examples would be:

  • Major
  • Minor
  • Critical
  • NotApplicable
active boolean

Indicates if the trigger is active or not.

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

HTTP Request

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

Example Request

Update a trigger for an Anomaly Detection alert
{
   "triggerId":"595f5c44-c31c-4552-8670-020a1545a84d",
   "triggerName":"Anomaly Daily Usage REST Test-Patch Update 4",
   "accountName":"0000123456-00001",
   "triggerCategory":"UsageAnomaly",
   "anomalyTriggerRequest":{
      "accountNames":["0000123456-00001"],
      "includeAbnormal":true,
      "includeVeryAbnormal":true,
      "includeUnderExpectedUsage":false,
      "includeOverExpectedUsage":true
   },
   "notification":{
      "notificationType":"DailySummary",
      "callback":true,
      "emailNotification":false,
      "notificationGroupName":"Anomaly Test API",
      "notificationFrequencyFactor":3,
      "notificationFrequencyInterval":"20",
      "externalEmailRecipients":"placeholder@verizon.com",
      "smsNotification":true,
      "smsNumbers":"10-digit cellphone number",
      "reminder":true,
      "severity":"Critical"
   },
   "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

{
    "status": "Success",
}

Failure Response

All failure responses are in this format:

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

Callback Example

Example of a callback for an updated trigger:

{
   "triggerId":"595f5c44-c31c-4552-8670-020a1545a84d",
   "triggerName":"Usage Anomaly DG Level -R8",
   "accountName":"0000123456-00001",
   "triggerCategory":"UsageAnomaly",
   "anomalyTriggerRequest":{
      "deviceGroup": "Default: 0000123456-00001",
      "includeAbnormal":false,
      "includeVeryAbnormal":true,
      "includeUnderExpectedUsage":false,
      "includeOverExpectedUsage":true
   },
   "notification":{
      "notificationType":"DailySummary",
      "callback":true,
      "emailNotification":true,
      "notificationGroupName":"Anomaly Test API",
      "externalEmailRecipients":"placeholder@verizon.com",
      "severity":"NotApplicable"
   },
   "active":true
}

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

Try It Out!