Skip to main content
Version: 8.1

system.alarm.cancel

This function is used in Python Scripting.

Description​

Cancels any number of alarm pipelines, specified by their event ids. Event ids can be obtains from the system.alarm.queryStatus function. Canceling a pipeline will not impact the alarm that triggered the pipeline. The alarm will still be active, but will drop out of alarm pipelines.

Client Permission Restrictions​

Permission Type: 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​

TypeParameterDescription
List[String]alarmIdsList of alarm pipeline event ids (UUIDs) to cancel.

Returns​

Nothing

Scope​

Gateway, Vision Client, Perspective Session

Code Examples​

Example #1
# This example shows the basic syntax for cancelling an alarm.

system.alarm.cancel(['c27c06d8-698f-4814-af89-3c22944f58c5'])
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)