Service Operations Insight

 View Only
  • 1.  query SOI alarms with API

    Posted Mar 14, 2019 10:39 AM

    I've stumbled over a problem using the SOI API.

    Using my webbrowser I can do a simple call like:

     

    https://ip:7403/rest/alert?filter=NAGIOS&size=500

     

    This will return the last 500 alerts with NAGIOS inside the title, ordered by newest ones on the top.

     

    When I use wget to perform th same query like:

     

    wget --user USER --password PASSWORD --no-check-certificate -O soioutput.txt https://ip:7403/rest/alert?filter=NAGIOS&size=500

     

    It's returning a file with only 25 entries like:

     

    <?xml version="1.0" encoding="UTF-8"?>
    <feed xmlns="http://www.w3.org/2005/Atom">
    <title>Alerts</title>
    <link rel="next-page" type="application/atom+xml" href="https://ip:7403/rest/alert?filter=NAGIOS&size=25&start=25&desc=false" title="next-page" />
    <author>
    <name>CA SOI</name>
    </author>
    <id>https://ip:7403/rest/alert</id>

    ....25 entries...

     

    Any idea why wget is only returning 25 instead of the requested 500 entries as defined inside the query?



  • 2.  Re: query SOI alarms with API

    Broadcom Employee
    Posted Apr 01, 2019 03:28 AM

    Hello Janis, can you please open a support case so we can research this problem ?

     

    Kind regards,

    Britta Hoffner



  • 3.  Re: query SOI alarms with API

    Posted Apr 11, 2019 04:29 AM

    Problem solved by using a POST request instead of a GET request.

    Throttlesize parameter defined inside .xml file used when performing POST request.

     

    <?xml version="1.0" encoding="UTF-8"?>


    <rs:alarm-request throttlesize="AMOUNT_DEFINED_HERE"

    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:alarm-request>