Quick links
After many requests from the users who would like to integrate Uptime Robot with their apps or create other interfaces for it (like a desktop or mobile), the Uptime Robot API is launched today which makes such integrations possible and so easy.
This is the v1 of the API which covers most of the important stuff including:
- getting the list of monitors, their details (uptime ratio, URL, friendly name, type, etc.)
- getting the notification logs for each monitor
- getting the alert contacts notified after each notification
- adding new monitors
- editing monitors
- deleting monitors.
It is a REST API that can return:
- XML
- JSON
- JSON-p
responses.
In order to use it, simply get your apiKey from the My Settings page and head to the API documentation.
What’s next with the API?
In the next version, we’ll be adding:
- “monitor-specific apiKeys” so you can securely use the apiKey in a client’s website without revealing your main apiKey
- methods for managing alert contacts (adding/editing/deleting them)
Please share your thoughts about the API and/or any other methods that you think should exist in the next version.
39 replies on “Uptime Robot Gets An API!”
Great!!! Nice work :))
Awesome Juice!
Thanks for the great tool guys and now its even better.
Really appreciate
Love the service!
Keep up the good work.
Don’t see the point in this…if I wanted to monitor my server from an App i’d just download one of the many that are available…in terms of development there isn’t a lot that can be done with the statuses of my server – in other words there isn’t massive potential for something like this.
@Chris,
API will make sense once you want to use the Uptime Robot engine but pull your data and integrate it into other apps (like creating new monitors from a web hosting control panel or a WordPress plugin displaying the uptime of your blog inside the WP admin panels, etc.).
Otherwise, for simply monitoring servers and getting notification e-mails, Uptime Robot’s own interface is pretty enough for that.
Nice work, UpTimeRobot saved me many times.
Great Service and like everyone else said its even better now. Looking forward to an iPhone App soon 🙂
Great work guys!
Nice..now can use inside to my blog already..hehe..thank you
Great work!! Again a very nice service from uptime-robot.
Really appreciate this new API key release. With the API we can integrate the uptime monitoring result in to our web/blog, it is cool.
Keep the great work.
Pause/Resume would be nice…
@Stephan,
We can add it to the editMonitor method. Gr8 suggestion.
Hi there. May I suggest that you publish and maintain specific API version numbers for better forwards and backwards compatibility. E.g. if this is API version 1 then users should specify that they expect to use that version, using an appropriate HTTP header or URL variable. When you change the API in future versions in a way that is complex and may change the behavior of variables (either sent or received), then having a simple versioning system will make thinks easier for everyone and prevent breaking the API in deployed applications as you change it. 🙂
have long used this service, thanks for the improvements
Hi there, I’ve been writing a wrapper function in PHP. It seems everything works fine except for the newMonitor function. I’ve tried both newMonitor and addMonitor (text in API documentation is confusing) but neither of them work. addMonitor comes back with 103 and newMonitor an internal server error.
Am I doing something wrong?
Am i allowed to make a iphone/android app to monitor the server status?
Br
Stefan
@Seb,
That’s a great suggestion. We’ll be keeping the v1 as is and using /v2/method type of URLs for next versions.
@Mark,
Will be checking it and updating this post back.
@itayo,
Yes, sure.
@Mark,
Yes, there seemed to be an issue with the handling of a parameter in newMonitor method and it is fixed now.
P.S. The method name is newMonitor and updated the dos (thx for the heads up).
I completed my simple API wrapper. It can be forked at GitHub
@Mark,
Great job and thanks so much for making it available.
Updating the url for a monitor would be nice too.
Thanks for the great product.
@Jon,
The feature exists in the editMonitor method.
No0b alert 🙂
I’m trying to use the API and @Mark’s little script to simply display the uptime percentage of one of my monitors on my website.
I’ve got Mark’s script working so that I end up with the correct JSON output for the monitor that I want, using the code:
# getMonitors
$monitors = array(‘xxxxx’);
echo $ur->getMonitors($monitors, 1, 0); // gets only specified monitors and outputs the returned json string
But how do I turn that JSON string into a simple percentage (alltimeuptimeratio) that I can include on my website?
Any help appreciated 😉
Thanks for the service and now the API. Uptimerobot rocks!
@Christopher,
Not a PHP guy here so others may provide a better answer but you can use the JSON response as a classic PHP array.
Check this thread which is very similar: http://stackoverflow.com/questions/263392/handling-data-in-a-php-json-object
Alternatively, you can use the PHP code here for that: http://www.uptimerobot.com/api.asp#examples
@admin
Merci much 🙂 Exactly what I was looking for!
Great, I still playing around about this API based on samples admin give me. Thanks!
The API is nice. I was wondering if you plan on adding a postback capability? I’m not sure if the terminology is correct, so here is what it would do…
In the Uptime Robot Settings interface we could add a URL path to a script that will receive notifications (up or down and the monitor ID/name). I could then have my local script parse that data and either store it in the database or use a service like Pusherapp to push notifications out to my admin users.
I think this would make an already awesome product almost perfect.
Thanks.
@Spencer,
Yes, that’s a feature in our to-do-list.
We still have some way to go before adding it but it’ll definitely be implemented.
Hi, where I can get actually API ? http://uptimerobot.com/api.asp return 404
They had moved to new URL but not update this post. The URL should be: https://uptimerobot.com/apiv1
I am thinking to develope a whmcs plugin and display the stats directly to registered clients? Is it possible with your api?
https://uptimerobot.com/apiv1 link to api working? It doesn’t open for me
Hi Constantine,
sure, the link you sent is working at the moment, that’s the older API though. You can find the new one here https://uptimerobot.com/api
Have a great day!
May I know the cause behind this error?
Thanks
Hi Mick,
could you pleae specify what error do you have in mind? Thank you.
Hi! I wanted to integrate this system into the site, but I see on this page https://uptimerobot.com/apiv1:
The APIv1 will be retired by 1 Dec 2018 and please switch to APIv2 before that date. This page http://uptimerobot.com/api.asp still return 404
Hi Mark,
APIv1 should be still working, but there’s APIv2 available, please take a look at it: https://uptimerobot.com/api Let us know on support@uptimerobot.com if you need any further assistance.