https://github.com/TryGhost/Ghost/blob/master/core/server/routes/api.js