Integration Server 10.7 | Built-In Services Reference Guide | Alert Folder | Summary of Elements in this Folder | pub.alert:fetchUnread
 
pub.alert:fetchUnread
WmPublic. Fetches all the unread alerts in the system or a subset of unread alerts for the notifier and filter criteria.
Input Parameters
notifierName
String. Optional. If you do not specify the notifier name, all the unread alerts in the system or a subset of the unread alerts that meet the filter criteria are fetched.
filter
Document. Optional. To fetch a subset of 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 the UNIX epoch format in milliseconds.
endTime
Long. Optional. End of the time interval in which alerts are emitted. Specify the value in the 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.
sortOrder
String. Optional. The order in which the fetched alerts are sorted. Select ASC or DESC. The default is DESC.
sortBy
String. Optional. The criteria to sort the fetched alerts. Select one of the following options:
*channel
*severity
*subject
*timestamp
The default is timestamp.
pageSize
Integer. The number of notifications on a page, identified by pageNumber
pageNumber
Integer. In a paginated list of notifications, the page where Integration Server loads the notifications.
Note:
Page number starts with 0.
Output Parameters
alerts
Document List. A list of the alerts fetched by the service. Each alert has the following details:
Key
Description
id
Long. Alert identifier.
ts
Long.
Date and time when the alert is generated, in the UNIX epoch time format.
serverId
String. IP address of the host where Integration Server is running.
memberName
String. Member name of the machine that hosts Integration Server in a cluster.
user
String. Integration Server user who triggered the alert.
channelId
Integer. Channel identifier for the alert.
channel
String. Channel for the alert.
severityId
Integer. Severity identifier of the alert.
severity
String. Severity of the alert.
subject
String. Subject of the alert message.
contentType
String. Text that identifies the type of content in the alert such as text/plain and text/html.
content
String. Content of the alert.
Usage Notes
Integration Server uses the pub.alert:fetchUnread service to display the unread notifications in Integration Server Administrator.
When notifierName is specified in the pub.alert:fetchUnread 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 fetch the 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 fetch the 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 fetch the unread alerts. The severities under filter are ignored.
*Otherwise, the channelIds and severities under filter are considered to fetch the unread alerts.
Consider a notifier with the following settings and the notifierName is passed to the pub.alert:fetchUnread 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 are fetched for channelId: 1001 with severity: Critical.
2
filter
channelId[0]: 1004
Is not among the notifier's channelIds
severities[0]: Critical
Is within the notifier's severityCutoff.
Result: Unread alerts are fetched for channelIds: 1001 and 1002 with severity: Critical. 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 are fetched for channelId: 1001 with severity: Error or Critical. 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 are fetched for channelIds: 1001 and 1002 with severity: Error or Critical. channelId[0]: 1005 and severities[0]: Warning/Information are ignored.
The number of notifications on a page is identified by pageSize and the current page is identified by pageNumber. If pageSize is 10 and pageNumber is 0, with sortBy and sortOrder having default values, the latest 10 notifications are listed on the first page.