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

ParameterRequirementDefaultDescription
versionMandatoryNoneSee send alert API
apiKeyMandatoryNoneSee send alert API
cancelMandatoryArray of alerts to be cancelled
    alertIdOptionalNoneLive alertId usually returned by /sendalert or a similar mechanism.
    scheduledAlertIdOptionalNoneCurrently scheduled but not running schedule id usually returned by /sendalert or a similar mechanism.
    triggeredOptionalNoneSpecifies the stored alert associated with some trigger points.
storeIdOptionalNoneStore internal unique id as given by /sendalert or similar mechanism.
storeNameOptionalNoneStore client given name as specified by the client during a /sendalert or similar mechanism.
    linkedOptionalNoneSpecifies the linked alert to cancel
linkRefMandatory (if linked object specified)NoneClient generated link reference used when linked alert was created, usually as part of a /sendalert or a similar mechanism.
lifetimeOptional0mLifetime in the usual [Mwhms] format. The link reference will remain cancelled for this duration. If not set (or set to 0) the link reference will be permanently cancelled. This means you cannot re-use the link reference in future linked alerts as they will be automatically cancelled.