Clear Spectrum alarm via REST api
search cancel

Clear Spectrum alarm via REST api

book

Article ID: 259403

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

 
What the is REST API to clear an alarm?

Environment

Release : 21.2

Resolution

 There is no single rest command to clear every alarm. The clear will change with each alarm depending on how the event that creates the alarm is programmed.

This is the create event command.  You will need to create “clear” event for specifically the alarm in question. 

http://<hostname><:portnumber>/spectrum/restful/events/<eventType>/model/<model_handle>

To clear an alarm, it needs a specific clear event and you would send that event to the device to clear the alarm.  Let's take an example 0x00210029 
 
https://api-broadcom-ca.wolkenservicedesk.com/attachment/get_attachment_content?uniqueFileId=K3ShrrFitCK63p06jTcENw==
 
we can see this event has no severity so does not generate an alarm.  It only clears the 0x00210024 alarms. 

Cisco_Router/EventDisp:0x00210028 E 50 A 1,0x00210024

Cisco_Router/EventDisp:0x00210029      C 0x00210024

 I create the 0x00210028 event on model 0x94063a3b as follows:

http://<hostname><:portnumber>/spectrum/restful/events/0x00210028/model/0x94063a3b

that event creates the 0x00210024 alarm as per SPECROOT/SS/CsVendr/Cisco_Router/EventDisp:

0x00210028 E 50 A 1,0x00210024

 

 I then create the 0x00210029 event on the same model 0x94063a3b as follows:

http://<hostname><:portnumber>/spectrum/restful/events/0x00210029/model/0x94063a3b

 

that clears the 0x00210024 alarm as per the eventDisp

0x00210029      C 0x00210024

 

And puts it in the clear alarms history

 

Additional Information

https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/spectrum/22-2/programming/web-services-api-reference/how-to-use-the-ca-spectrum-web-services-api/restful-resources-nouns/events.html#concept.dita_82d50d9042decb175894924272dd3b5a14cd3716_POSTevent