Repository User Resource¶
Provides information on users who are allowed access to a repository.
- Version Added:
- 4.0.11
Details¶
Name | repository_user |
URI | /api/repositories/{repository_id}/users/{username}/ |
Token Policy ID | repository_user |
HTTP Methods | |
Parent Resource | Repository User List Resource |
Child Resources | None |
Fields¶
avatar_htmlDictionary | HTML for rendering the avatar at specified sizes. This is only populated if using Added in 3.0.14 |
avatar_urlString | Deprecated The URL for an avatar representing the user, if available. Added in 1.6.14 Deprecated in 3.0 |
avatar_urlsString | The URLs for an avatar representing the user, if available. Added in 3.0 |
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. |
is_activeBoolean | Whether or not the user is active. Inactive usersare not able to log in or make changes to Review Board. Added in 2.5.9 |
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 |
---|---|---|
delete | DELETE | Repository User Resource |
self | GET | Repository User Resource |
user | GET | Repository User Resource |
HTTP DELETE¶
Removes a user from the repository ACL.
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 |
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. |
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”.
Request Parameters¶
render-avatars-atString | A comma-separated list of avatar pixel sizes to render. Renders for each specified size be available in the avatars_html dictionary. If not provided, avatars will not be rendered. |
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.repository-user+json¶
$ curl https://reviews.example.com/api/repositories/1/users/doc/ -H "Accept: application/json"
HTTP 200 OK
Content-Length: 846
Content-Type: application/vnd.reviewboard.org.repository-user+json
ETag: 1d5604151f19103775f3a45cebe2aafdea9ca6eb
Vary: Accept, Cookie
X-Content-Type-Options: nosniff
{
"stat": "ok",
"user": {
"avatar_html": null,
"avatar_url": "https://secure.gravatar.com/avatar/b0f1ae4342591db2695fb11313114b3e?s=48&d=mm",
"avatar_urls": {
"1x": "https://secure.gravatar.com/avatar/b0f1ae4342591db2695fb11313114b3e?s=48&d=mm",
"2x": "https://secure.gravatar.com/avatar/b0f1ae4342591db2695fb11313114b3e?s=96&d=mm",
"3x": "https://secure.gravatar.com/avatar/b0f1ae4342591db2695fb11313114b3e?s=144&d=mm"
},
"email": "doc@example.com",
"first_name": "Doc",
"fullname": "Doc Dwarf",
"id": 2,
"is_active": true,
"last_name": "Dwarf",
"links": {
"delete": {
"href": "https://reviews.example.com/api/repositories/1/users/doc/",
"method": "DELETE"
},
"self": {
"href": "https://reviews.example.com/api/repositories/1/users/doc/",
"method": "GET"
},
"user": {
"href": "/api/users/doc/",
"method": "GET"
}
},
"url": "/users/doc/",
"username": "doc"
}
}