Cancel an alert
https://api.alert.alertinghub.co.uk/api/json/cancelalerts
For a number of reasons it may be desirable to cancel an alert. This API allows you to specify a number of alerts for cancellation to make life easier. You can cancel (or attempt to cancel) the following types of alert:
- Live active ongoing alert – the API attempts to stop the ongoing live alert but please note: this will only ever be partially successful; any messages or calls already being serviced or that have already been sent cannot be cancelled or recalled.
- Scheduled alert – the API will remove the scheduled entry to prevent the alert from being activated; any stored alert still remains so can be re-used again.
- Triggered alert – the API will remove the triggers that were setup to activate the alert; any stored alert still remains so can be re-used again.
- Linked alert – the API will remove any active linked alerts and will register the linked alert reference as cancelled so that should a related linked alert be activated later (for instance on a schedule) it will not be processed; any stored alert still remains so can be re-used again.
Json sample
{ "version": "latest", "apiKey": "abcdefghijklmnopqrstuvwxyz", "cancel": [ { "alertId": "f1a79b4c-15a2-4d9b-91ec-858afa63c8c5" }, { "scheduledAlertId": "e1a79b4c-15a2-4d9b-91ec-858afa63c8c5" } ] }
Cancelling alerts
Parameter | Requirement | Default | Description | |
---|---|---|---|---|
version | Mandatory | None | See send alert API | |
apiKey | Mandatory | None | See send alert API | |
cancel | Mandatory | Array of alerts to be cancelled | ||
alertId | Optional | None | Live alertId usually returned by /sendalert or a similar mechanism. | |
scheduledAlertId | Optional | None | Currently scheduled but not running schedule id usually returned by /sendalert or a similar mechanism. | |
triggered | Optional | None | Specifies the stored alert associated with some trigger points. | |
storeId | Optional | None | Store internal unique id as given by /sendalert or similar mechanism. | |
storeName | Optional | None | Store client given name as specified by the client during a /sendalert or similar mechanism. | |
linked | Optional | None | Specifies the linked alert to cancel | |
linkRef | Mandatory (if linked object specified) | None | Client generated link reference used when linked alert was created, usually as part of a /sendalert or a similar mechanism. | |
lifetime | Optional | 0m | Lifetime in the usual |