Using Alarm Resources

Contents
casp101
Contents
Use the Alarms resource to read, modify, and delete
CA Spectrum
alarms. Asynchronous responses are supported.
  • Base URL
    http://<hostname><:portnumber>/spectrum/restful/alarms
POST alarms (GET Tunneling)
Use POST alarms (GET Tunneling) to get all alarm IDs. POSTing an alarms request allows you to provide an XML document that specifies the alarms to be retrieved. The document can specify specific alarms by ID or by a model specification. A model specification can be a list of model handles, XML search criteria or a reference to existing search criteria on the OneClick server. It is also possible to GET alarms that satisfy a specific alarm attribute filter. An attribute filter is a subset of the search criteria.
This POST is a form of GET Tunneling. You cannot create an alarm with POST alarms.
CA Spectrum
alarms are created in response to events, as defined by the Event Disposition files.
  • URL
    http://<hostname><:portnumber>/spectrum/restful/alarms[?symptoms=no][?symptoms=yes]
  • HTTP Method
    POST
  • Body
    Examples are provided in <
    $SPECROOT
    >/RestfulExamples/xml/Alarms. These XML files provide examples of properly formed XML for different purposes. Use these examples as a basis for your own XML:
    • GetAlarmsByModelHandles.xml
    • GetAlarmsBySearchCriteria.xml
    • GetAlarmsForAllDevices.xml
    • GetAlarmsByAlarmIDs.xml
    • GetAlarmsByAttributeFilter.xml
      The following example is a simple xml criteria to retrieve alarm ids and their associated details like Model Type, Model Type of Alarmed Model, Security String, Condition, Model Name, Model Class:
      <?xml version="1.0" encoding="UTF-8"?>
      <rs:alarm-request throttlesize="0"
      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:requested-attribute id="0x10000"/> <!--Model Type Name-->
      <rs:requested-attribute id="0x10001"/> <!--Model Type of Alarmed Model-->
      <rs:requested-attribute id="0x10009"/> <!--Security String-->
      <rs:requested-attribute id="0x1000a"/> <!--Condition-->
      <rs:requested-attribute id="0x1006e"/> <!--Model Name-->
      <rs:requested-attribute id="0x11ee8"/> <!--Model Class–>
      <rs:landscape id="0x100000"/>
      </rs:alarm-request>
       
      <!--If you include landscape attribute(s) in the xml criteria, alarms of all the landscapes that are included are retrieved.-->
  • Body Content
    application/xml
  • Header
    application/xml, application/json
  • Output
    XML or JSON listing all alarms in the
    SpectroSERVER
    or distributed
    SpectroSERVER
    Example
    The following is an example call:
Java GenericPoster noun=Alarms file=resources/xml/Alarms/GetAlarmsBySearch.xml server=localhost username=jdoe password=spectrum port=8080
 
