Search Resource¶
Added in 1.6
Provides information on users, groups and review requests.
This is the resource for the autocomplete widget for quick search. This resource helps filter for users, groups and review requests.
Details¶
Name | search |
URI | /api/search/ |
Token Policy ID | search |
HTTP Methods |
|
Parent Resource | |
Child Resources | None |
Fields¶
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. |
Links¶
Name |
Method |
Resource |
---|---|---|
self | GET |
HTTP GET¶
Returns information on users, groups and review requests.
This is used by the autocomplete widget for quick search to get information on users, groups and review requests. This function returns users’ first name, last name and username, groups’ name and display name, and review requests’ ID and summary.
Request Parameters¶
displaynameBoolean | This field is deprecated and ignored. It will be removed in a future release of Review Board. |
fullnameBoolean | Whether or not to include users whose full name includes the search text. |
idInteger | A specific review request ID to search for. |
max_resultsInteger | The maximum number of results to return for each type of matching object. By default, this is 25. There is a hard limit of 200. |
qString | The text to search for. |
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 |
105 - Invalid Form DataHTTP 400 - Bad Request | One or more fields had errors |
112 - OAuth2 Missing Scope ErrorHTTP 403 - Forbidden | Your OAuth2 token lacks the necessary scopes for this request. |
113 - OAuth2 Access Denied ErrorHTTP 403 - Forbidden | OAuth2 token access for this resource is prohibited. |
Examples¶
application/vnd.reviewboard.org.search+json¶
$ curl https://reviews.example.com/api/search/?q=Gr -H "Accept: application/json"
HTTP 200 OK
Content-Length: 1403
Content-Type: application/vnd.reviewboard.org.search+json
ETag: 08c69e7f14a686ec2b48308cc9b160e29da1209c
Vary: Accept, Cookie
X-Content-Type-Options: nosniff
{
"search": {
"groups": [],
"review_requests": [],
"users": [
{
"avatar_html": null,
"avatar_url": "https://secure.gravatar.com/avatar/8f32aaaba6ce2ea6ef975d31e0fe4780?s=48&d=mm",
"avatar_urls": {
"1x": "https://secure.gravatar.com/avatar/8f32aaaba6ce2ea6ef975d31e0fe4780?s=48&d=mm",
"2x": "https://secure.gravatar.com/avatar/8f32aaaba6ce2ea6ef975d31e0fe4780?s=96&d=mm",
"3x": "https://secure.gravatar.com/avatar/8f32aaaba6ce2ea6ef975d31e0fe4780?s=144&d=mm"
},
"email": "grumpy@example.com",
"first_name": "Grumpy",
"fullname": "Grumpy Dwarf",
"id": 4,
"is_active": true,
"last_name": "Dwarf",
"links": {
"api_tokens": {
"href": "https://reviews.example.com/api/users/grumpy/api-tokens/",
"method": "GET"
},
"archived_review_requests": {
"href": "https://reviews.example.com/api/users/grumpy/archived-review-requests/",
"method": "GET"
},
"muted_review_requests": {
"href": "https://reviews.example.com/api/users/grumpy/muted-review-requests/",
"method": "GET"
},
"self": {
"href": "https://reviews.example.com/api/users/grumpy/",
"method": "GET"
},
"update": {
"href": "https://reviews.example.com/api/users/grumpy/",
"method": "PUT"
},
"user_file_attachments": {
"href": "https://reviews.example.com/api/users/grumpy/user-file-attachments/",
"method": "GET"
},
"watched": {
"href": "https://reviews.example.com/api/users/grumpy/watched/",
"method": "GET"
}
},
"url": "/users/grumpy/",
"username": "grumpy"
}
]
},
"stat": "ok"
}