system.alarm.listPipelines
This function is used in Python Scripting.
Description​
Will return a list of the available Alarm Notification Pipelines in a project. The order of the returned list is not guaranteed.
Client Permission Restrictions​
This scripting function has no Client Permission restrictions.
Syntax​
system.alarm.listPipelines([projectName])
Parameters​
| Type | Parameter | Description |
|---|---|---|
| String | projectName | The project to check alarm pipelines for. If omitted, will look for a project named "alarm-pipelines". [optional] |
Returns​
List[String] - A list of pipeline names. The list will be empty if no pipelines exist. Unsaved name changes will not be reflected in the list.
Scope​
Gateway, Vision Client, Perspective Session
Code Examples​
Example #1
# This script will print a list of all alarm pipeline names in the current project.
project = system.util.getProjectName()
pipelines = system.alarm.listPipelines(project)
for pipeline in pipelines:
print pipeline
Example #2
# This script will retrieve all pipelines across all projects
projects = system.project.getProjectNames()
for p in projects:
print "Project %s has the following alarm pipelines:" % p
pipelines = system.alarm.listPipelines(p)
for i in pipelines:
print "- %s" % i