URL Parameters
  • <?symptoms=no>
    Use this parameter to retrieve all the alarm ids excluding the symptom alarm ids.
    Based on the example xml body, the following output is returned for "http://<hostname><:portnumber>/spectrum/restful/alarms?symptoms=no":
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <alarm-response-list error="EndOfResults" throttle="18" total-alarms="18">
    <alarm-responses>
    <alarm id="55d30306-7d7b-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">WA_Link</attribute>
    <attribute id="0x10001">0x102e2</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">3</attribute>
    <attribute id="0x1006e">10.10.10.0</attribute>
    <attribute id="0x11ee8">7</attribute>
    </alarm>
    <alarm id="55d2d38b-47a6-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">JuniperJUNOSRtr</attribute>
    <attribute id="0x10001">0x3b10002</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">jun2300-96.4</attribute>
    <attribute id="0x11ee8">3</attribute>
    </alarm>
    <alarm id="55d40fa8-108f-1000-0228-6c8814e75b4c">
    <attribute id="0x10000">LancomLCOS</attribute>
    <attribute id="0x10001">0x5930001</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">Lancom1751test</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d2fe98-6c6d-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Rtr_Cisco</attribute>
    <attribute id="0x10001">0x21000c</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">3</attribute>
    <attribute id="0x1006e">cis2524-96.45.ca.com</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d301da-6dc0-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Rtr_Cisco</attribute>
    <attribute id="0x10001">0x21000c</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">3</attribute>
    <attribute id="0x1006e">cis7204-96.5.ca.com</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d40f0b-057d-1000-0228-6c8814e75b4c">
    <attribute id="0x10000">ConfigurationManager</attribute>
    <attribute id="0x10001">0x820005</attribute>
    <attribute id="0x10009">ADMIN</attribute>
    <attribute id="0x1000a">3</attribute>
    <attribute id="0x1006e">Configuration Manager</attribute>
    <attribute id="0x11ee8">17</attribute>
    </alarm>
    <alarm id="55d2d399-47af-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Host_Device</attribute>
    <attribute id="0x10001">0x1160089</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">mcastsrc2.ca.com</attribute>
    <attribute id="0x11ee8">9</attribute>
    </alarm>
    <alarm id="55d2ee8f-52b5-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">WA_Link</attribute>
    <attribute id="0x10001">0x102e2</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">3</attribute>
    <attribute id="0x1006e">10.253.248.0</attribute>
    <attribute id="0x11ee8">7</attribute>
    </alarm>
    <alarm id="55d40efb-0018-1000-0228-6c8814e75b4c">
    <attribute id="0x10000">IPRoutingManager</attribute>
    <attribute id="0x10001">0x5640000</attribute>
    <attribute id="0x10009">ADMIN</attribute>
    <attribute id="0x1000a">3</attribute>
    <attribute id="0x1006e">IP Routing Manager</attribute>
    <attribute id="0x11ee8">118</attribute>
    </alarm>
    <alarm id="55d2d399-47ac-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Host_Device</attribute>
    <attribute id="0x10001">0x1160089</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">mcastsrc4.ca.com</attribute>
    <attribute id="0x11ee8">9</attribute>
    </alarm>
    <alarm id="55d2d39b-47b2-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Host_Device</attribute>
    <attribute id="0x10001">0x1160089</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">mcastsrc6.ca.com</attribute>
    <attribute id="0x11ee8">9</attribute>
    </alarm>
    <alarm id="55d2d39c-47b5-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Host_Device</attribute>
    <attribute id="0x10001">0x1160089</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">mcastsrc1.ca.com</attribute>
    <attribute id="0x11ee8">9</attribute>
    </alarm>
    <alarm id="55d2fd88-6b4f-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">WA_Link</attribute>
    <attribute id="0x10001">0x102e2</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">3</attribute>
    <attribute id="0x1006e">192.168.100.8</attribute>
    <attribute id="0x11ee8">7</attribute>
    </alarm>
    <alarm id="55d2d28b-46c7-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">HubCat5000</attribute>
    <attribute id="0x10001">0x11c0009</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">name</attribute>
    <attribute id="0x11ee8">2</attribute>
    </alarm>
    <alarm id="55d2fd41-6b0f-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Rtr_Cisco</attribute>
    <attribute id="0x10001">0x21000c</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">cisco2511-96.16.ca.com</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d33aed-8f1b-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Rtr_Cisco</attribute>
    <attribute id="0x10001">0x21000c</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">cis7606-96.36.36.ca.com</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d2d713-489d-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Rtr_Cisco</attribute>
    <attribute id="0x10001">0x21000c</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">cis2524-blue-96.28.ca.com</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d2f5e0-685c-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">GnSNMPDev</attribute>
    <attribute id="0x10001">0x3d0002</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">1</attribute>
    <attribute id="0x1006e">quanta-1</attribute>
    <attribute id="0x11ee8">3</attribute>
    </alarm>
    </alarm-responses>
    </alarm-response-list>
  • <?symptoms=yes>
    Use this parameter to retrieve all the alarm ids including the symptom alarm ids.
    Based on the example xml body, the following output is returned for "http://<hostname><:portnumber>/spectrum/restful/alarms?symptoms=yes":
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <alarm-response-list error="EndOfResults" throttle="20" total-alarms="20">
    <alarm-responses>
    <alarm id="55d30306-7d7b-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">WA_Link</attribute>
    <attribute id="0x10001">0x102e2</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">3</attribute>
    <attribute id="0x1006e">10.10.10.0</attribute>
    <attribute id="0x11ee8">7</attribute>
    </alarm>
    <alarm id="55d2d38b-47a6-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">JuniperJUNOSRtr</attribute>
    <attribute id="0x10001">0x3b10002</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">jun2300-96.4</attribute>
    <attribute id="0x11ee8">3</attribute>
    </alarm>
    <alarm id="55d301da-6dc2-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Rtr_Cisco</attribute>
    <attribute id="0x10001">0x21000c</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">3</attribute>
    <attribute id="0x1006e">cis7204-96.5.ca.com</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d40fa8-108f-1000-0228-6c8814e75b4c">
    <attribute id="0x10000">LancomLCOS</attribute>
    <attribute id="0x10001">0x5930001</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">Lancom1751test</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d2fe98-6c6d-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Rtr_Cisco</attribute>
    <attribute id="0x10001">0x21000c</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">3</attribute>
    <attribute id="0x1006e">cis2524-96.45.ca.com</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d301da-6dc0-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Rtr_Cisco</attribute>
    <attribute id="0x10001">0x21000c</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">3</attribute>
    <attribute id="0x1006e">cis7204-96.5.ca.com</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d40f0b-057d-1000-0228-6c8814e75b4c">
    <attribute id="0x10000">ConfigurationManager</attribute>
    <attribute id="0x10001">0x820005</attribute>
    <attribute id="0x10009">ADMIN</attribute>
    <attribute id="0x1000a">3</attribute>
    <attribute id="0x1006e">Configuration Manager</attribute>
    <attribute id="0x11ee8">17</attribute>
    </alarm>
    <alarm id="55d2d399-47af-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Host_Device</attribute>
    <attribute id="0x10001">0x1160089</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">mcastsrc2.ca.com</attribute>
    <attribute id="0x11ee8">9</attribute>
    </alarm>
    <alarm id="55d2ee8f-52b5-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">WA_Link</attribute>
    <attribute id="0x10001">0x102e2</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">3</attribute>
    <attribute id="0x1006e">10.253.248.0</attribute>
    <attribute id="0x11ee8">7</attribute>
    </alarm>
    <alarm id="55d40efb-0018-1000-0228-6c8814e75b4c">
    <attribute id="0x10000">IPRoutingManager</attribute>
    <attribute id="0x10001">0x5640000</attribute>
    <attribute id="0x10009">ADMIN</attribute>
    <attribute id="0x1000a">3</attribute>
    <attribute id="0x1006e">IP Routing Manager</attribute>
    <attribute id="0x11ee8">118</attribute>
    </alarm>
    <alarm id="55d2d399-47ac-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Host_Device</attribute>
    <attribute id="0x10001">0x1160089</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">mcastsrc4.ca.com</attribute>
    <attribute id="0x11ee8">9</attribute>
    </alarm>
    <alarm id="55d2d39b-47b2-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Host_Device</attribute>
    <attribute id="0x10001">0x1160089</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">mcastsrc6.ca.com</attribute>
    <attribute id="0x11ee8">9</attribute>
    </alarm>
    <alarm id="55d2d39c-47b5-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Host_Device</attribute>
    <attribute id="0x10001">0x1160089</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">mcastsrc1.ca.com</attribute>
    <attribute id="0x11ee8">9</attribute>
    </alarm>
    <alarm id="55d2fd88-6b4f-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">WA_Link</attribute>
    <attribute id="0x10001">0x102e2</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">3</attribute>
    <attribute id="0x1006e">192.168.100.8</attribute>
    <attribute id="0x11ee8">7</attribute>
    </alarm>
    <alarm id="55d2d28b-46c7-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">HubCat5000</attribute>
    <attribute id="0x10001">0x11c0009</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">name</attribute>
    <attribute id="0x11ee8">2</attribute>
    </alarm>
    <alarm id="55d2fd41-6b0f-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Rtr_Cisco</attribute>
    <attribute id="0x10001">0x21000c</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">cisco2511-96.16.ca.com</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d301da-6db7-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Rtr_Cisco</attribute>
    <attribute id="0x10001">0x21000c</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">3</attribute>
    <attribute id="0x1006e">cis7204-96.5.ca.com</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d33aed-8f1b-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Rtr_Cisco</attribute>
    <attribute id="0x10001">0x21000c</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">cis7606-96.36.36.ca.com</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d2d713-489d-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Rtr_Cisco</attribute>
    <attribute id="0x10001">0x21000c</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">cis2524-blue-96.28.ca.com</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d2f5e0-685c-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">GnSNMPDev</attribute>
    <attribute id="0x10001">0x3d0002</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">1</attribute>
    <attribute id="0x1006e">quanta-1</attribute>
    <attribute id="0x11ee8">3</attribute>
    </alarm>
    </alarm-responses>
    </alarm-response-list>
