User Tools
development:applications:alarmcache:restapi
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| development:applications:alarmcache:restapi [2017/07/20 10:26] – [/api/v1/alarms] 1carew1 | development:applications:alarmcache:restapi [2021/06/25 10:09] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Alarm Cache REST API ====== | ||
| + | --- // | ||
| + | |||
| + | The V1 REST API of Alarm Cache has 2 Urls, 1 for obtaining your JSON Web Token and 1 for obtaining alarms | ||
| + | |||
| + | ===== /api/login ===== | ||
| + | |||
| + | This is the URL for obtaining the authorisation web token and it only accepts a POST | ||
| + | |||
| + | Sample POST Body : | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Sample Response Body : | ||
| + | |||
| + | < | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ], | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== / | ||
| + | This URL also only accepts POST. The POST message it expect is the JSON of an AlarmFile Object. | ||
| + | This is used for Searching Alarms in the Alarm Cache DB. | ||
| + | |||
| + | |||
| + | Remember this URL is secured for Api Users and Admins so you need to include an Authorization header in your POST to this URL. The value of this header should be " | ||
| + | |||
| + | The AlarmFilter Java Object Looks Like : | ||
| + | < | ||
| + | List< | ||
| + | List< | ||
| + | List< | ||
| + | List< | ||
| + | List< | ||
| + | </ | ||
| + | |||
| + | So the body of the POST should look something like : | ||
| + | |||
| + | < | ||
| + | { | ||
| + | carriers : [2, | ||
| + | networkElements : [172836], | ||
| + | sections : [], | ||
| + | clusters : [], | ||
| + | networkGroup : [] | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Note that each element is an Array of Longs. If the array is empty you can just leave it out so if you are only looking for alarms within sections you can POST : | ||
| + | < | ||
| + | { | ||
| + | sections : [1,34,53] | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Each list within the filter is inclusive so if filter has network element and sections ids it will return all alarms within the intersection of network element and sections so if an alarm is return from that section but that alarm is not on a network element you also included, then the alarm will not be returned in the result set. This is true for all combinations of the filter. | ||
| + | |||
| + | Sample Response JSON : | ||
| + | |||
| + | < | ||
| + | [ {" | ||