Alert Definition Object Structure
This applies to: Visual Data Discovery
Alert definitions are created by submitting a POST api/alerts
endpoint with a request body that uses the object structure defined here.
Here is a sample of the general object structure required to create an alert definition:
{ "name": "React on high sales prices", "description": "We have a price > $1000", "enabled": true, "schedule": { ... }, "condition": { ... }, "notification": { ... } }
Each object in this structure is described below.
Object | Specifies |
---|---|
name
|
The name of the alert definition. |
description
|
A description of the alert definition. |
enabled
|
Whether or not the definition is enabled. A value of true indicates that it is enabled; false indicates that it is not. If an alert is not enabled, it is not scheduled at all. |
schedule
|
The frequency by which the alert condition in the definition should be evaluated. Valid values are
Example: { ... "schedule": { "frequency": "ONCE", "timeOfDay": "12:30:00", "startDate": "2021-05-14", "endDate": "2021-05-14" } ... } |
condition
|
The alert condition that should be evaluated. The alert condition requires the following fields:
|
notification
|
The notification information for the alert. The notification structure is fully described in detail in Alert Definition Notification Structure. It includes a notification type (only EMAIL is currently supported), a subject for the email message, text for the body of the email message, and recipient information. |
See Alert Definition Examples for complete examples of some alert definitions.