Create, Retrieve, Update and Delete Notifications
This page contains the REST Endpoints enabling you to create, retrieve, update and delete notifications.
Request URI
Create: https://your.base.url/rest/announcer/1.0/admin/notifications
Retrieve : https://your.base.url/rest/announcer/1.0/admin/notifications
Update: https://your.base.url/rest/announcer/1.0/admin/notifications/{id}
Delete : https://your.base.url/rest/announcer/1.0/admin/notifications/{id}
Parameters
Parameter Name | Value | Description |
---|---|---|
title | String | Title of the notification |
description | string | Notification description |
contents | string | Notification contents |
type | string | Any of the "dialog", "flag","banner", "intercept" types |
displayType | string | "0" for None "1" for Warning "2" for Information "3" for Error |
format | string | "0" for HTML "1" for plain text "2" for Markdown |
isActive | string | "true" for active/enable "false" for inactive/disable |
showButton | string | "true" to display the Acknowledge button, "false" to hide |
buttonText | string | Text on button that users see when acknowledging notifications |
delayButton | string | "true" to wait for 5 seconds before acknowledging the notification |
anonymous | string | "true" to display the notification to anonymous users |
filterGroups | string | "true" to filter the notifications to specific groups (mandatory for filtering groups to apply) |
targetGroup | string | comma-separated groups:
|
filterProjects | Boolean | Set to If set to |
targetProject | Array of Strings | An array containing the keys of the target projects for filtering notifications. If the array is empty, then Example: [“TEST”, “APP”] |
recurrence | Object | An object that holds Please check this document for more details on recurrence configuration. |
filterUser | Boolean | Set to If set to |
targetUser | Array of Strings | An array containing the usernames of the target users for filtering notifications. If the array is empty, then Example: [“admin”, “user1”] |
Create Notifications
Sample request
curl -X POST http://localhost:2990/jira/rest/announcer/1.0/admin/notifications \
-H "Content-Type: application/json" \
-d '[{"title":"Dialog","description":"desc1","contents":"xxx","type":"dialog","displayType":"0","showButton":"true","isActive":"true", "format":"1"},
{"title":"Banner","description":"desc2","contents":"yyy","type":"banner","displayType":"1","showButton":"true","isActive":"true","format":"1"},
{"title":"Intercept","description":"desc2","contents":"yyy","type":"intercept","displayType":"2","showButton":"true","isActive":"true","format":"1"}]' \
--user "admin:admin"
Sample request to target the notifications to specific group
curl -X POST http://localhost:2990/jira/rest/announcer/1.0/admin/notifications \
-H "Content-Type: application/json" \
-d '[{"title":"Sample Title","description":"This is sample","contents":"content goes here","type":"dialog","displayType":"0","showButton":"true","isActive":"true", "format":"1","filterGroups":"true","targetGroup":"jira-administrators"},
{"title":"Banner","description":"desc2","contents":"yyy","type":"banner","displayType":"1","showButton":"true","isActive":"true","format":"1"},
{"title":"Intercept","description":"desc2","contents":"yyy","type":"intercept","displayType":"2","showButton":"true","isActive":"true","format":"1","filterGroups":"true","targetGroup":"jira-administrators,jira-users,custom-group"}]' \
--user "admin:admin"
Sample request to target the notifications to specific project
curl -X POST http://localhost:2990/jira/rest/announcer/1.0/admin/notifications \
-H "Content-Type: application/json" \
-d '[{"title":"Sample Title","description":"This is sample","contents":"content goes here","type":"dialog","displayType":"0","showButton":"true","isActive":"true", "format":"1","filterProjects":"true","targetProject": ["TEST"]},
{"title":"Banner","description":"desc2","contents":"yyy","type":"banner","displayType":"1","showButton":"true","isActive":"true","format":"1"},
{"title":"Intercept","description":"desc2","contents":"yyy","type":"intercept","displayType":"2","showButton":"true","isActive":"true","format":"1","filterProjects":"true","targetProject": ["DEV", "QA", "HR", "ADMIN"]' \
--user "admin:admin"
Retrieve Notifications
Sample Request
Update Notifications
Sample request
Delete Notifications
Sample request
Table of Contents:
Need more help? Contact our support team.