There is a single API call for retrieving RUM data samples.
Using curl:
The API key is a unique key that identifies each customer.
You can obtain it by clicking the Settings tab while logged on to Uptime Cloud Monitor UI.
It is presented at the bottom of the screen under “User API Access”.
Query Parameters
Parameters are specified in JSON format as follows:
start_time and end_time should be specified as an integer UNIX timestamp (seconds since epoch).
When omitted, the last 15 minutes will be queried.
When multiple queries are specified, all will share the same timeframe.
Required Parameters
group
must be specified as 0 (zero).
queries
at least one query must be specified.
Query format
idvs allows specifying an array of instrumentation keys. At least one instrumentation key must be specified.
To obtain Web App’s instrumentation key:
Click “Details” button on the desired Web App in Web App Dashboard view
Click the “Edit” link to open the Web App Edit screen
In the third line of JavaScript code look for:
Attention: You must concatenate “
” character at the end of every instrumentation key.
Keys
The key is the type of results that will be returned. Multiple keys can be specified. At least one is mandatory. Result type (key) should one of:
user_times - returns Web App level counters per interval
top_urls - returns a list of top requests per interval
Contains both Ajax and Page requests
top_locations - returns a list of top countries per interval. Also contains states for US only
top_browsers - returns a list of top browsers per interval
Sample request: last 15 minutes Web App counters for one Web App
The response has the following format:
Note: Twelve counters are returned per interval.
When charting an overtime graph, averages are sufficient.
To calculate average response time of the entire timeframe, sum the total response time of all intervals and then divide by the sum of requests counts of all intervals.
If “top_urls” key was specified, the response for the key has the following format:
You can use atob() in JavaScript to decode request URL from base64 encoding.
To calculate Apdex score, divide its total by its count.
To calculate average response time, divide its total by its count.
Note: Each interval reports its own top requests. Each request might be reported in multiple intervals on the same timeframe. To calculate average Apdex score on the entire timeframe for a specific request, sum all its totals and then divide by sum of all its counts.
If “top_locations” key was specified, the response for the key has the following format:
If “top_browsers” key was specified, the response for the key has the following format: