PUT/v1/notification/rule

Create a notification rule

Creates a new notification rule. Supply level, name, publisher, and scope, with the publisher identified by its UUID. You need SYSTEM_CONFIGURATION or SYSTEM_CONFIGURATION_CREATE permission.

4 body fields

Notification rule details to create. level, name, publisher, and scope are required.

levelstringrequired
Notification severity: `INFORMATIONAL`, `WARNING`, or `ERROR`.
Allowed:INFORMATIONALWARNINGERROR
namestringrequired
The notification rule name. Must contain at least one character.
publisherobjectrequired
The notification publisher to use. Supply its UUID in the required `uuid` field.
scopestringrequired
The rule scope: `SYSTEM` or `PORTFOLIO`.
Allowed:SYSTEMPORTFOLIO

3 status codes
201Returns the created notification rule, including its generated UUID, name, scope, trigger type, publisher, and notification settings.
enabledbooleanoptional
filterExpressionstringoptional
logSuccessfulPublishbooleanoptional
messagestringoptional
namestringrequired
notificationLevelstringoptional
Allowed:INFORMATIONALWARNINGERROR
notifyChildrenbooleanoptional
notifyOnarray<string>optional
projectsarray<object>optional
publisherobjectoptional
publisherConfigstringoptional
scheduleCronstringoptional
Schedule of this rule as cron expression. Must not be set for rules with trigger type EVENT.
scheduleLastTriggeredAtintegeroptional
When the schedule last triggered, as UNIX epoch timestamp in milliseconds
scheduleNextTriggerAtintegeroptional
When the schedule triggers next, as UNIX epoch timestamp in milliseconds
scheduleSkipUnchangedbooleanoptional
Whether to skip emitting a scheduled notification if it doesn't contain any changes since its last emission. Must not be set for rules with trigger type EVENT.
scopestringrequired
Allowed:SYSTEMPORTFOLIO
tagsarray<object>optional
teamsarray<object>optional
triggerTypestringrequired
Allowed:EVENTSCHEDULE
uuidstringrequired
401Returned when the request is unauthorized.
404Returned when the UUID of the notification publisher cannot be found.

Error handling

A 401 is returned when the request is unauthorized, and a 404 is returned when the publisher identified by publisher.uuid cannot be found. level must be INFORMATIONAL, WARNING, or ERROR; scope must be SYSTEM or PORTFOLIO; and name must contain at least one character.