Integration Server 10.15 | Built-In Services Reference Guide | Alert Folder | Summary of Elements in this Folder | pub.alert:countUnread
 
pub.alert:countUnread
WmPublic. Gets the count of all unread alerts in the system or a subset of unread alerts for the notifier and filter criteria.
Input Parameters
notifierName
String. Optional. Name of the notifier for which alerts are to be fetched. If you do not specify the notifier name, all unread alerts in the system or a subset of the unread alerts that meet the filter criteria are considered.
filter
Document. Optional. To get the count of a subset of unread alerts, specify the criteria using the following keys:
Key
Description
startTime
Long. Optional. Start of the time interval in which alerts are emitted. Specify the value in UNIX epoch format in milliseconds.
endTime
Long. Optional. End of the time interval in which alerts are emitted. Specify the value in UNIX epoch format in milliseconds.
severities
String[]. Optional. List of severities.
channelIds
Object[]. Optional. List of channel identifiers.
user
String. Optional. The Integration Server user who triggered the alerts or Administrator for alerts emitted by the server. For example, specify Administrator for Password Management alerts.
keyword
String. Optional. A keyword that identifies the alerts.
Output Parameters
count
Long. The count of all unread alerts in the system or a subset of unread alerts, if the notifier name and the filter criteria are specified.
Usage Notes
Integration Server uses the pub.alert:countUnread service to display the count of unread notifications on the Notifications icon in Integration Server Administrator.
When notifierName is specified in the pub.alert:countUnread service, the severities and channelIds parameters under filter are evaluated in the following manner:
*When only notifierName is specified without the severities and channelIds parameters under filter, the notifier's severityCutoff and channelIds parameters are considered to get the count of unread alerts.
*When notifierName is specified along with the severities and channelIds parameters under filter:
*If none of the channelIds under filter match with the notifier's channelIds, the notifier's channelIds are considered to get the count of unread alerts. The channelIds under filter are ignored.
*If none of the severities under filter are within the notifier's severityCutoff, the notifier's severityCutoff is considered to get the count of unread alerts. The severities under filter are ignored.
*Otherwise, the channelIds and severities under filter are considered to get the count of unread alerts.
Consider a notifier with the following settings and the notifierName is passed to the pub.alert:countUnread service.
*channelIds: 1001, 1002
*severityCutoff: Error
The following table describes how filter values are evaluated against notifier settings using sample values.
#
Scenario
Evaluation
1
filter
channelId[0]: 1001
Is one of the notifier's channelIds.
severities[0]: Critical
Is within the notifier's severityCutoff.
Result: Unread alerts for channelId: 1001 with severity: Critical are considered.
2
filter
channelId[0]: 1004
Is not among the notifier's channelIds.
severities[0]: Critical
Is within the notifier's severityCutoff.
Result: Unread alerts for channelIds: 1001 and 1002 with severity: Critical are considered. channelId[0]: 1004 is ignored.
3
filter
channelId[0]: 1001
Is one of the notifier's channelIds.
severities[0]: Warning/Information
Is not within the notifier's severityCutoff.
Result: Unread alerts for channelId: 1001 with severity: Error or Critical are considered. severities[0]: Warning/Information is ignored.
4
filter
channelId[0]: 1005
Is not among the notifier's channelIds.
severities[0]: Warning/Information
Is not within the notifier's severityCutoff.
Result: Unread alerts for channelIds: 1001 and 1002 with severity: Error or Critical are considered. channelId[0]: 1005 and severities[0]: Warning/Information are ignored.