Batch Send Alerts API
https://api.alert.alertinghub.co.uk/api/json/batchsend
This API allows you to send multiple, different, alerts at the same time. In effect this API removes the need for you to call sendalert multiple times and is most often of use when specifying a set of linked alerts for scenarios such as escalation. Each alert specified in the sendalerts API call is treated as if you had called the sendalert API multiple times, as such you will receive a different alertId for each alert.
You should keep in mind that the sendalert API can itself call, send SMS and email many different groups of people with many different messages all within a single alert and, as such, will be the API call most often used in the majority of circumstances.
Json sample
{ "version": "latest", "apiKey": "abcdefghijklmnopqrstuvwxyz", "common" : { "clientRef": "abcd-efgh" }, "alerts": [ { //... as per /sendalert contents "tag": "1st alert, multiple SMS, emails & calls", "alert" : [ //... ] }, { //... as per /sendalert contents "tag": "2nd alert, more SMS, emails & calls", "alert" : [ //... ] } ] }
Sending multiple alerts
Parameter | Requirement | Default | Description | ||
---|---|---|---|---|---|
version | Mandatory | None | See send alert API | ||
apiKey | Mandatory | None | See send alert API | ||
common | Optional | None | Any keys, values or other objects within the common object will be copied over into each alert specified. Only items that do not exist in the alert will be copied in from common. | ||
alerts | Mandatory | None | Array of alerts to send, see /sendalert for more information. You do not need to specify the version and apiKey within each alert item. | ||
tag | Optional | None | As well as the normal content of an alert, see /sendalert, you can add an optional tag that can be used to tie up the response to the send alerts API call. |
Response
Parameter | Description | |
---|---|---|
success | One of “true”, “false”. If false then failureReason should also be returned | |
alerts | Each element corresponds to one of the alerts elements of the API call. Each element contains (other than any items shown in this table) the same information as for a normal /sendalert response. | |
tag | From the API request |