Notification rules (IRPCNotificationRules)
Manages notification rules: which events on which objects send the user a notification.
| gRPC service | MFiles.IRPCNotificationRules |
|---|---|
| Book and level | Vault API, standard |
| Methods | 4 |
| Proto file | mfiles/IRPCNotificationRules.proto |
Overview
A notification rule (NotificationRule) combines a filter
(object_filter, search conditions), the events to watch (subscriptions, such as
EVENT_TYPE_OBJECT_CREATED or EVENT_TYPE_OBJECT_CHANGED) and delivery options (options).
Notifications are sent by e-mail, and only when notifications are enabled on the server and in
the vault and the user has not turned them off (see
GetNotificationConfiguration).
There are two kinds of rules:
| Kind | is_common |
Who manages it | Who it notifies |
|---|---|---|---|
| Private | false | users with the vault right manage_private_notification_rules |
the owner |
| Common | true | users with the vault right manage_common_notification_rules |
the users and groups in recipients |
Typical use:
- GetNotificationRules to list the rules that apply to the caller.
- AddNotificationRule,
ModifyNotificationRule and
RemoveNotificationRule to change
them. Rules are identified by
id.
To follow a single object, use FollowObject instead of building the rule yourself. Rights are listed in VaultAccess; filters use the search conditions described in Search.
Filter-based rules. A rule whose only subscription is EVENT_TYPE_OBJECT_NOTIFICATION
notifies about the objects that match its filter, for example as a reminder, instead of about
events. Only such rules use options.recurring and notification_days_of_week. The server keeps
these two fields only if the session was opened with
ClientData.capabilities.recurring_notifications set; otherwise it saves recurring as false and
notification_days_of_week as every day (127).
Methods
| Method | Summary | Facts |
|---|---|---|
| AddNotificationRule | Creates a notification rule and returns its ID. | write session returns metadata structure version |
| GetNotificationRules | Gets the caller's private notification rules and the common rules that apply to the caller. | read session idempotent returns metadata structure version |
| ModifyNotificationRule | Replaces a notification rule, identified by its id, with the given definition. | write session idempotent returns metadata structure version |
| RemoveNotificationRule | Deletes a notification rule. | write session returns metadata structure version |