version 052010
BrowserMob’s API uses a encrypted signature to guaranteed the security of the data being transmitted. Please note that your secret key is never sent through the wire.
All API requests must include the following parameters either in the query string (for GETs) or body (for POST):
The signature parameter should be created using the following pseudo algorithm:
data = VERB + '\n' + HOST + '\n' + PATH + '\n' + normalized parameter string
where:
PATH is the HTTP absolute path component of the URI up to, but not including, the query string. If empty, use “/”. For example: /a/m/all
The signature will be the base64Encoding of the HMAC-SHA1 of data using your API secret.
http://browsermob.com/a/m/{id}
where id is:
BrowserMob’s API is capable of providing precomputed and rolled up metrics for all monitoring jobs. To fetch such metric you must provide the following parameters:
The following metrics are available for all monitoring jobs:
Available resolutions:
A note on resolution:
Response time data is almost solely relevant in relation to its progression over time hence we provide simple APIs to give you high level “aggregated” information. For the cases in which you would like to look at a specific transaction data, let’s say to find out which object (css, html, js, etc…) was causing the response time spike you saw on the graphs, we provide you a “single” resolution level that gives you ids for individual transactions. Armed with those ids you can fetch in-depth transaction data using the resource below.
Querying a job for its “success” metric:
$ ./bmob.py -i -d "metric=success,start=1268496428,end=1271088428,resolution=hour" -c d86f6cfddda94fcea5b5acc86441ff30:81851c7b5 http://browsermob.com/a/m/62c6f594d70648deb17861b82775d4be
{
"LOCAL": [
{
"errors": 57,
"total": 57,
"date": 1270494000000,
"error": false
},
[...]
http://browsermob.com/a/m/{id}/{transaction}
where transaction is the id of a monitoring job transaction.
$ ./bmob.py -i -c d86f6cfddda94fcea5b5acc86441ff30:81851c7b5 http://browsermob.com/a/m/62c6f594d70648deb17861b82775d4be/98
[...]
http://browsermob.com/a/l/{id}
where id is:
$ ./bmob.py -i -c d86f6cfddda94fcea5b5acc86441ff30:81851c7b5 http://browsermob.com/a/l/1594
{
"name": "asdasdasd",
"failures": [
{
"line number": 8,
"headersUrl": null,
"videoUrl": null,
"screenshotUrl": null,
"bodyUrl": null,
"count": 1,
"scriptId": "1c4e455f48814e9899b407075280a4c4",
"message": "Wrapped java.lang.RuntimeException: Timed out after 10000 ms while waiting network traffic to stop"
}
],
"region": "US_EAST",
"stats": {
"failures": 1,
"transactions": 45,
"failureScreenshots": 1,
"objects": 744
},
"end": 1271048376000,
"id": 1594,
"start": 1271047876000,
"scriptsCount": 1,
"state": "ABORTED",
"accountId": 1115
}
BrowserMob utilizes JSON and HTTP response codes to convey information back to the API consumer. Currently the following HTTP response codes are meaningful: