With Mindbreeze InSpire, you can trigger defined alerts using a simple interface. This interface is based on HTTP and JSON.
Alerts can be defined in the client service configuration:
If the Notification Schedule is empty, the alert isn't executed automatically and can only be triggered using the alerts trigger API. Of course, alerts that have a Notification Schedule can also be triggered at a specified time using the alerts trigger API.
Documentation and examples of cron expressions can be found here.
The alert trigger request is sent as HTTP POST to a client service. The path for saving the export request is as follows:
<Client Service URL>/api/v2/alerts/trigger
The request takes the following form:
{
“collection_path”: [“emailalert”, “triggered”]
}
This request will trigger “emailalert/triggered”, so that all users who have created alerts in this particular alert collection will receive their alerts.
If you need to further restrict the search query for the trigger, a constraint can be specified using a mindbreeze.api.v2.QuerExpr:
{
“collection_path”: [“emailalert”, “triggered”],
“constraint”: <QueryExpr>
}
In response, a status is returned that indicates whether the alert trigger was successful:
{
“status”: {
“success”: true,
“description”: “Success”
}
}
Alerts can only be triggered by privileged users. By default, user-administrator users of persisted resources are authorized to trigger alerts. Users of the builtin_notificationtrigger group are also authorized to trigger alerts.