Accessing Alarm Associated Data in scripting

Is it possible to access associated alarm data from alarm objects return by the system.alarm.queryStatus() function?

Finally found a solution and share that here in case it is useful to anyone else.
Basically the activeData object of each alarm in the list returned form system.alarm.queryStatus() has a bunch of properties within that include any associated(Custom) properties, by iterating though all the activeData properties and building a Python Dict, I could then test the Dict keys to see if my associated data was present, I guess there is better way but it works.

alarms = system.alarm.queryStatus( priority	= ['Low', 'Medium', 'High', 'Critical'],
                                   state	= ["ActiveUnacked", "ActiveAcked"]
				                         )
for alarm in alarms:	
	props={}
	for item in alarm.activeData:
		props[str(item.getProperty())]=item.getValue()
	if 'associatedDataName ' in props.keys():
		Process the property here
1 Like