I have code that returns the alarm status with the following:

alarmDict = system.dataset.toPyDataSet(system.alarm.queryStatus().getDataset())
jsonString = system.util.jsonEncode(alarmDict)
return {‘response’: jsonString, “contentType”:"/json"}

Now, I want to relate these alarm events to the alarm_event_data table (so I can see what the eventValue was for that event). I see a number of ways. But

what way would you recommend to do this?

system.alarm.queryStatus returns a list of AlarmEvent objects matching the specified filter. For example, to return a list of active, unacknowledged alarms you could use:alarms = system.alarm.queryStatus(state=['ActiveUnacked'])You can then interrogate the AlarmEvent objects using something likefor alarm in alarms: print alarm.getDisplayPath()