Issue with Spectrum REST POST Alarms query
search cancel

Issue with Spectrum REST POST Alarms query

book

Article ID: 204157

calendar_today

Updated On:

Products

CA Spectrum CA eHealth

Issue/Introduction

POST alarms function of the Spectrum Web Service (REST) API does not return alarms as expected. This appears to be happening since the upgrade to 20.2/20.2.3 (10.4.2/10.4.2.1).

The restclient POST alarm call is defined with the following application/xml body:

<?xml version="1.0" encoding="UTF-8"?>
<rs:alarm-request xsi:schemaLocation="http://www.ca.com/spectrum/restful/schema/request ../../../xsd/Request.xsd " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rs="http://www.ca.com/spectrum/restful/schema/request" throttlesize="10">
<!-- This xml can be posted to the Alarms URL to obtain all alarmson the specified models -->
<!-- Attributes of Interest -->
<rs:requested-attribute id="0x11f53"/>
<rs:requested-attribute id="0x10000"/>
<rs:requested-attribute id="0x11f56"/>
<rs:requested-attribute id="0x12b4c"/>
<rs:requested-attribute id="0x11f4d"/>
<!-- Models of Interest -->
<rs:target-models>
<rs:model mh="0x1001446"/>
</rs:target-models>
</rs:alarm-request>

For any model handle of devices (that have alarms) the call will return 0 alarms.

 

Environment

Release : 20.2

Component : Spectrum Core / SpectroSERVER

Cause

Due to some performance issue, support engineer made some improvements in this area in 10.4.2.x version and now it is required to add the key attribute Model Handle.

Resolution

Add in the application/xml body also the Model Handle attribute id.

<rs:requested-attribute id="0x129fa"/>

so the body will look like:

<?xml version="1.0" encoding="UTF-8"?>
<rs:alarm-request xsi:schemaLocation="http://www.ca.com/spectrum/restful/schema/request ../../../xsd/Request.xsd " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rs="http://www.ca.com/spectrum/restful/schema/request" throttlesize="10">
<!-- This xml can be posted to the Alarms URL to obtain all alarmson the specified models -->
<!-- Attributes of Interest -->
<rs:requested-attribute id="0x11f53"/>
<rs:requested-attribute id="0x10000"/>
<rs:requested-attribute id="0x11f56"/>
<rs:requested-attribute id="0x12b4c"/>
<rs:requested-attribute id="0x11f4d"/> 

<rs:requested-attribute id="0x129fa"/>

<!-- Models of Interest -->
<rs:target-models>
<rs:model mh="0x1001446"/>
</rs:target-models>
</rs:alarm-request>