Notification API
By using the AlertFind simple object access protocol (SOAP) API, you can allow an external system to send predefined notifications. This is particularly useful if your organization uses monitoring systems that can send triggers to an external system.
The API mirrors UI-based processes relating to notifications, though it requires knowledge and understanding of the available objects and classes.
The SOAP API is described using the web service description language (WSDL). The WSDL file is available at your AlertFind data center and provides a standard description of the AlertFind notification service API. See Web Services for more information about the WSDL file. Most programming languages understand the WSDL and can automatically build interfaces that invoke the AlertFind notification API. The WSDL file for AlertFind is located at:
https://BACKEND_URL/soap-api/notification?WSDL
where, BACKEND_URL is your AlertFind URL.
SOAP API Requirements
You must provide a valid user name and password for an account that has permission to send, view, or cancel notifications and incidents. The specific permission or permissions required depends on the API function you use.
Send a Notification
The sendNotification object enables sending a notification to users by AlertFind administrators and team leaders with send notification permission.
Syntax for the sendNotification object is:
long sendNotification (
string sender,
string password,
string teamName,
Notification message,
Recipient[ ] distribution,
long delay,
string customEscalationType,
PersonalEscalationStep[ ] personalEscalationSteps
) throws PermissionDeniedException, invalidArgumentException;
where:
senderis the notification sender's user name.passwordis the notification sender's password.teamNameis the AlertFind team with which this message is associated:- If the value of team is null and the sender has send notification permission for only one team, AlertFind uses that team.
- If the value of team is null and the sender is an administrator, AlertFind uses the Global Team.
- If the user identified as the sender has permission to send to more than one team and this parameter is null, an error occurs.
messageis the message to send.distributionidentifies the notification recipient or recipients.delayis the amount of time in milliseconds AlertFind waits between receipt of the notification trigger and sending the notification.long sendNotificationis a 64-bit number.customEscalationTypeidentifies the custom type of escalation.personalEscalationStepstracks the information relevant to a personal escalation. A personal escalation is an ordered list of personal escalation steps, each of which refers to a device and has a related time-out.
Notification Class
The notification class used in the sendNotification object describes a message that the API can trigger.
Syntax for the notification class is:
class Notification {
string subject;
string body;
boolean authenticationRequired;
string confCallNumber;
string confCallMeetingId;
boolean stopOnResponses
Response[ ] responses;
}
where:
subjectis the subject of the notification (cannot be null).bodyis the text of the notification (cannot be null).authenticationRequiredis optional; the default is false. If the value is true, each notification recipient must enter a valid PIN to hear or read the notification.confCallNumberandconfCallMettingID(optional) provide information AlertFind needs when it connects the recipient to a conference call. If these properties are set:- Notifications include conference call details.
- Responses where
bridgeToConfCallequals “true” transfer recipient to the conference call. stopOnResponsesspecifies whether AlertFind should stop notifying additional recipients after the limits set for all possible responses are met.responsesprovides a list of possible responses. If null or empty, the notification provides recipients with the standard response of “I confirm that I’ve received this message.”
Response Class
A Response class used in the Notification object provides available responses from which notification recipients can select.
Syntax for the Response object is:
class Response {
string description;
string abbreviation;
int maxRecipients;
boolean bridgeToConfCall;
boolean allowRecipientData;
}
where:
descriptionis the text spoken for this notification (or included as message text if received as an email).abbreviationis the abbreviation used as a reference to this response both in the API and the UI.maxRecipients(optional) is the maximum number of recipients allowed for this response.- Default value is 0. When the value is 0, AlertFind contacts all identified recipients.
- When the number of responses received equals
maxRecipients, AlertFind stops trying to deliver the notification to additional recipients. bridgeToConfCall(optional)
- The default value is false.
- When true, AlertFind automatically transfers recipients to the specified conference call.
allowRecipientData(optional)
- The default value is false.
- When true, AlertFind automatically transfers recipients to the specified conference call.
Recipient Class
The Recipient class used in the sendNotification object identifies the recipients for a specified notification.
Syntax for the Recipient class is:
class Recipient {
string type;
string id;
long delayAfter
}
where:
typeis the type of recipient. Possible values are:userfor a user name.groupfor the name of a group.distfor the name of a predefined distribution list (escalation group).idis the identification of the recipient. The meaning of this property varies with type.delayAfteris the amount of time in milliseconds that AlertFind waits between recipients when it sends the notification. If the value ofdelayAfteris 0, AlertFind sends the notification to all recipients simultaneously.
Cancel a Notification
The cancelNotification object cancels an in-progress notification.
Syntax for the cancelNotification object is:
boolean cancelNotification (
String username,
String password,
long notificationId
) throws InvalidNotificationException, PermissionDeniedException, InvalidArgumentException;
where:
senderis the user name of the user who is initializing the cancellation.passwordis the password of the user who is initializing the cancellation.notificationIdidentifies the notification to be canceled. This value is set when the API initiates the notification.
Query the Status of a Notification
The queryNotificationStatus object searches for and returns summary information about a notification. The query results resemble the notification status information that appears on the Notifications page of the UI.
Syntax for the queryNotificationStatus object is:
NotificationStatusSummary queryNotificationStatusSummary(
String username,
String password,
long notificationId
) throws InvalidNotificationException, PermissionDeniedException, InvalidArgumentException;
where:
usernameis the user name of the user performing the query.passwordis the user’s password.notificationIdidentities the notification for which status information is needed. This value is set when the API initiates the notification.
NotificationStatusSummary Class
The NotificationStatusSummary class used in the queryNotificationStatus object returns the status of a specified notification.
Syntax for the NotificationStatusSummary class is:
class NotificationStatusSummary {
string status;
ResponseCount[ ] responses;
}
where:
statusis the status of the notification. Possible statuses are:Manual—Notification is waiting for manual execution.Pending—Notification is pending.Scheduled—Notification is scheduled.Cancelled—The notification was canceled.Scheduling—Notification is being scheduled.Error—Notification has an error.Executing—Notification is executing.Complete—Notification is completed.Notifications_Completed—Notifications are completed.responsesis a value array containing a breakdown of counts by response. Additionally, the final array element represents the number of contacts who have not responded in any way. In situations where one or more of the response options has been defined with a response limit, then there is an additional array entry preceding the final one and it holds the number of contact attempts terminated because their limit was reached. For example, if the possible responses are delayed and confirmed and no responses limits were established, then:response[0]shows the number of contacts whose responses were delayed.response[1]shows the number of contacts who responded. confirmed.response[2]shows the number of contacts who have not responded in any way.
Alternately, if the possible responses are delayed and confirmed and a responses limits was specified, then:
response[0]shows the number of contacts whose responses were delayed.response[1]shows the number of contacts who responded confirmed.response[2]shows the number of contact attempts have been terminated because the response limits were reached.response[3]shows the number of contacts who have not responded in any way.
ResponseCount Class
The ResponseCount class used in the queryNotificationStatus object is an array containing a breakdown of counts by response.
Syntax for the ResponseCount class is:
class ResponseCount {
string abbreviation;
int count;
}
where:
abbreviationis one of the following:- The abbreviation corresponding to the selected response.
- Null indicates no abbreviation has been specified for this response or that an extra one or two summary responses occur at the end.
countis the number of recipients:- Who selected the response specified by the abbreviation.
- Null is an integer.
Query the Status of a Notification Recipient
The queryRecipientStatus object retrieves recipient status. This information resembles the information displayed on the Recipients tab of the Notification Details page. This object returns the most complete status, but not necessarily the last activity, of the notification recipient. For example, if the user acknowledged the message using their Work Phone device, the latest activity is “Hung up,” but the reported status is “Work Phone: Confirmed”.
Syntax for the queryRecipientStatus object is:
RecipientStatus[ ] queryRecipientStatus(
string username,
string password,
long notificationId
) Throws InvalidNotificationException, PermissionDeniedException, InvalidArgumentException
where:
senderis the user performing the query.passwordis the user’s password.notificationIdis the notification the object is to query.
RecipientStatus Class
The RecipientStatus class used in the queryRecipientStatus object provides information about the queried recipient.
Syntax of the RecipientStatus class is:
class RecipientStatus {
string name;
string userName;
string timestamp;
int statusCode;
string statusMessage;
string response
}
where:
nameis the display name of the recipient.userNameis the recipient’s user name. If the recipient has more than one user name, this user name cannot match the user name in the Recipients object for thesendNotificationmethod (though both user names identify the same user).timestampis the time stamp of the status event.statusCodeis the internal status code for the event. See table below.statusMessageis the descriptive text associated with the status event.responsecontains the abbreviation corresponding to the recipient’s response, if any, to the notification. If the recipient did not respond to the notification, the value returned for response is null.
Send a Notification Using a Scenario (deprecated)
The sendScenario object sends a notification using a pre-created scenario. The sender of the notification must have permission to send both notifications and scenarios to the team.
Syntax of the sendScenario object is:
long sendScenario(
String sender,
String password,
String teamName,
String scenarioName,
long delay
) throws RemoteException, PermissionDeniedException, InvalidArgumentException;
where:
senderis the sender's user name. It returns a token that identifies this incident that can be used to query the message status.passwordis the sender's password.scenarioNameis the name of the scenario to be sent.delayis the period of time in minutes to delay before sending the notification.