Using the REST API to list the alarms the number of returned alarms does not match the OneClick Alarm count.
Release : 20.2
Component :
Article Id: 190598 describes a possible reason, however another possible reason is that there are some devices in maintenance.
When a device is placed in maintenance a maintenance alarm is generated on the device and the existing alarms become secondary alarms and are hidden by default in oneclick but they still exist.
To display them in OneClick you should set the following option to Yes (No is the default).
Now, the restful API call will display all alarms which will result in a different alarms count.
If using the REST API you are not interested on the alarms of devices in maintenance, you can add this filter in your REST API alarm filter body (this to filter the alarms of all models that are NOT in maintenance)
<filtered-models>
<equals>
<attribute id="0x1295d">
<value>1</value>
</attribute>
</equals>
to have something like this:
<?xml version="1.0" encoding="UTF-8"?>
<rs:alarm-request throttlesize="5000"
xmlns:rs="http://www.ca.com/spectrum/restful/schema/request"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ca.com/spectrum/restful/schema/request ../../../xsd/Request.xsd ">
<rs:attribute-filter>
<search-criteria xmlns="http://www.ca.com/spectrum/restful/schema/filter">
<filtered-models>
<equals>
<attribute id="0x1295d">
<value>1</value>
</attribute>
</equals>
</filtered-models>
</search-criteria>
</rs:attribute-filter>
<rs:requested-attribute id="0x11f9c" />
<rs:requested-attribute id="0x11f56"/>
<rs:requested-attribute id="0x11f4e"/>
<rs:requested-attribute id="0x1006e" />
<rs:requested-attribute id="0x12b4c"/>
<rs:requested-attribute id="0x12d7f" />
<rs:requested-attribute id="0x129e7"/>
<rs:requested-attribute id="0x12022" />
<rs:requested-attribute id="0x10000" />
<rs:requested-attribute id="0x12adb" />
</rs:alarm-request>