Many of the resources on the users API provide a shortcut for getting information about the currently authenticated user.
If a request URL does not include a :username
parameter then the response will be for the logged in user (and you must pass authentication information with your request). Additional private information, such as whether a user has two-factor authentication enabled, is included when authenticated through OAuth with the user
scope.
Get a single registered person
GET /people/:username
Response
Note: The returned email is the user's publicly visible email address (or null if the user has not specified a public email address in their profile). The publicly visible email address only displays for authenticated API users.
Status: 200 OK
{
"username": "nebukadnezzar",
"id": 1,
"display_name": "King Nebukadnezzar of Babylon",
"image_thumb_50": "http://localhost:3000/uploads/store/d577ae9672995d485974168ffc51e5be.jpg"
}
Get the authenticated user
GET /user
Response
Status: 200 OK
{
"username": "nebukadnezzar",
"id": 1,
"email": "nebukadnezzar@babylon-online.org",
"display_name": "King Nebukadnezzar of Babylon",
"image_thumb_50": "http://localhost:3000/uploads/store/d577ae9672995d485974168ffc51e5be.jpg"
}
Get all registered people
Lists all users, in the order that they signed up on babili.
GET /people
-> pagination?
Response
Status: 200 OK
[
{
"username": "nebukadnezzar",
"id": 1,
"display_name": "King Nebukadnezzar of Babylon",
"image_thumb_50": "http://localhost:3000/uploads/store/d577ae9672995d485974168ffc51e5be.jpg"
}
]