Graphs API

Endpoint [GET]:

EndpointDescription
/api/[app_id]/graphs.jsonReturns graph data

Parameters:

ParamTypeDescription
kindstringAggregate of provided namespace (web, background, or your own)
action_namestringExample: BlogPostsController-hash-show
fromstring (ISO8601)Defaults to 1 day ago if nil
tostring (ISO8601)Defaults to now if nil
timeframestringCan be: [hour, day, month, year]
fieldsarrayCan be: [mean, count, ex_count, ex_rate, pct]

Either provide the action_name or kind parameter. You can either specify the from an to values, or the timeframe value.

Valid timeframes are: hour, day, month and year

Valid fields are:

FieldDescription
meanmean response time
countthroughput
ex_countexception count
ex_rateexception rate (percentage of exceptions from count)
pct90 percentile (for slow requests only)

If you want an action and exception, concatenate the strings with :|: as a separator

So BlogPostsController#show with Mongoid::RecordNotFound becomes: BlogPostsController-hash-show:|:Mongoid::RecordNotFound"

Example request:

shell
/api/5534f7e38c5ce90000000000/graphs.json?action_name=BlogPostsController-hash-show&fields[]=mean&fields[]=pct&timeframe=month&token=aaa&from=2013-09-03T22:00:00+01:00&to=2013-10-04T00:00:00+01:00

This endpoint returns a JSON object:

json
{ "from": "2013-09-03T22:00:00Z", "to": "2013-10-04T00:00:00Z", "resolution": "hourly", "data": [ { "timestamp": 1378245600, "mean": 13.51942822948383, "pct": 13.213056043635918 } ] }