Watched Review Request List Resource¶
Lists and manipulates entries for review requests watched by the user.
These are requests that the user has starred in their Dashboard. This resource can be used for listing existing review requests and adding new review requests to watch.
Each item in the resource is an association between the user and the review request. The entries in the list are not the review requests 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 request.
Details¶
Name | watched_review_requests |
URI | /api/users/{username}/watched/review-requests/ |
Token Policy ID | watched_review_request |
HTTP Methods | |
Parent Resource | Watched List Resource |
Child Resources |
Links¶
Name | Method | Resource |
---|---|---|
create | POST | Watched Review Request List Resource |
self | GET | Watched Review Request List Resource |
HTTP GET¶
Retrieves the list of watched review requests.
Each entry in the list consists of a numeric ID that represents the entry for the watched review request. This is not necessarily the ID of the review request 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 request 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-requests+json¶
$ curl https://reviews.example.com/api/users/admin/watched/review-requests/ -H "Accept: application/json"
HTTP 200 OK
Content-Length: 2612
Content-Type: application/vnd.reviewboard.org.watched-review-requests+json
ETag: 2bb0df651f3529056f84675720b5a8d06dd9c88e
Item-Content-Type: application/vnd.reviewboard.org.watched-review-request+json
Vary: Accept, Cookie
X-Content-Type-Options: nosniff
{
"stat": "ok",
"watched_review_requests": [
{
"id": 8,
"watched_review_request": {
"absolute_url": "https://reviews.example.com/r/8/",
"approval_failure": "The review request has not been marked \"Ship It!\"",
"approved": false,
"blocks": [],
"branch": "trunk",
"bugs_closed": [],
"changenum": null,
"close_description": null,
"close_description_text_type": "plain",
"commit_id": null,
"created_with_history": false,
"depends_on": [],
"description": "This is a test designed for interdiffs.",
"description_text_type": "plain",
"extra_data": {},
"id": 8,
"issue_dropped_count": 0,
"issue_open_count": 0,
"issue_resolved_count": 0,
"issue_verifying_count": 0,
"last_updated": "2013-09-07T02:26:18Z",
"links": {
"changes": {
"href": "https://reviews.example.com/api/review-requests/8/changes/",
"method": "GET"
},
"delete": {
"href": "https://reviews.example.com/api/review-requests/8/",
"method": "DELETE"
},
"diff_context": {
"href": "https://reviews.example.com/api/review-requests/8/diff-context/",
"method": "GET"
},
"diffs": {
"href": "https://reviews.example.com/api/review-requests/8/diffs/",
"method": "GET"
},
"draft": {
"href": "https://reviews.example.com/api/review-requests/8/draft/",
"method": "GET"
},
"file_attachments": {
"href": "https://reviews.example.com/api/review-requests/8/file-attachments/",
"method": "GET"
},
"last_update": {
"href": "https://reviews.example.com/api/review-requests/8/last-update/",
"method": "GET"
},
"latest_diff": {
"href": "http://example.com/api/review-requests/8/diffs/3/",
"method": "GET"
},
"repository": {
"href": "https://reviews.example.com/api/repositories/1/",
"method": "GET",
"title": "Review Board SVN"
},
"reviews": {
"href": "https://reviews.example.com/api/review-requests/8/reviews/",
"method": "GET"
},
"screenshots": {
"href": "https://reviews.example.com/api/review-requests/8/screenshots/",
"method": "GET"
},
"self": {
"href": "https://reviews.example.com/api/review-requests/8/",
"method": "GET"
},
"status_updates": {
"href": "https://reviews.example.com/api/review-requests/8/status-updates/",
"method": "GET"
},
"submitter": {
"href": "https://reviews.example.com/api/users/admin/",
"method": "GET",
"title": "admin"
},
"update": {
"href": "https://reviews.example.com/api/review-requests/8/",
"method": "PUT"
}
},
"public": true,
"ship_it_count": 0,
"status": "pending",
"summary": "Interdiff Revision Test",
"target_groups": [],
"target_people": [
{
"href": "https://reviews.example.com/api/users/grumpy/",
"method": "GET",
"title": "grumpy"
}
],
"testing_done": "",
"testing_done_text_type": "plain",
"text_type": null,
"time_added": "2013-08-07T02:01:21Z",
"url": "/r/8/"
}
}
]
}