CA Spectrum - Rest API - getting old alarms during poll
search cancel

CA Spectrum - Rest API - getting old alarms during poll


Article ID: 76431


Updated On:


CA Spectrum


In CA Spectrum how to get only new alarms using REST API?


Spectrum version 10.x.x.


1. Get the Subscription ID with filter and attribute list as part of subscription request, 

URL: http://<hostname><:portnumber>/spectrum/restful/subscription 

2. Make sure filter attribute also added including filter as below as part of request 

<rs:requested-attribute id="0x12a07" /> <!-- Cause Count --> 

3. Same Subscription should be added for future/next calls 

4. Attached tested xml file PullAlarmsSubscription.xml to case for reference 


<search-criteria xmlns=""> 
<attribute id="0x12a07"> 

<rs:requested-attribute id="0x1006e" /> <!-- Model Name --> 
<rs:requested-attribute id="0x11f53" /> <!-- Model Handle --> 
<rs:requested-attribute id="0x11f56" /> <!-- Alarm Severity --> 
<rs:requested-attribute id="0x11f4e" /> <!-- Alarm Creation Date --> 
<rs:requested-attribute id="0x12b4c" /> <!-- Alarm Title --> 
<rs:requested-attribute id="0x1296e" /> <!-- Originating Event text --> 
<rs:requested-attribute id="0x12a07" /> <!-- Cause Count --> 

This is the Expected Output: 
<added-instance preexisting="false"> 
<alarm id="5abfb429-f73c-1003-013e-0050568c7c38"> 
<attribute id="0x10000">Rtr_Cisco</attribute> 
<attribute id="0x12a07">0</attribute> 
<attribute id="0x11f56">3</attribute> 
<attribute id="0x12b4c">CHASSIS DOWN</attribute> 
<attribute id="0x11f9c">5abfb429-f73c-1003-013e-0050568c7c38</attribute> 
<attribute id="0x12a1f"></attribute> 
<attribute id="0x12d7f">xx.xx.xx.xx</attribute> 
<attribute id="0x1006e">name</attribute> 
<attribute id="0x11f4e">1522512937</attribute> 
<attribute id="0x1296e">The chassis name and all of its contained blades have stopped responding to polls and/or external requests. Additionally, all devices upstream from them can be contacted implying a chassis fault. A 'Chassis Down' alarm will be generated.</attribute> 

Verify cause code attribute value, it should be zero ("0") as below, otherwise filter is not working. 
<attribute id="0x12a07">0</attribute> 

Please confirm, this can be easily tested from Browser (Postman - REST client) 

Please Note: Same Subscription ID should be used for all future/next REST GET calls as below 


pull-interval value in the request can be updated based on your requirement, this is basically "Subscription ID" expiration time in milliseconds. 

 Note: Same Subscription ID should be used for all future/next REST GET calls as below


Additional Information

Please reference the "subscription" section of the documentation for more information.