Events

Retrieving messages sent in relation to the event

You can easily retrieve all messages that are associated with an event by using the unique label that is created for each event.

The label to use for searching is provided to users in both the /events and /events/ requests as a link element. The ‘rel’ field for this element is: retrieveEventMessages

The API also supports using this listing to query the different messages for status or any other purpose. And any of the features available in sending messages, or advanced messages, are also available to be used within Events messages.

  • JSON
  • XML

Sample URI for retrieveEventMessages

{{codeStart}}

{

"uri": "http://api.<region>.whispir.com/messages?label=657126%20Outage%20of%20systems%20in%20Sydney",

"rel": "retrieveEventMessages",

"method": "GET"

}

{{codeEnd}}

 

Sending a request to retrieve event messages

HTTP 1.1 GET https://api.<region>.whispir.com/messages?label=657126%20Outage%20of%20systems%20in%20Sydney?apikey=<your_api_key>
Authorization: Basic asdf98nf89asdvasd2r398h8sdf
x-api-key: your_api_key

 

Response

{{codeStart}}

Accept: application/vnd.whispir.message-v1+json

HTTP 1.1 200 OK

{

"messages" : [{

"subject" : "Event Notification",

"repetitionCount" : 0,

"repeatDays" : 0,

"repeatHrs" : 0,

"repeatMin" : 0,

"from" : "John Wick",

"direction" : "OUTGOING",

"responseCount" : "0",

"createdTime" : 1554963465000,

"link" : [ {

"uri" : "http://api.<region>.whispir.com/messages/47707420BAE1288B?apikey=DFD0FD90u809SDF90832FDS ",

"rel" : "self",

"method" : "GET"

} ]

} ],

"status" : "",

"link" : [ ]

}

{{codeEnd}}