Premium APIsThingSpace IntelligenceAnomaly DetectionAPI Reference

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.

HTTP Request

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

Request Parameters

All parameters are required unless marked "optional".

Parameter NameData TypeDescription
triggerId (required)stringThe system assigned name of the trigger being updated
triggerNamestringThe user defined name of the trigger
triggerCategory (required)stringUsageAnomaly - 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)stringThe name of a billing account. An account name is usually numeric, and must include any leading zeros.
anomalyTriggerRequestobjectThe details of the UsageAnomaly trigger.
anomalyTriggerRequest.accountNames
(either accountNames or deviceGroup is required)
stringThe 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)
stringThe names of device groups associated with the anomaly triggers for this trigger to be active for devices in those groups.
anomalyTriggerRequest.includeAbnormal (required)booleanWhether or not to include anomalies classified as “abnormal". true or false.
Classification is set as part of ThingSpace Intelligence anomaly detection settings.
anomalyTriggerRequest.includeVeryAbnormal
(required)
booleanWhether or not to include anomalies classified as “very abnormal”. true or false.
Classification is set as part of ThingSpace Intelligence anomaly detection settings.
anomalyTriggerRequest.includeUnderExpectedUsage
(required)
booleanWhether or not to include anomalies that are directionally under the expected usage. true or false.
anomalyTriggerRequest.includeOverExpectedUsage
(required)
booleanWhether or not to include anomalies that are directionally over the expected usage. true or false.
notificationobjectThe notification details of the trigger.
notification.notificationType (required)stringThe type of notification, i.e. "DailySummary".
notification.callback (required)booleanWhether or not the notification should be sent via callback. true or false.
notification.emailNotification (required)booleanWhether or not the notification should be sent via e-mail. true or false.
notification.notificationGroupNamestringName for the notification group
notification.notificationFrequencyFactorintegerhow often notifications will occur once the threshold is met
notification.notificationFrequencyIntervalintegerHow much time between notifications
notification.externalEmailRecipients
(required when emailNotification = true)
stringE-mail address(es) where the notification should be delivered.
notification.smsNotificationbooleanIf notifications will be sent out as SMS messages to cellphones.
True - SMS messages will be sent, False - SMS messages will not be sent
notification.smsNumbersstringA comma seperated list of 10-digit cellphone numbers to send notifications to.
notification.reminderbooleanIf 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.severitystringSeverity level associated with the notification. Examples would be: Major Minor Critical NotApplicable
activebooleanIndicates if the trigger is active or not. True - Trigger is active, False - Trigger is not active.

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 Responses

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

Status 200

A successful response shows a system generated request ID to track the request.

{
    "status": "Success",
}

Failure Responses

All error responses will be in the following format

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

Callback Response

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
}

On this page