187
edits
| (7 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
==Overview== | ==Overview== | ||
The graph server API is a REST API with a JSON only response format. | Staging server up at: http://graphs-stage2.mozilla.org | ||
The graph server API is a REST API with a JSON-only response format. | |||
The API is scheduled to launch in Q1. | The API is scheduled to launch in Q1. | ||
| Line 118: | Line 120: | ||
* http://graphs.mozilla.org/api/test/runs/latest?id=TESTID&branchid=BRANCHID&machineid=MACHINEID - returns test run values for the latest run test for a specific test, branch and machine id | * http://graphs.mozilla.org/api/test/runs/latest?id=TESTID&branchid=BRANCHID&machineid=MACHINEID - returns test run values for the latest run test for a specific test, branch and machine id | ||
** Example response | ** Example response | ||
{ | { | ||
'stat':'ok', | 'stat':'ok', | ||
' | 'id':33, | ||
'values':[ | |||
{ | |||
' | 'value':22.3, | ||
' | 'page':'www.yahoo.com' | ||
' | }, | ||
' | { | ||
'value':29.1, | |||
'page':'www.myspace.com' | |||
}, | }, | ||
{ | |||
'value':39.3, | |||
'page':'www.facebook.com' | |||
} | |||
] | |||
} | } | ||
=== Get test run information === | === Get test run information === | ||
* http://graphs.mozilla.org/api/test/runs/?id=TESTRUNID - returns test run information for a specific testRunId | * http://graphs.mozilla.org/api/test/runs/info/?id=TESTRUNID - returns test run information for a specific testRunId | ||
** Example response | ** Example response | ||
{ | { | ||
| Line 149: | Line 149: | ||
'id':23, | 'id':23, | ||
'build_id':'2007072704', | 'build_id':'2007072704', | ||
'changeset':'572a00c0e251' | 'changeset':'572a00c0e251' | ||
}, | }, | ||
'date_run':1208830929, | 'date_run':1208830929, | ||
| Line 164: | Line 163: | ||
=== Test run values (formerly discrete data) === | === Test run values (formerly discrete data) === | ||
* http://graphs.mozilla.org/api/test/runs/values? | * http://graphs.mozilla.org/api/test/runs/values?id=TESTRUNID | ||
* returns test run results for a specific testRunId | * returns test run results for a specific testRunId | ||
** Example response | ** Example response | ||
{ | { | ||
'stat':'ok', | 'stat':'ok', | ||
'id':33, | |||
'values':[ | 'values':[ | ||
{ | { | ||
| Line 184: | Line 184: | ||
] | ] | ||
} | } | ||
=== Get test data by revision === | |||
* http://graphs.mozilla.org/api/test/runs/revisions?revision=10d2046d2b64&revision=d16525937c8b | |||
** Example response | |||
{ | |||
"stat": "ok", | |||
"revisions": { | |||
"d16525937c8b": { | |||
"tscroll": { | |||
"test_runs": { | |||
"MacOSX 10.5.8": [ | |||
[ | |||
3794718, # test run id | |||
20100421051331, # build id | |||
1271853540, # timestamp | |||
19719.5 # average value | |||
] | |||
], | |||
"WINNT 6.1": [ | |||
[ | |||
3794854, | |||
20100421053747, | |||
1271856720, | |||
11871.4 | |||
] | |||
], | |||
"Fedora 12 x64 - Constantine": [ | |||
[ | |||
3794354, | |||
20100421051525, | |||
1271852700, | |||
10063.200000000001 | |||
] | |||
], | |||
"WINNT 5.1": [ | |||
[ | |||
3794853, | |||
20100421053747, | |||
1271856720, | |||
13063.5 | |||
] | |||
] | |||
}, | |||
"name": "tscroll", | |||
"id": 71 | |||
}, | |||
}, | |||
} | |||
} | |||
=== Error codes=== | === Error codes=== | ||
edits