IRPCNotificationRules.AddNotificationRule

View as Markdown

Vault API / standard write session returns metadata structure version

Creates a notification rule and returns its ID.

ServiceNotification rules MFiles.IRPCNotificationRules
gRPC method/MFiles.IRPCNotificationRules/AddNotificationRule
HTTP (mf-http-grpc)POST /grpc/v1/add-notification-rule
RequestAddNotificationRuleRequest
ResponseAddNotificationRuleResponse
Book and levelVault API, standard
Kindwrite
SessionRequired: the session ID from LogIn in the mfiles-session-id-bin metadata.
Idempotentno
Returns metadata structure versionyes (in the mfiles-metadata-version-bin trailer)
Streamingnone (unary)

Remarks

Request: AddNotificationRuleRequest

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page. Fields marked (recursive) refer to a type already on their path.

FieldTypeDescription
utf8szruleNotificationRuleThe rule to create. Set name, subscriptions and usually object_filter and options.is_enabled; for a common rule also is_common and recipients. id is ignored.
utf8szrule.idint32The ID of the rule. Assigned by the server when the rule is created.
utf8szrule.namestringThe name of the notification rule.
utf8szrule.object_filter[]repeated SearchConditionThe search conditions that an object must meet for the rule to apply, combined with AND. The built-in rules include a "not deleted" condition (STATUS_TYPE_IS_DELETED equal to false).
utf8szrule.object_filter[].expressionExpressionThe left side of the condition: what is evaluated for each object, such as a property value, a status value or any field (full-text search).
utf8szrule.object_filter[].typeConditionTypeThe comparison operator.
utf8szrule.object_filter[].valueTypedValueThe right side of the condition: the value to compare with. Its data type must suit the expression, for example a lookup for a lookup property, Boolean for STATUS_TYPE_IS_DELETED.
utf8szrule.subscriptions[]repeated EventSubscriptionThe events that trigger a notification. A single EVENT_TYPE_OBJECT_NOTIFICATION subscription makes the rule filter-based: it then notifies about the objects that match object_filter.
utf8szrule.subscriptions[].typeEventTypeThe type of the event. [ switch_is( eventtype ) ] EventTypeSpecificDataUnion etsdu; //!< Additional event type -specific data as a union.
utf8szrule.optionsNOTIFICATIONFLAGSis_enabled turns the rule on, send_digest combines the day's notifications into one message, exclude_self_triggered leaves out events caused by the user, and recurring (filter-based rules only) repeats the notification for objects that still match.
utf8szrule.options.allboolSpecifies all flags set; Including any future flags.
utf8szrule.options.is_enabledboolNotifications enabled.
utf8szrule.options.send_digestboolCombine the day's notifications into a single message.
utf8szrule.options.exclude_self_triggeredboolExclude notifications of events caused by me.
utf8szrule.options.recurringboolNotifications are recurring (not only appear once per a matching object).
utf8szrule.is_commonboolTrue for a common rule that notifies the users and groups in recipients; false for a private rule of its owner.
utf8szrule.recipientsAccessControlListFor a common rule, the users and groups to notify. Not used by private rules.
utf8szrule.recipients.checked_out_to_userint32Specifies the ID of the user who has extended rights because of the checkout operation performed by her. 0 if such user does not exist.
utf8szrule.recipients.is_fully_authoritativeboolSpecifies whether this access control list is set to ignore the secondary permissions that come from the latest checked in version.
utf8szrule.recipients.custom_componentAccessControlListComponentAccesses the custom component of this ACL.
utf8szrule.recipients.restrictive_components[]repeated AccessControlListComponentMapEntryAccesses the restrictive automatic components of this ACL.
utf8szrule.recipients.secondary_access_control_listAccessControlList (recursive)Secondary ACL used for latest version ACL. Not used for access check if null.
utf8szrule.recipients.additive_components[]repeated AccessControlListComponentMapEntryAccesses the additive automatic components of this ACL.
utf8szrule.notification_days_of_weekuint32For filter-based rules, the days on which the rule is processed, as a bit mask: 1 Sunday, 2 Monday, 4 Tuesday, 8 Wednesday, 16 Thursday, 32 Friday, 64 Saturday. 127 means every day.

Response: AddNotificationRuleResponse

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
idint32The ID of the new rule.