Notifications
Resource Information
Name (required) |
|
NotificationType (required) |
Type of notification: "Stored_Audio", "Text_And_Images", "Text_To_Speech", "One_Way", "Recorded", “Two_Way”, “Direct_One_Way” |
Priority (optional) |
Defaults to 5 if not set. |
Volume (optional) |
Defaults to 7 if not set. |
ActivationType (optional) |
Defaults to Iteration. |
OpeningTone (optional) |
Id of audio file from the media library. |
ClosingTone (optional) |
Id of audio file from the media library. |
StoredAudio (optional) |
List of audio file ids from the media library. |
StoredImages (optional) |
List of image ids from the media library. |
Triggers (optional) |
List of notification trigger Ids (Guid). |
Interval (optional) |
Used for repeated or continuous notifications. Defaults to 60 seconds. |
Iterations (optional) |
Defaults to 1. |
ClearDisplay (optional) |
Defaults to false. |
Title (required) |
Notification title. |
Body (required) |
Notification body. |
Endpoints (optional) |
List of endpoint urns the notification will be sent to. |
UserTags (optional) |
List of user tag ids (GUID) the notification will be sent to. |
Site (required) |
Provide a Site (name) to associate the action. An empty string defaults the action to AllSites. |
or
or to query a specific notification
Example Response
Add a New Notification
Example Response
Update an Existing Notification
PUT - Must provide a full payload of the existing Notification object with changes to properties as needed
PATCH – can accept a valid JSON of a subset of Notification object. E.g. Name-Values pairs of just the properties that need to be modified.
Example Request
Activate a Notification
Notification can be activated using two different REST methods – GET and POST.
Optional Querystring Parameters for GET Activations
The following optional parameters can be included in addition to the GET method of activating a notification to override/append to the properties already configured in the notification.
-
overridetitle
-
overridebody
-
appendwithaudio
-
appendwithimage
-
prioritygroupid
-
location
-
elevation
-
latitude (required if longitude provided)
-
longitude (required if latitude provided)
Example Request with optional parameters
All parameters or a subset of them may be added to the activation request. Incorrect optional parameter (e.g. typos) will result in an error response of HttpStatus 400 Bad Request.
On a successful activation the API returns HttpStatus 200 OK with activation event response object.
Example Response
Prioritygroupid parameter applies only in a redundancy environment. It takes a guid value of a prioritygroup as parameter. This value is used to determine if the notification should be executed on a server based on the priority group ranking already setup in Revolution. To retrieve all priority groups set up in the system please refer to the Priority Groups sections of the document. If a server determines that it should not execute the notification on the basis of prioritygroupid, then it will return an error code 403 with a friendly error message. On the other hand, if priority group matches with the server, then the notification will be activated an activation event object will be returned similar to the example above.
Activate notification using POST and parameter overrides.
Example Request
Resource Information
Id (required) |
Guid of the notification. |
OverrideTitle (optional) |
Defaults to text in the notification. |
OverrideBody (optional) |
Defaults to text body in the notification. |
AppendWithImage (optional) |
Guid of one image that is appended to existing image (if any) in the notification. |
AppendWithAudio (optional) |
Guid of one audio that is appended to existing stored audio (if any) in the notification. |
PriorityGroupId (optional) |
Guid of priority group that will be considered in determining if this notification should be executed or not in a redundancy environment. |
Location (optional) |
Description of the event location |
Elevation (optional) |
Elevation of the event |
Latitude (optional) |
Latitude of event. Required if Longitude is provided. |
Longitude (optional) |
Longitude of event. Required if Latitude is provided. |
On a successful activation, a 200 Http OK response with notification instance details is returned to the user.
Example Response
Stop an activate notification using POST
notificationInstanceId (required) |
Guid of the NotificationInstanceIDs that is returned in the response body of the Activate call. |
A response of 200 OK is returned if the activation was successfully cancelled. An invalid notificationInstanceID in the POST call will result in a 400 BadRequest error. Any other issues with regards to cancelling the activation will return a 500 InternalServerError.
Delete a Notification
If the delete is successful, a 204 No Content response is returned.
Get Notification Results
Example Request
[Note: NotificationResults returns Title, Body, and a list of Audio and Image used at the time of the notification. Audios and images are available for download using this DownloadMedia API call:
with JSON body containing the Guid. Refer to the MediaResource section for more information and examples.]
Understanding NotificationResults Response
Status – This indicates the status of the notification after it completes. Refer to the IPDevice for a list of possible Status values.
Get all endpoints for a specific notification that was activated
Collection of endpoints a notification was sent to is returned as a collection.
Example Response
Get all contacts for a specific notification that was activated
Example Response
Get all Rebroadcasters for a specific notification that was activated
Get all Gateways for a specific notification that was activated
Get all StaticStream for a specific notification that was activated
Get all StaticStream RTCP for a specific notification that was activated