--- title: "system.alarm.cancel" description: "Cancels any number of alarms, specified by their event ids." --- # system.alarm.cancel > Cancels any number of alarms, specified by their event ids. This function is used in **Python Scripting**. ## Description Cancels any number of alarms, specified by their event ids. The event id is generated for an alarm when it becomes active, and is used to identify a particular event from other events for the same source. The alarm will still be active, but will drop out of alarm pipelines. ## Client Permission Restrictions [Permission Type](projects\project-properties\project-properties.md#client---permissions): Alarm Management Client access to this scripting function is blocked to users that do not meet the role/zone requirements for the above permission type. This function is unaffected when run in the Gateway scope. ## Syntax `system.alarm.cancel(alarmIds)` ### Parameters Type | Parameter | Description ------- | ------- | ------- String[] | `alarmIds` | List of alarm event ids (uuids) to cancel. ### Returns Nothing ### Scope All ## Code Examples ```python title="Example #1" # This example shows the basic syntax for cancelling an alarm. system.alarm.cancel(['c27c06d8-698f-4814-af89-3c22944f58c5']) ``` ```python title="Example #2" # To cancel all currently active alarms: ids = [] results = system.alarm.queryStatus(state=["ActiveUnacked", "ActiveAcked"]) for result in results: id = result.getId() ids.append(str(id)) system.alarm.cancel(ids) ```