4 years ago
GET Alerts API
Are there any alert attributes (in the get alerts API) present that can help in fetching both the new and modified alerts (alerts with change in severity, alerts that got cleared etc). within a ti...
Most API endpoints, including the alerts list, have a filter capability where you can filter on the properties of the objects. Some properties you could use would be acked_epoch, start_epoch, and maybe end_epoch. I don't see any property that gives a timestamp of when the alert severity changed. It's too early in the morning and I can't remember if alerts change severity or if it's actually a new record in the alerts list (with its own corresponding epoch timestamps). I'll have to test it.
You'd use these as filters like this:
/alert/alerts?filter=startEpoch>:1617213624&filter=endEpoch<:1617213800
But you'd replace the numbers with the timerange filters you want. The ">:" and "<:" are "greater than or equal to" and "less than or equal to" respectively.