Namespace: synergy/event-types
This feature specifies the list of notification event types for the user (ie. email) notifications. Synergy is able to send out notifications (emails) to users when a specific event happens. In order to send notifications to users from your application, you have to publish the possible notification event types. Synergy calls the specified application endpoint to retrieve the event types. This info is used on the Notification Settings page, where the users can subscribe/unsubscribe for application notifications.
The application can send notifications to specific users or user groups by calling the Notification API of Synergy (/api/notification). Synergy reads the list of notification event types provided by the endpoint specified in SF-010 feature attribute by sending HTTP GET request for internal purposes. Response is expected to contain JSON of event type with other properties.
Application info uses synergy/event-types
namespace and single url
attribute.
Example
{
"namespace" : "synergy/event-types",
"attributes" : {
"url" : "https://edc-api.cxcloud.io/api/event/v1/types"
}
Example endpoint response
[ {
"type": "NEW_ANALYTICAL_REQUEST",
"preferencesLabel": "new analytical request has been created",
"unsubscribeMessage": "You will no longer to receive notification about new requests in Synergy.",
"groups": ["ANALYTICAL_CHEMIST", "USER"]
},{
"type": "CLOSE_ANALYTICAL_REQUEST",
"label": " analytical request has been closed",
"unsubscribeMessage": "You will no longer to receive notification about closed requests in Synergy",
"groups": ["SYNTHETIC_CHEMIST", "USER"]
}]