GET alarms
GET alarms returns alarm IDs. You can retrieve specific alarm attributes by using the &attr=<
attr_id
> parameter.
  • URL
    http://<hostname><:portnumber>/spectrum/restful/alarms[?attr=<attr_ID>][&landscape=<landscape_handle>][&throttlesize=<num>][?lasthour=<num>]
  • HTTP Method
    GET
  • Body
    None
  • Body Content
    Not used
  • Header
    application/xml, application/json
  • Output
    XML or JSON listing alarms in the
    SpectroSERVER
    or distributed
    SpectroSERVER
    The following is an example taken from our environment for retrieving only alarm ids:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <alarm-response-list error="EndOfResults" throttle="20" total-alarms="20">
    <alarm-responses>
    <alarm id="55d30306-7d7b-1000-02a9-6c8814e75b4c" />
    <alarm id="55d2d38b-47a6-1000-02a9-6c8814e75b4c" />
    <alarm id="55d301da-6dc2-1000-02a9-6c8814e75b4c" />
    <alarm id="55d40fa8-108f-1000-0228-6c8814e75b4c" />
    <alarm id="55d2fe98-6c6d-1000-02a9-6c8814e75b4c" />
    <alarm id="55d301da-6dc0-1000-02a9-6c8814e75b4c" />
    <alarm id="55d40f0b-057d-1000-0228-6c8814e75b4c" />
    <alarm id="55d2d399-47af-1000-02a9-6c8814e75b4c" />
    <alarm id="55d2ee8f-52b5-1000-02a9-6c8814e75b4c" />
    <alarm id="55d40efb-0018-1000-0228-6c8814e75b4c" />
    <alarm id="55d2d399-47ac-1000-02a9-6c8814e75b4c" />
    <alarm id="55d2d39b-47b2-1000-02a9-6c8814e75b4c" />
    <alarm id="55d2d39c-47b5-1000-02a9-6c8814e75b4c" />
    <alarm id="55d2fd88-6b4f-1000-02a9-6c8814e75b4c" />
    <alarm id="55d2d28b-46c7-1000-02a9-6c8814e75b4c" />
    <alarm id="55d2fd41-6b0f-1000-02a9-6c8814e75b4c" />
    <alarm id="55d301da-6db7-1000-02a9-6c8814e75b4c" />
    <alarm id="55d33aed-8f1b-1000-02a9-6c8814e75b4c" />
    <alarm id="55d2d713-489d-1000-02a9-6c8814e75b4c" />
    <alarm id="55d2f5e0-685c-1000-02a9-6c8814e75b4c" />
    </alarm-responses>
    </alarm-response-list>
    This is an example based on our environment.
