Collect events
https://api.alert.alertinghub.co.uk/api/json/collectevents
For all notification systems it is critical that, from the point a message is sent out, you can monitor the delivery status of each message to every designated recipient. With Alerting Hub this data can be gleaned in two ways – collection or callback driven.
If your API key is setup for collection (also know as polled) or you have specified a particular alert to use the “poll” method of notification then this API will return pending results or events to you.
{ "version": "latest", "apiKey": "abcdefghijklmnopqrstuvwxyz", "alertId": "all", "options": { "maximumItemsToReturn": 50 } }
Collecting events
Parameter | Requirement | Default | Description | |
---|---|---|---|---|
version | Mandatory | None | See send alert API | |
apiKey | Mandatory | None | See send alert API | |
alertId | Mandatory | None | AlertId previously returned by /sendalert or /sendstoredalert OR you can specify 'all' to return all events on all suitable alerts. | |
options | ||||
maximumItemsToReturn | Optional | 1 | Maximum number of events/items to return | |
returnNumRemaining | Optional | False | If true will return (in numEventsRemaining) the number of remaining events for collection. |
Response
Parameter | Description | |
---|---|---|
success | One of “true”, “false”. If false then failureReason should also be returned | |
events | Array of events same format as callback return | |
clientRef | From the original alert | |
alertId | From the original alert | |
type | One of "call","sms", "email","inboundCall","recipientList" or "alert". The type of event reported on. | |
event | Actual event, details not included here | |
alertees | List of alertees | |
reply | Additional reply info if pertinent | |
replyEncoding | One of "base64" or "utf8". This is the encoding of the reply |