Initial API design
/api/stats/<stat>: less verbose
Merge remote-tracking branch 'andreasots/api'
Minor tweaks to API code