DX NetOps

 View Only
  • 1.  How do you access a specific Spectrum Alarm using the RESTful API?

    Posted Oct 29, 2018 03:07 PM

    Hi, would anyone have a RESTful API example of accessing additional attributes of a given Alarm?

    If I have the Alarm ID, I would like to obtain additional attributes for it using the Spectrum API, but that means specifying the ID as part of the GET.

    Using SOAPUI, I can do something like this:

    http://<Spectrum server:<port>/spectrum/restful/alarms?attr=0x11f56

    This returns the alarm severity (1-4, in my case), for EVERY alarm.

    I liked to ask for the severity attribute (and maybe others) for only a specific alarm.

    What would be the valid syntax to specify the alarm id on the HTTP GET (RESTful call)?

     

    Thanks in advance for any guidance you can provide.  I wasn't able to find specifying the ID on other posts that I searched.



  • 2.  Re: How do you access a specific Spectrum Alarm using the RESTful API?

    Broadcom Employee
    Posted Oct 30, 2018 09:30 AM

    How about querying multiples alarm's attributes?

     

    RESTful query for alarm's attribute:

     

    http://<OneClick_hosname>:<port>/spectrum/restful/alarms?attr=0x12022

     

    Examples of RESTful queries:
    http://<OneClick_hosname>:<port>/spectrum/restful/alarms?attr=0x12022
    http://<OneClick_hosname>:<port>/spectrum/restful/alarms?attr=0x12022&attr=0x11f4d
    http://<OneClick_hosname>:<port>/spectrum/restful/alarms?attr=0x12022&attr=0x11f4d&attr=0x12b4c

     

    Alarms' attributes:

    0x12022 - Trouble Ticket ID
    0x11f4d - Acknowledged
    0x12b4c - Alarm Title
    0x11f4e - Creation Date
    0x11f50 - Cause Code
    0x11ee8 - Model Class
    0x11f56 - Severity
    0x11f57 - TroubleShooter
    0x23000e - Device Type
    0x1006e - Model Name
    0x129fa - Model Handle

     

    Customizing the OneClick Console Menu - CA Spectrum - 10.3 - CA Technologies Documentation 

    You can use the constants defined in the following table for alarm attributes:

    ConstantAlarm Attribute
    AlarmAttrID.ACKNOWLEDGEDAcknowledged (ID 0x11f4d)
    AlarmAttrID.ALARM_FILTER_MHAlarm Filter (ID 0x12a56)
    AlarmAttrID.ALARM_IDFull Alarm ID (ID 0x11f9c)
    AlarmAttrID.INT_ALARM_IDInteger Alarm ID (ID 0x4820067)
    AlarmAttrID.ALARM_SOURCEAlarm Source (ID 0x11fc4)
    AlarmAttrID.ALARM_STATUSAlarm Status (ID 0x11f4f)
    AlarmAttrID.CAUSE_CODECause Code (ID 0x11f50)
    AlarmAttrID.CAUSE_LISTCause List (ID 0x12a05)
    AlarmAttrID.CAUSE_TITLECause Title (ID 0x4820020)
    AlarmAttrID.CREATION_DATECreation Date (ID 0x11f4e)
    AlarmAttrID.CLEARED_BY_USER_NAMECleared By User Name (ID 0x11f51)
    AlarmAttrID.IMPACT_SEVERITYImpact Severity (ID 0x1290d)
    AlarmAttrID.OCCURRENCESOccurrences (ID 0x11fc5)
    AlarmAttrID.ORIGINATING_EVENTOriginating Event (ID 0x1296e)
    AlarmAttrID.PERSISTENTPersistent (ID 0x12942)
    AlarmAttrID.PRIMARY_ALARMPrimary Alarm (ID 0x11f54
    AlarmAttrID.SEVERITYSeverity (ID 0x11f56)
    AlarmAttrID.TROUBLESHOOTERTroubleshooter (ID 0x11f57)
    AlarmAttrID.TROUBLE_TICKET_IDTrouble Ticket ID (ID 0x12022)
    AlarmAttrID.USER_CLEARABLEUser Clearable (ID 0x11f9b)

    I hope that helps.

    Thanks,

    Silvio



  • 3.  Re: How do you access a specific Spectrum Alarm using the RESTful API?

    Posted Oct 30, 2018 09:36 AM

    Thanks Silvio, but how do I get the multiple attributes for ONE specific alarm?  It's a syntax thing of how to specify the Alarm ID on the GET?



  • 4.  Re: How do you access a specific Spectrum Alarm using the RESTful API?
    Best Answer

    Broadcom Employee
    Posted Oct 30, 2018 10:41 AM

    Hi Jim,

     

    Please take a look at this older post as I believe it has the answers you are looking for.

     

    Alarm Details via REST 

     

    Best regards,

    Glenn