Notification rules (IRPCNotificationRules)

View as Markdown

Manages notification rules: which events on which objects send the user a notification.

gRPC serviceMFiles.IRPCNotificationRules
Book and levelVault API, standard
Methods4
Proto filemfiles/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:

  1. GetNotificationRules to list the rules that apply to the caller.
  2. 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

MethodSummaryFacts
AddNotificationRuleCreates a notification rule and returns its ID.write session returns metadata structure version
GetNotificationRulesGets the caller's private notification rules and the common rules that apply to the caller.read session idempotent returns metadata structure version
ModifyNotificationRuleReplaces a notification rule, identified by its id, with the given definition.write session idempotent returns metadata structure version
RemoveNotificationRuleDeletes a notification rule.write session returns metadata structure version