Add api docs for get users and get groups
Catch all error response for API routes.

Slash / is stripped from api routes (/foo/bars/ is now same as
/foo/bars).