URL Parameters
  • &attr=<
    attr_ID
    >
    (Optional) Specifies the requested attributes. Multiple attribute parameters can be specified.
    There are many attributes on a model; for best performance you should limit attribute selection to attributes of interest.
  • &landscape=<
    landscape_handle
    >
    (Optional) Filters which landscapes are queried. Multiple landscape parameters can be specified.
  • &throttlesize=<
    num
    >
    (Optional) Specifies a throttle size.
  • ?lasthour=
    <num>
    (optional) Use this parameter to retrieve alarm ids generated in the last <
    num
    > of hours, where <
    num
    > of hours. For example, to retrieve the alarm ids generated in the last two hours, use the following url:
    http://<hostname><portnumber>/spectrum/restful/alarms?lasthour=2
    The following output is generated:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <alarm-response-list error="EndOfResults" throttle="6" total-alarms="6">
    <alarm-responses>
    <alarm id="55d30306-7d7b-1000-02a9-6c8814e75b4c" />
    <alarm id="55d2d38b-47a6-1000-02a9-6c8814e75b4c" />
    <alarm id="55d301da-6dc2-1000-02a9-6c8814e75b4c" />
    <alarm id="55d2fe98-6c6d-1000-02a9-6c8814e75b4c" />
    <alarm id="55d301da-6dc0-1000-02a9-6c8814e75b4c" />
    <alarm id="55d2d399-47af-1000-02a9-6c8814e75b4c" />
    </alarm-responses>
    </alarm-response-list>
    This is an example based on our environment.
GET alarm filters
Use GET alarm filters to retrieve the alarm filters defined in OneClick.
  • URL
     
    http://<hostname><:portnumber>/spectrum/restful/alarms/filters
  • HTTP Method
    GET
  • Body
    None
  • Body Content
    Not Used
  • Header
    application/xml, application/json
  • Output
    The following xml output containing the alarm filter names is returned:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <alarmfilters-response xmlns="http://www.ca.com/spectrum/restful/schema/response">
      <alarmfilter>LAN_alarms</alarmfilter>
      <alarmfilter>Chassis_Alarms</alarmfilter>
      <alarmfilter>core_router_alarms</alarmfilter>
      </alarmfilters-response>
     
    This is an example based on our environment.
POST alarm filters
Use POST alarm filters to retrieve the alarms for the selected alarm filter defined in OneClick.
  • URL
     
    http://<hostname><:portnumber>/spectrum/restful/alarms/filter[?name=filter_name]
  • HTTP Method
    POST
  • Body
    You can use an extensive xml criteria to retrieve the required alarm attributes. For example, use the following body:
    <?xml version="1.0" encoding="UTF-8"?>
    <rs:alarm-request throttlesize="0"
    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:requested-attribute id="0x10000"/> <!--Model Type Name-->
    <rs:requested-attribute id="0x10001"/> <!--Model Type of Alarmed Model-->
    <rs:requested-attribute id="0x10009"/> <!--Security String-->
    <rs:requested-attribute id="0x1000a"/> <!--Condition-->
    <rs:requested-attribute id="0x1006e"/> <!--Model Name-->
    <rs:requested-attribute id="0x11ee8"/> <!--Model Class-->
    </rs:alarm-request>
  • Body Content
    application/xml
  • Header
    application/xml, application/json
  • Output
    For example, in our environment we have defined an alarm filter called "major_alarms" to display only the major alarms. If there are 10 major alarms, the following xml output containing the alarms of the required filter name is returned for "http://<hostname><:port>/spectrum/restful/alarms/filter?name=major_alarms":
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <alarm-response-list error="EndOfResults" throttle="10" total-alarms="10">
    <alarm-responses>
    <alarm id="55d2d38b-47a6-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">JuniperJUNOSRtr</attribute>
    <attribute id="0x10001">0x3b10002</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">jun2300-96.4</attribute>
    <attribute id="0x11ee8">3</attribute>
    </alarm>
    <alarm id="55d40fa8-108f-1000-0228-6c8814e75b4c">
    <attribute id="0x10000">LancomLCOS</attribute>
    <attribute id="0x10001">0x5930001</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">Lancom1751test</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d2d399-47af-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Host_Device</attribute>
    <attribute id="0x10001">0x1160089</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">mcastsrc2.ca.com</attribute>
    <attribute id="0x11ee8">9</attribute>
    </alarm>
    <alarm id="55d2d399-47ac-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Host_Device</attribute>
    <attribute id="0x10001">0x1160089</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">mcastsrc4.ca.com</attribute>
    <attribute id="0x11ee8">9</attribute>
    </alarm>
    <alarm id="55d2d39b-47b2-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Host_Device</attribute>
    <attribute id="0x10001">0x1160089</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">mcastsrc6.ca.com</attribute>
    <attribute id="0x11ee8">9</attribute>
    </alarm>
    <alarm id="55d2d39c-47b5-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Host_Device</attribute>
    <attribute id="0x10001">0x1160089</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">mcastsrc1.ca.com</attribute>
    <attribute id="0x11ee8">9</attribute>
    </alarm>
    <alarm id="55d2d28b-46c7-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">HubCat5000</attribute>
    <attribute id="0x10001">0x11c0009</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">name</attribute>
    <attribute id="0x11ee8">2</attribute>
    </alarm>
    <alarm id="55d2fd41-6b0f-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Rtr_Cisco</attribute>
    <attribute id="0x10001">0x21000c</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">cisco2511-96.16.ca.com</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d33aed-8f1b-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Rtr_Cisco</attribute>
    <attribute id="0x10001">0x21000c</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">cis7606-96.36.36.ca.com</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    <alarm id="55d2d713-489d-1000-02a9-6c8814e75b4c">
    <attribute id="0x10000">Rtr_Cisco</attribute>
    <attribute id="0x10001">0x21000c</attribute>
    <attribute id="0x10009" />
    <attribute id="0x1000a">2</attribute>
    <attribute id="0x1006e">cis2524-blue-96.28.ca.com</attribute>
    <attribute id="0x11ee8">4</attribute>
    </alarm>
    </alarm-responses>
    </alarm-response-list>
GET alarm count
Use GET alarm filters to retrieve the alarm count for all severity from OneClick.
  • URL
     
    http://<hostname><portnumber>/spectrum/restful/alarms/count
  • HTTP Method
    GET
  • Body
    None
  • Body Content
    Not Used
  • Header
    application/xml, application/json
  • Output
    The following xml output containing the alarm count for all severity is returned:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <alarmcount-response>
    <critical>7</critical>
    <major>10</major>
    <minor>1</minor>
    </alarmcount-response>
    This is an example based on our environment.
PUT alarms
Use PUT alarms to update alarm attributes.
  • URL
    http://<hostname><:portnumber>/spectrum/restful/alarms/<alarm_id>?attr=<attr_ID>&val=<num>
  • HTTP Method
    PUT
  • Body
    None
  • Body Content
    Not Used
  • Header
    application/xml, application/json
  • Output
    XML or JSON listing indicating success or failure
URL Parameters
  • alarm_ID
    Specifies the alarm ID.
  • &attr=<
    attr_ID
    >&val=<
    num
    >
    Specifies the attributes and values. Multiple attribute-value pairs can be specified.
DELETE alarms
To delete an alarm using DELETE alarms, include the alarm ID without any other parameters.
  • URL
    http://<hostname><:portnumber>/spectrum/restful/alarms/<alarm_id>
  • HTTP Method
    DELETE
  • Body
    None
  • Body Content
    Not Used
  • Header
    application/xml, application/json
  • Output
    XML or JSON listing indicating success or failure
URL Parameters
  • alarm_ID
    Specifies the alarm to delete.