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.
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 An account name is usually numeric, and must include any leading zeros. |
anomalyTriggerRequest.deviceGroups |
string | The names of device groups associated with the anomaly triggers for this trigger to be active for devices in those groups. |
anomalyTriggerRequest.includeAbnormal |
boolean | Whether or not to include anomalies classified as “abnormal".
Classification is set as part of ThingSpace Intelligence anomaly detection settings. |
anomalyTriggerRequest.includeVeryAbnormal |
boolean | Whether or not to include anomalies classified as “very abnormal”.
Classification is set as part of ThingSpace Intelligence anomaly detection settings. |
anomalyTriggerRequest.includeUnderExpectedUsage |
boolean | Whether or not to include anomalies that are directionally under the expected usage.
|
anomalyTriggerRequest.includeOverExpectedUsage |
boolean | Whether or not to include anomalies that are directionally over the expected usage.
|
notification |
object | The notification details of the trigger. |
notification.notificationType |
string | The type of notification, i.e. "DailySummary". |
notification.callback |
boolean | Whether or not the notification should be sent via callback.
|
notification.emailNotification |
boolean | Whether or not the notification should be sent via e-mail.
|
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 |
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.
|
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.
|
notification.severity | string | Severity level associated with the notification. Examples would be:
|
active | boolean | Indicates if the trigger is active or not.
|
PUT https://thingspace.verizon.com/api/m2m/v2/triggers
{
"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
}
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",
}
All failure responses are in this format:
{
"errorCode": "error code string",
"errorMessage": "error message string"
}
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.