Web Request


Web Request


The BI xPress Server's Notification Engine allows users to send rich notifications to their BI xPress Server using HTTP requests.


Important Note:

The SendNotifications request is the preferred method for posting requests to the BI xPress Server Notification Engine.


SendNotifications Request

URI


POST http[s]://<serverName>[:<port>]/api/BIxPress/NotificationEngine/SendNotifications



Content Type


application/json



Request Body


{

"eventName" : "event-name",

"notificationSeverity" : "severity",

"parameters" :

[

{"name" : "parameter-name", "value" : "parameter-value"}

]

}



SendNotification Request

URI


POST http[s]://<serverName>[:<port>]/api/BIxPress/NotificationEngine/SendNotification



Content Type


application/json



Request Body


{

"notificationId" : "notification-id",

"notificationSeverity" : "severity",

"parameters" :

[

{"name" : "parameter-name", "value" : "parameter-value"}

]

}



Request Containing Array Parameters

URI


POST http[s]://<serverName>[:<port>]/api/BIxPress/NotificationEngine/SendNotifications



Content Type


application/json



Request Body


{

"eventName" : "event-name",

"notificationSeverity" : "severity",

"parameters" :

[

{"name" : "parameter-name", "values" :

[

{"name" : "parameter-name", "value" : "parameter-value"}

]

}

]

}



Information

Switch

Description

"eventName" : "value"

All notification events that use the specified value for the eventName property will trigger, sending all related notifications.

"notificationId" : "value"

Only the notification that has the specified notification id will trigger, sending a single notification.

"notificationSeverity" : "value"

The severity threshold for the notification currently being sent. Any request sent with the same event name or notification id as well as a severity greater than or equal to the notification's listed priority will trigger the notification event. Users can specify the following values:


  verylow

  low

  medium

  high

  veryhigh

  critical

  catastrophic



Important Note:

If the notificationSeverity property is not provided or an invalid value is entered, then the Notification Engine will use the default value of "verylow".



Parameters

Switch

Description

{ "name" : "parameter-name", "value" : "parameter-value" }

Within the JSON Request Body, the parameters contain an array of key-value pairs. Each parameter the user wishes to pass through must include an additional line where the name property contains the name of the parameter and the value property is the value the user wishes to assign to that specific parameter.


Examples

The following example posts a SendNotifications request to the BI xPress Server located on localhost to all notifications with the event name "SSISNotification" and does not specify a severity or pass any parameters.


URI


POST http://localhost/api/BIxPress/NotificationEngine/SendNotifications



Request Body


{

"eventName" : "SSISNotification"

}



The following example posts a SendNotifications request to the BI xPress Server located on DEV-BIX-SRV:9090 to all notifications with the event name "SSISNotification" and a priority less than "medium". It also sets the parameters named Status, PackageName and Framework to "Completed", "ETLPackage.dtsx" and "2015.3.7".


URI


POST http://DEV-BIX-SRV:9090/api/BIxPress/NotificationEngine/SendNotifications



Request Body


{

"eventName" : "SSISNotification",

"notificationSeverity" : "medium",

"parameters" :

[

{"name" : "Status", "value" : "Completed"},

{"name" : "PackageName", "value" : "ETLPackage.dtsx"},

{"name" : "Framework", "value" : "2015.3.7"}

]

}



The following example posts a SendNotification request to the BI xPress Server located on DEV-BIX-SRV:9090 to send the notification with the notification id of  "{edbc4104-126f-4646-8030-36e69aa3b892}" and a priority less than "catastrophic". It also sets the parameters named Status to "Failed".


URI


POST http://DEV-BIX-SRV:9090/api/BIxPress/NotificationEngine/SendNotification



Request Body


{

"notificationId" : "{edbc4104-126f-4646-8030-36e69aa3b892}",

"notificationSeverity" : "catastrophic",

"parameters" :

[

{"name" : "Status", "value" : "Failed"}

]

}



The following example posts a SendNotifications request to the BI xPress Server located on DEV-BIX-SRV:9090 to all notifications with the event name "SSISNotification" and a priority less than "medium". It also sets the parameters named Status, PackageName and Framework to "Completed", "ETLPackage.dtsx" and "2015.3.7". It also includes a parameter array named "Errors" with each error containing several parameter.


URI


POST http://DEV-BIX-SRV:9090/api/BIxPress/NotificationEngine/SendNotifications



Request Body


{

"eventName" : "SSISNotification",

"notificationSeverity" : "medium",

"parameters" :

[

{"name" : "Status", "value" : "Completed"},

{"name" : "PackageName", "value" : "ETLPackage.dtsx"},

{"name" : "Framework", "value" : "2015.3.7"},

{ "name": "Errors", "values":

[

{ "name": "Error 0", "values":

[

{ "name": "Source", "value": "Error Test0" },

{ "name": "Time", "value": "2016/05/25 13:45:33"},

{ "name": "Details", "value": "Error Test0" }

]},

{ "name": "Error 1", "values":

[

{ "name": "Source", "value": "Error Test1" },

{ "name": "Time", "value": "2016/05/25 13:46:07"},

{ "name": "Details", "value": "Error Test1" }

]}

]}

]

}