I am looking to create an API in the webdev module that lets you do the following:
API endpoint where 3rd parties can request the alarm journal between a from - To date.
Webdev module does a POST to a microservice when an alarm is active/unactive/acked
If there is an active alarm, and the someone wants to acknowledge their alarm, they can do so with doing a POST to the API endpoint with a message “ACK alarm 123455”, to acknowledge the alarm remotely.
I know this isnt the best design for alarm handling, however it is the solution already chosen. Of course I’m not removing the normal alarmhandling the users use, and they will get a notification if the API Ack’d an alarm.
Does anyone know of existing solutions that does in part let you do some of what I’ve mentioned above? Always nice to know before starting from scratch!
I’ve looked into the Alarm pipeline as well, and am considering using it.
The first requirement you have should be pretty - seems like it should be something like
startDate = # startDate from get request
endDate = # endDate from get request
results = system.alarm.queryJournal(journalName="someJournal", startDate=startDate, endDate=endDate)
# parse results variable into suitable returnValue - depends on how you want to send it back