Forum Discussion

russell_day's avatar
12 years ago

AlertSite REST and Reporting API response definitions

Hi,



I am working to integrate some of our reporting solutions with the AlertSite REST and Reporting API but I am struggling to find definitions of the responses expected from the Reporting API.



For example;



When requesting SLA Detail (http://help.alertsite.com/AlertSite/ReportAPI?skin=clean.nat%2cnat#SLA_Endpoint)  it states that the API call "returns the SLA Detail data"; where can I find a description of the data structure? i.e.

<SLADetail>

    <DeviceID>C122223</DeviceID>

    ....

</SLADetail>



I see that the REST API does contain this information (http://help.alertsite.com/AlertSite/RestAPI?skin=clean.nat%2cnat#LOGIN).



Does anyone know if there is any documentation for this?



Thanks much





  • Hello Russell,



    You are correct, http://help.alertsite.com is the current location for the API documentation. Although we don't document a description for each API call, I think I can offer a way for you to generate such a description.



    Let's use your SLA Detail report as an example. Navigate to the tab "Performance Reports" within the AlertSite Console, you can then run an SLA Detail report specifying the desired parameters from the report screen (i.e. Site Name, Report Date, Locations, etc) and when generating that report, we will also give you the corresponding Report API call.



    It would look something like this:

    https://www.alertsite.com/report-api/sla/C#####?obj_device=#####&location=25,5040,85,75,40,80,20,6020,65&rdate=Today&showrecs=&sort_order=asc



    The output of this call, either in XML or JSON, would contain the data as well as the data descriptors. Here is a snippet:



    <Report Type="SLA Report" SiteName="SLA Monitor" SLA_Name="AlertSite SLA" SLA_Description="Server" From="2013-08-20 00:00" Thru="2013-08-20 11:43" obj_device="#####" locations="25,5040,85,75,40,80,20,6020,65">

    <Objective Type="Availability">

    <Goal>98.00</Goal>

    <Actual>100.00</Actual>

    <Compliant>Yes</Compliant>

    <Errors>0</Errors>

    <Checks>54</Checks>

    </Objective>



    I hope this helps you get to the data you require!