User Tools

Site Tools


development:applications:snmpmanager:alarm_api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

development:applications:snmpmanager:alarm_api [2017/02/20 16:18] – created cokeeffedevelopment:applications:snmpmanager:alarm_api [2021/06/25 10:09] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +=====Alarm API=====
  
 +The SNMP Manager exposes a JSON API that currently fulfils one job: It accepts a POST request that specifies a ticket ID and then clears any open alarms that are related to that ticket through the RemoteTicket domain. The API will respond with one of the four response codes
 +
 +  * 204 - If the SNMP Manager successfully cleared one or more alarms as a result of the request
 +  * 404 - If no open alarms were found for the given Ticket ID
 +  * 500 - If an exception was thrown while trying to resolve the request
 +  * 400 - If no ticketId was supplied in the request
 +
 +The address to send the request to is [SNMP Manager address]/api/1/alarm/close
 +
 +The Ticketer has code in the TicketService to call this API to clear alarms associated with a given ticket. This is called either whenever a ticket is closed if its workflow is configured with clearAlarmOnClose set to true (currently this is not used by any customer) or called directly from a state entrance rule for certain close states.
 +
 +For this feature to function the Ticketer must have a valid SnmpManagerConfig in the database specifying a URL and a login and password to use. This username and password must of course exist in the SNMP Manager itself and have permission to access the alarm API's address.
 +
 +For example on Crown this uses a specific user created for this purpose called 'alarmapiuser' which has a single role called 'ALARM_API' which has only permissions that are required to use the API.