Forum Discussion

Name_ToLong's avatar
Name_ToLong
Icon for Neophyte rankNeophyte
24 days ago

Website Downtimes via API

Hi

I'd like to use the API to gather information about the availability of my websites.
I will have to gather data for monthly and yearly SLA calculation which features the exact downtimes of the website.

With these requirements, I don't think the graph data can deliver accurate data enough. So I'm looking into the /website/websites/{webservice_id}/checkpoints/{checkpoint_id}/data API.
Getting Data | LogicMonitor

The API works fine, but obviously getting all the statuscodes for every check (every minute) for a whole Month, or even year takes a long time and produces a lot of data that I have to crunch.

For me, it would be sufficient to get only the data for downtimes, so every status report which is not 1.0.
Does anyone know if the API has such a feature?
I already ask for only the datapoints, but this would need some additional filtering.

params = {'start': start, 'end': end, 'format': 'json', 'datapoints': 'overallStatus' }

3 Replies

  • You could build a dashboard widget containing multiple websites, then use the /dashboard/widgets/{id}/data endpoint to grab the data for multiple sites at once. 

    As far as I know, grabbing only those points that equal a certain value is not an option on any of the API endpoints.

  • Yes Stuart_Weenig there are some reason. One of them is that we need brandet reports with multiple DataSource. The other is that we need to be able to modify the results based on different events (like maintenance windows), which sometimes also are only added during the reporting phase.