Watched Review Group List Resource¶
Lists and manipulates entries for review groups watched by the user.
These are groups that the user has starred in their Dashboard. This resource can be used for listing existing review groups and adding new review groups to watch.
Each item in the resource is an association between the user and the review group. The entries in the list are not the review groups themselves, but rather an entry that represents this association by listing the association’s ID (which can be used for removing the association) and linking to the review group.
Details¶
Name | watched_review_groups |
URI | /api/users/{username}/watched/review-groups/ |
Token Policy ID | watched_review_group |
HTTP Methods | |
Parent Resource | Watched List Resource |
Child Resources | |
Anonymous Access | Yes, if anonymous site access is enabled |
Links¶
Name | Method | Resource |
---|---|---|
create | POST | Watched Review Group List Resource |
self | GET | Watched Review Group List Resource |
HTTP GET¶
Retrieves the list of watched review groups.
Each entry in the list consists of a numeric ID that represents the entry for the watched review group. This is not necessarily the ID of the review group itself. It’s used for looking up the resource of the watched item so that it can be removed.
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 POST¶
Marks a review group as being watched.
The ID of the review group must be passed as object_id
, and will
store that review group in the list.
Request Parameters¶
object_idString | Required The ID of the object to watch. |
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.watched-review-groups+json¶
$ curl http://reviews.example.com/api/users/admin/watched/review-groups/ -H "Accept: application/json"
Vary: Accept, Cookie
Item-Content-Type: application/vnd.reviewboard.org.watched-review-group+json
Content-Type: application/vnd.reviewboard.org.watched-review-groups+json
X-Content-Type-Options: nosniff
{
"stat": "ok",
"watched_review_groups": [
{
"id": 1,
"watched_review_group": {
"absolute_url": "http://reviews.example.com/groups/devgroup/",
"display_name": "Dev Group",
"extra_data": {},
"id": 1,
"invite_only": false,
"links": {
"delete": {
"href": "http://reviews.example.com/api/groups/devgroup/",
"method": "DELETE"
},
"review_group_users": {
"href": "http://reviews.example.com/api/groups/devgroup/users/",
"method": "GET"
},
"self": {
"href": "http://reviews.example.com/api/groups/devgroup/",
"method": "GET"
},
"update": {
"href": "http://reviews.example.com/api/groups/devgroup/",
"method": "PUT"
}
},
"mailing_list": "devgroup@example.com",
"name": "devgroup",
"url": "/groups/devgroup/",
"visible": true
}
},
{
"id": 3,
"watched_review_group": {
"absolute_url": "http://reviews.example.com/groups/emptygroup/",
"display_name": "Empty Group",
"extra_data": {},
"id": 3,
"invite_only": false,
"links": {
"delete": {
"href": "http://reviews.example.com/api/groups/emptygroup/",
"method": "DELETE"
},
"review_group_users": {
"href": "http://reviews.example.com/api/groups/emptygroup/users/",
"method": "GET"
},
"self": {
"href": "http://reviews.example.com/api/groups/emptygroup/",
"method": "GET"
},
"update": {
"href": "http://reviews.example.com/api/groups/emptygroup/",
"method": "PUT"
}
},
"mailing_list": "",
"name": "emptygroup",
"url": "/groups/emptygroup/",
"visible": true
}
}
]
}