Tag Archives: API

Uptime Robot sends HEAD requests for HTTP monitors and GET request for keyword monitors by default (and, this is a good default setting for most monitors).

On the other hand, there are cases when a customization may be needed, like:

  • Checking if a form in the website works as expected
  • Monitoring your APIs which expect specific methods (a perfect match together with the custom HTTP headers feature).

So, here comes the HTTP method selection which enables us to choose the method, send the parameters to be sent (if needed) and also decide if the data will be sent as JSON or not.

Custom HTTP Methods

The feature can be reached from Add/Edit Monitor dialogs>Advanced Settings>HTTP Method and also through the API.

P.S.> HTTP method selection is a Pro-Plan only feature.

Since the release of the API, the "all time uptime ratio" for each monitor is provided by default.

Many users have asked for the ability to get weekly and/or monthly uptime ratios to integrate more values into their websites/apps.

Today, we have added a new variable to the getMonitors method which can return the uptime ratio of any given period.

It can provide values back to 2 months (this is how long the logs are kept for).

The new feature is smart enough to return the ratios of multiple intervals in a single API call.

In order to use it, just add: customUptimeRatio=7 to the getMonitors request for getting the 7 days uptime. Or you can go with customUptimeRatio=7-30-60 to get uptime ratios of all 3 days.

To learn more about the usage, just check the getMonitors method in the API docs.

With the release of monitor-specific alert contacts, the API is updated accordingly and also gained some new methods.

Updates

  • alertContactIDs should be sent when creating or editing monitors to define which alert contacts to be notified of up/down events
  • getMonitors method can now return the alert contacts of a monitor with adding showMonitorAlertContacts=1 to the querystring

New Methods

There are 3 new methods and the names define their functionality well:

  • getAlertContacts
  • newAlertContact
  • deleteAlertContact

The API documentation is updated with all the new information

Since the launch of the API ~a month ago, we are so excited to see many users integrating Uptime Robot ratios to their websites or auto-creating/deleting monitors from their apps.

Also, several wrappers and code samples are shared which eases consuming the "easy-to-use" API more.

As you know, the standard Uptime Robot apiKey can pull and push data for every monitor in an account. You can create create monitors, edit or delete them. But, what if you need to use the API that pulls data from your account but displays it inside a client's website? Revealing the apiKey would be a security issue.

Monitor-specific apiKeys

A new type of apiKey comes to the rescue: monitor-specific apiKeys are now added to the system which enables pulling data of "only" a given monitor.

Each monitor can have their own apiKey and they are locked to use the getMonitors API method only for that monitor.

That is specially functional for web agencies and freelancers controlling multiple clients websites from their own Uptime Robot accounts.

Improvements

The getMonitors method now returns:

Tighter integration for web apps

If you have a web application/service and looking for a tighter integration with Uptime Robot (like creating users via API), please feel free to contact us at [email protected] for more details.

That's all for now : ).

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.