User List Resource¶
Name | users |
URI | /api/users/ |
Description | 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. |
HTTP Methods |
|
Parent Resource | Root List Resource |
Child Resources | |
Anonymous Access | Yes, if anonymous site access is enabled |
Links¶
Name | Method | Resource |
---|---|---|
self | GET | User List Resource |
HTTP GET¶
Retrieves the list of users on the site.
This includes only the users who have active accounts on the site. Any account that has been disabled (for inactivity, spam reasons, or anything else) will be excluded from the list.
The list of users can be filtered down using the q and fullname parameters.
Setting q to a value will by default limit the results to usernames starting with that value. This is a case-insensitive comparison.
If fullname is set to 1, the first and last names will also be checked along with the username. fullname is ignored if q is not set.
For example, accessing /api/users/?q=bo&fullname=1 will list any users with a username, first name or last name starting with bo.
Request Parameters¶
Field | Type | Description |
---|---|---|
counts-only (optional) | Boolean | If specified, a single count field is returned with the number of results, instead of the results themselves. |
fullname (optional) | Boolean | Specifies whether q should also match the beginning of the first name or last name. |
max-results (optional) | Integer | The maximum number of results to return in this list. By default, this is 25. There is a hard limit of 200; if you need more than 200 results, you will need to make more than one request, using the “next” pagination link. |
q (optional) | String | The string that the username (or the first name or last name when using fullname) must start with in order to be included in the list. This is case-insensitive. |
start (optional) | Integer | The 0-based index of the first result in the list. The start index is usually the previous start index plus the number of previous results. By default, this is 0. |
Errors¶
Examples¶
application/vnd.reviewboard.org.users+json¶
{
"links": {
"self": {
"href": "http://reviews.example.com/api/users/",
"method": "GET"
}
},
"stat": "ok",
"total_results": 4,
"users": [
{
"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"
},
{
"avatar_url": "http://www.gravatar.com/avatar/b0f1ae4342591db2695fb11313114b3e",
"email": "doc@example.com",
"first_name": "Doc",
"fullname": "Doc Dwarf",
"id": 2,
"last_name": "Dwarf",
"links": {
"self": {
"href": "http://reviews.example.com/api/users/doc/",
"method": "GET"
},
"watched": {
"href": "http://reviews.example.com/api/users/doc/watched/",
"method": "GET"
}
},
"url": "/users/doc/",
"username": "doc"
},
{
"avatar_url": "http://www.gravatar.com/avatar/1a0098e6600792ea4f714aa205bf3f2b",
"email": "dopey@example.com",
"first_name": "Dopey",
"fullname": "Dopey Dwarf",
"id": 3,
"last_name": "Dwarf",
"links": {
"self": {
"href": "http://reviews.example.com/api/users/dopey/",
"method": "GET"
},
"watched": {
"href": "http://reviews.example.com/api/users/dopey/watched/",
"method": "GET"
}
},
"url": "/users/dopey/",
"username": "dopey"
},
{
"avatar_url": "http://www.gravatar.com/avatar/8f32aaaba6ce2ea6ef975d31e0fe4780",
"email": "grumpy@example.com",
"first_name": "Grumpy",
"fullname": "Grumpy Dwarf",
"id": 4,
"last_name": "Dwarf",
"links": {
"self": {
"href": "http://reviews.example.com/api/users/grumpy/",
"method": "GET"
},
"watched": {
"href": "http://reviews.example.com/api/users/grumpy/watched/",
"method": "GET"
}
},
"url": "/users/grumpy/",
"username": "grumpy"
}
]
}
application/vnd.reviewboard.org.users+xml¶
<?xml version="1.0" encoding="utf-8"?>
<rsp>
<total_results>4</total_results>
<stat>ok</stat>
<users>
<array>
<item>
<username>admin</username>
<first_name>Admin</first_name>
<last_name>User</last_name>
<links>
<watched>
<href>http://reviews.example.com/api/users/admin/watched/</href>
<method>GET</method>
</watched>
<self>
<href>http://reviews.example.com/api/users/admin/</href>
<method>GET</method>
</self>
</links>
<url>/users/admin/</url>
<email>admin@example.com</email>
<avatar_url>http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61</avatar_url>
<fullname>Admin User</fullname>
<id>1</id>
</item>
<item>
<username>doc</username>
<first_name>Doc</first_name>
<last_name>Dwarf</last_name>
<links>
<watched>
<href>http://reviews.example.com/api/users/doc/watched/</href>
<method>GET</method>
</watched>
<self>
<href>http://reviews.example.com/api/users/doc/</href>
<method>GET</method>
</self>
</links>
<url>/users/doc/</url>
<email>doc@example.com</email>
<avatar_url>http://www.gravatar.com/avatar/b0f1ae4342591db2695fb11313114b3e</avatar_url>
<fullname>Doc Dwarf</fullname>
<id>2</id>
</item>
<item>
<username>dopey</username>
<first_name>Dopey</first_name>
<last_name>Dwarf</last_name>
<links>
<watched>
<href>http://reviews.example.com/api/users/dopey/watched/</href>
<method>GET</method>
</watched>
<self>
<href>http://reviews.example.com/api/users/dopey/</href>
<method>GET</method>
</self>
</links>
<url>/users/dopey/</url>
<email>dopey@example.com</email>
<avatar_url>http://www.gravatar.com/avatar/1a0098e6600792ea4f714aa205bf3f2b</avatar_url>
<fullname>Dopey Dwarf</fullname>
<id>3</id>
</item>
<item>
<username>grumpy</username>
<first_name>Grumpy</first_name>
<last_name>Dwarf</last_name>
<links>
<watched>
<href>http://reviews.example.com/api/users/grumpy/watched/</href>
<method>GET</method>
</watched>
<self>
<href>http://reviews.example.com/api/users/grumpy/</href>
<method>GET</method>
</self>
</links>
<url>/users/grumpy/</url>
<email>grumpy@example.com</email>
<avatar_url>http://www.gravatar.com/avatar/8f32aaaba6ce2ea6ef975d31e0fe4780</avatar_url>
<fullname>Grumpy Dwarf</fullname>
<id>4</id>
</item>
</array>
</users>
<links>
<self>
<href>http://reviews.example.com/api/users/</href>
<method>GET</method>
</self>
</links>
</rsp>