Categories
Announcements

APIv2 is Ready to Use … (APIv1 will be retired on 1 June 2017)

Quick links

    Uptime Robot’s API is consumed pretty much (with over 5,000,000+ requests/day) for “automating monitor management”, pulling the data to generate custom reports and more.

    As the usage grows every day, the APIv2 is built for a faster, more secure and stable experience with added features.

    SSL and POST only

    The APIv2 expects all parameters to be sent as a POST request and works SSL-only where both changes together help making it more secure.

    Updated parameter names and speed

    The parameter names and responses are very consistent now. They are all lower-case, separated with “_” (like api_key).

    And, most methods are now ~ 2x to 5x faster.

    Added features

    It is now possible to pull more data with getMonitors method, including:

    • getting the uptime % of a range (or multiple ranges) with custom_uptime_ranges parameter
    • getting the all time duration of statuses with  all_time_uptime_durations parameter
    • getting the logs of a given period with logs_start_date and logs_end_date parameters
    • getting maintenance windows of a monitor

    And, maintenance windows can also now be managed with the API too.

    Code samples

    The updated documentation page now has code samples for each monitor in multiple scripting and programming languages including PHP, Python, Nodejs, Go, Ruby, C# and Java.

    When will APIv1 be retired?

    APIv2 is the version that will be improved from now on and APIv1 is planned to be retired by 1 June 2017. So, please make sure that you switch to the new API before then.

    Suggestions and bug reports

    We are already using APIv2 in production, so, it is pretty stable. Yet, there is always a change of bugs and please let us know if you experience one.

    Also, look forward to any suggestions and feature requests to make it better.

    19 replies on “APIv2 is Ready to Use … (APIv1 will be retired on 1 June 2017)”

    I don’t see any way to pause monitoring in the v2 editMonitor API, am I missing something?

    Also why 4 required fields? The api_key and id of the monitor seem like they should be all that is necessary…

    Having a nightmare trying to update to API v2 using Curl via PHP…

    Curl appears to be connecting but no data is being returned by Curl. Just a 200 status code to confirm connection and then nothing…

    Using full API key, format=xml and logs=1… Tried all manner of different approaches but to no avail…

    Any suggestions?

    Found my problem… The API update wasn’t the issue… for me it was the simple change in the API keys…

    friendlyname has been changed to friendly_name and this is NOT documented as part of the update…

    Lessons learned:
    1. XML doesn’t output properly in an HTML error log
    2. Sanity check the variables you’re expecting so you don’t waste 8 hours like this…

    Hope the above discovery helps someone else avoid this facePalm moment…

    Hello. Thanks for the good work.
    Though, multiple things aren’t alright in API v2 : documentation not up-to-date (i.e missing values in data).

    And I encounter an issue with create_datetime : I live in France, a coutry which is applying a time change twice a year : +1 in spring, -1 in autumn.
    It seems the create_datetime and delete_datetime value your api sends is not taking that into account : I currently create monitors 1 hour in the future …
    Could you fix it ?

    Thanks for bringing us APIv2. Do you also offer a node module which developers can require to work with your API?

    Hi, I’m using the PHP cURL APIv2 raw example with a monitor API key or with the main API key, and having always the “Operation timed out after 60004 milliseconds with 0 out of 0 bytes received” error. Can somebody help me? Thanks!

    Hi,
    I need some help.
    I am trying to call the getMonitors method, however even with the correct api_key value it keeps telling me:

    missing_parameter”,”parameter_name”:”api_key”

    I have tried contacting your support email but no response yet.
    I really need to get this working as we have rolled out a new automated logging system inwhich we would like to import the data from the expected response.

    Please advise.

    Kind regards,

    Mark

    Hi Mark,

    we are sorry for the late reply, do you still have the issue? There were more changes lately, but please send us all the details again and we will be happy to take a look at it, thank you.

    Hi Kristian,

    Sorry about to reply here but I do have the same issue on every API calls. Cannot call any of the methods with my readOnly or MonitorSpecific apikeys.
    I got that response for any of the api calls:
    “type”: “missing_parameter”,
    “parameter_name”: “api_key”,
    “message”: “api_key parameter is missing.”

    Please, let me know what is the problem.

    Best Regards,

    vgary

    I am using this lib: https://github.com/jpavlav/UptimeRobotPy for Python and Monitors disappear after few days.
    It’s very strange, because Alert Contacts added via API stays in place. Only Monitors added via API disappeared after a few days without any reason. I tested it on 2 accounts.
    Do you have similar issues?

    PS. I know that it isn’t an official library, but after analyzing looks good

    Leave a Reply

    Your email address will not be published. Required fields are marked *