-
Notifications
You must be signed in to change notification settings - Fork 1
Everbridge Web Posting Structure
As specified by Everbridge, this is the structure of the payload for the "Web Posting" that Everbridge delivers to our plugin endpoint:
{"title" : "Notification Title", "body" : "Notification Body", "fileAttachments" : ""}
It is possible to simulate the incoming Web Posting with a curl command like this:
curl --location --request POST 'https://sandbox.bu.edu/wp-json/bu-alert/v1/start/?token=akslfhjsdfh' \
--header 'Content-Type: application/json' \
--data-raw '{"title" : "Test Alert Title", "body" : "This is a test alert message. A real message will contain important alert information, but this is just a test.", "fileAttachments" : ""}'
A shortcoming of the Everbridge integration is that the Web Posting does not provide the incident_id, which is necessary in order match the WordPress alert to the Everbridge incident. To work around this limitation, when a Web Posting is received, as part of the processing we immediately check with the Everbridge API and get all of the open incidents. All the open incidents are checked for a matching title and body. As long as the title and body from the Web Posting matches the Everbridge API response, the correct incident id can be captured for the alert.