Return data at the API endpoints.

This data is designed to (hopefully) require the minimal number of XHR
requests to render useful pages, so some transformations are done
rather than simply returning the database results