Alerts
Alerts are triggered based on a survey’s alert specifications. If responses given in defined time window meet the criteria of the alert specification, then an alert is triggered. Alert specifications can be edited in the web UI.
Alerts can be fetched for a folder and optionally also for any child folders.
Summary of available resource patterns
Code | URL |
---|---|
GET | /v1/folders/:key/alerts |
Alert
JSON presentation of alert.
Properties
Name | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
key | The identifier of the alert | ||||||||||||||||||
alertType | A string representing the alert’s type. Possible values are: negative , indexThreshold and feedbackCount . More alert types might be added in the future without increasing api version. | ||||||||||||||||||
survey | The survey that has the alert specification for this alert. Survey’s results are monitored and alerts are triggered based on the alert specification that has been configured for the survey. Only a subset of a full Survey-object properties are provided here. | ||||||||||||||||||
alertSpecification | The alert specification of this alert. Alert specifications are configured for folders using the web UI. Alerts that have same alert specification are occurances of same alert being triggered over time. Survey’s results are monitored and alerts are triggered based on the alert specification. This value is useful for grouping alerts. | ||||||||||||||||||
beginTime | Point of time when alert was opened/triggered. Timestamp with survey’s timezone. | ||||||||||||||||||
endTime | optional Point of time when alert was closed. Missing if alert is still open. Timestamp with survey’s timezone. | ||||||||||||||||||
parameters | Alert parameters. Parameters are a combination of the alert specification parameters and the actual calculated values that triggered the alert. Some of the parameters are present only for certain alert types. Alert types that have the parameter are listed below the parameter description. Alert specification’s parameters (configuration values) included in each alert:
|
Example JSON objects
Index threshold alert
Alert is triggered when the index has been above or below a certain value over a specified time window
Negative alert
Alert-triggering negative criteria are the set percentage of negative responses (dark and light red) and the associated time window (available window ranges are 15, 30, 60, 120, 140 minutes)
Feedback count alert
Alert is triggered when a specified limit of a certain type of feedback, or any combination of feedback, is met during a specified time window
GET
/v1/folders/:key/alerts
Retrieves alert history of a folder.
Parameters
All the alerts that have been in open state between date_start
and date_end
are returned. Note that also alerts opened before date_start
or closed after date_end
will be included if their open period intersects with the given date range.
Name | Description |
---|---|
key | required, identifier of folder |
child_folders | optional , true or false When |
date_start | optional , timestamp Alerts with equal or later |
date_end | optional , timestamp Alerts with |
local_date_start | optional , timestamp without timezone ISO8601-standard timestamp without timezone: Works like Local date range is useful to:
Local date range is alternative to date_start and date_end. It is not allowed to mix them or specify both ranges at the same time. |
local_date_start | optional , timestamp without timezone ISO8601-standard timestamp without timezone: Works similar to |
Examples
GET
/v1/folders/2/alerts?child_folders=true
Result
Name | Description |
---|---|
Success | A single JSON object that contains meta and data keys. The data key contains list of Alert objects. The meta key contains paging information, if the response does not contain all the results. If there are so many alerts that some of them do not fit in the same HTTP response, the response will contain the alerts with the earliest |
Error | HTTP status code 404 when no folder is found. |