Jump to >

User Resource

Provides information on registered users.

If a user’s profile is private, the fields email, first_name, last_name, and fullname will be omitted for non-staff users.

Details

Name user
URI /api/users/{username}/
HTTP Methods
  • GET - Retrieve information on a registered user.
Parent Resource User List Resource
Child Resources
Anonymous Access Yes, if anonymous site access is enabled

Fields

avatar_urlString The URL for an avatar representing the user.
emailString The user’s e-mail address
first_nameString The user’s first name.
fullnameString The user’s full name (first and last).
idInteger The numeric ID of the user.
last_nameString The user’s last name.
urlString The URL to the user’s page on the site. This is deprecated and will be removed in a future version.
usernameString The user’s username.

HTTP GET

Retrieve information on a registered user.

This mainly returns some basic information (username, full name, e-mail address) and links to that user’s root Watched Items resource, which is used for keeping track of the groups and review requests that the user has “starred”.

Errors

100 - Does Not ExistHTTP 404 - Not Found Object does not exist
101 - Permission DeniedHTTP 403 - Forbidden You don’t have permission for this
103 - Not Logged InHTTP 401 - Unauthorized You are not logged in

Examples

application/vnd.reviewboard.org.user+json

$ curl http://reviews.example.com/api/users/admin/ -H "Accept: application/json"
Vary: Accept, Cookie
ETag: 1204be6a00fc56e188b3a9137a5c52fe329e1756
Content-Type: application/vnd.reviewboard.org.user+json
X-Content-Type-Options: nosniff
{
  "stat": "ok", 
  "user": {
    "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61", 
    "email": "admin@example.com", 
    "first_name": "Admin", 
    "fullname": "Admin User", 
    "id": 1, 
    "last_name": "User", 
    "links": {
      "self": {
        "href": "http://reviews.example.com/api/users/admin/", 
        "method": "GET"
      }, 
      "watched": {
        "href": "http://reviews.example.com/api/users/admin/watched/", 
        "method": "GET"
      }
    }, 
    "url": "/users/admin/", 
    "username": "admin"
  }
}