Quick links
With the new version of Uptime Robot’s front-end, response time data was also added as a new feature.
However, it was not available in the API until today as we were experimenting ways to keep this huge data. Things look pretty stable now and response times can now be reached via API.
As expected, the feature is a parameter for the getMonitors
method. There are actually 2 parameters:
- responseTimes: if set to 1 (responseTimes=1), the response time for all the checks in the last 24 hours is returned
- responseTimesAverage (optional): the API can also return the values as averages for given minutes (for ex: the dashboard averages the values as 30 minutes). This parameter will be very handy once the data for longer periods will be available and we’ll be able to get averages for hours/days/weeks, etc.
Hope that this new addition will enable you to provide more useful data in your site and/or apps.
12 replies on ““Response Time Data” Is Now Available With The API”
Hi there.
First of all thank you for the good work you are doing with uptimeRobot.
There seems to be a bug in the code that produces the responseTimes json data:
For a query like:
getMonitors?apiKey=&format=json&noJsonCallback=1&responseTimes=1
it returns valid responsetime elements for the first few monitors, but then at one stage it the raw data returned is:
“responsetime”:[{“datetime”:”02/21/2014 16:11:51″,”value”:”1342″}{“datetime”:”02/21/2014 16:01:51″,”value”:”1293″}]
The missing comma between the two elements means this is not recognized as valid json.
Can you please fix this?
Cheers
Michael Keller
Bug verified (that occurs on response times with 2 rows of data) and we are working on a fix.
Fixed now.
Hi admin.
Thanks for this, I can confirm that it works now.
Unfortunately I have another bug that I’d like to report. It is not related to response times, but I could not find a better place to put it. (Hint: Maybe put a bug reporting page onto the todo list. ;-))
For one of my monitors, when I look at the log in the web interface, I get:
Event Date-Time Reason Duration
Up 13-03-2014 08:52:34 OK 16 hrs, 59 mins
Down 13-03-2014 08:49:02 — 0 hrs, 3 mins
Up 03-03-2014 03:53:35 OK 244 hrs, 55 mins
When I look at the api data that is returned for the same monitor I get:
“log”:[
{“type”:”2″,”datetime”:”03/13/2014 08:52:34″},
{“type”:”1″,”datetime”:”03/13/2014 08:49:02″},
{“type”:”2″,”datetime”:”03/03/2014 03:53:35″}]
For what I can tell, the dates that are returned by the web page are correct, and the api log dates are wrong.
Cheers
Michael Keller
It would be really cool, if you could allow to limit the responseTimes returned. I really only need to see the last responseTime captured. If I use getMonitors with responseTime:1 the feed is to large to be handled on the client side only, and I’ll have to create some server side to handle the large feed.
We are planning to add this within few days.
Did this ever happen? I really want to query just the most recent response time.
j’aime bien ton blog merci pour le partage
What metric is measured with “Response Time”? Time to first byte?
Hi Jim, yes.
Sorry but where is the data available in the front-end ?
Hi Adam, should be visible next to each monitor when you click on it, or do you mean something else? Please contact us at support@uptimerobot.com if needed and we’ll take a look at it, thank you.