How to make a REST call to pull all MAL alarms from OneClick
search cancel

How to make a REST call to pull all MAL alarms from OneClick

book

Article ID: 400499

calendar_today

Updated On:

Products

Network Observability Spectrum

Issue/Introduction

You want to make a REST call to pull all MAL alarms from OneClick for all landscapes and include attributes of interest of interest.

Resolution

POST call to 
https:/<OneClick host>:<OC port>/spectrum/restful/alarms
 
 
<rs:alarm-request throttlesize="10"
  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 ">
 
   <!-- Alarms of Interest -->
   <rs:attribute-filter>
    <search-criteria xmlns="http://www.ca.com/spectrum/restful/schema/filter">
    <filtered-models>
      <equals>
        <attribute id="0x12b4c">
          <value>MANAGEMENT AGENT LOST</value>
        </attribute>
      </equals>
     </filtered-models>
    </search-criteria>
   </rs:attribute-filter>
  <!-- Alarms of Interest -->
 
 
  <!-- Attributes of Interest -->
<rs:requested-attribute id="0x1006e" /><!-- Model name -->
    <rs:requested-attribute id="0x129fa" /><!-- Model handle -->
    <rs:requested-attribute id="0x10000" /><!-- Model Type name -->
    <rs:requested-attribute id="0x12bfb" /><!--USER ASSET TAG attribute -->
 </rs:alarm-request>
<!-- Attributes of Interest -->

Additional Information

The attribute values of interest can be changed to suit your needs.   Attribute ids can be found here.