Watched Review Request List Resource¶
Name | watched_review_requests |
URI | /api/users/{username}/watched/review-requests/ |
Description | 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. |
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 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¶
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¶
Field | Type | Description |
---|---|---|
object_id (required) | String | The ID of the object to watch. |
Examples¶
application/vnd.reviewboard.org.watched-review-requests+json¶
{
"stat": "ok",
"watched_review_requests": [
{
"id": 8,
"watched_review_request": {
"branch": "trunk",
"bugs_closed": [],
"changenum": null,
"description": "This is a test designed for interdiffs.",
"id": 8,
"last_updated": "2010-08-28 02:26:18",
"links": {
"changes": {
"href": "http://reviews.example.com/api/review-requests/8/changes/",
"method": "GET"
},
"delete": {
"href": "http://reviews.example.com/api/review-requests/8/",
"method": "DELETE"
},
"diffs": {
"href": "http://reviews.example.com/api/review-requests/8/diffs/",
"method": "GET"
},
"draft": {
"href": "http://reviews.example.com/api/review-requests/8/draft/",
"method": "GET"
},
"file_attachments": {
"href": "http://reviews.example.com/api/review-requests/8/file-attachments/",
"method": "GET"
},
"last_update": {
"href": "http://reviews.example.com/api/review-requests/8/last-update/",
"method": "GET"
},
"repository": {
"href": "http://reviews.example.com/api/repositories/1/",
"method": "GET",
"title": "Review Board SVN"
},
"reviews": {
"href": "http://reviews.example.com/api/review-requests/8/reviews/",
"method": "GET"
},
"screenshots": {
"href": "http://reviews.example.com/api/review-requests/8/screenshots/",
"method": "GET"
},
"self": {
"href": "http://reviews.example.com/api/review-requests/8/",
"method": "GET"
},
"submitter": {
"href": "http://reviews.example.com/api/users/admin/",
"method": "GET",
"title": "admin"
},
"update": {
"href": "http://reviews.example.com/api/review-requests/8/",
"method": "PUT"
}
},
"public": true,
"status": "pending",
"summary": "Interdiff Revision Test",
"target_groups": [],
"target_people": [
{
"href": "http://reviews.example.com/api/users/grumpy/",
"method": "GET",
"title": "grumpy"
}
],
"testing_done": "",
"time_added": "2009-02-25 02:01:21"
}
}
]
}
application/vnd.reviewboard.org.watched-review-requests+xml¶
<?xml version="1.0" encoding="utf-8"?>
<rsp>
<stat>ok</stat>
<watched_review_requests>
<array>
<item>
<id>8</id>
<watched_review_request>
<status>pending</status>
<last_updated>2010-08-28 02:26:18</last_updated>
<description>This is a test designed for interdiffs.</description>
<links>
<diffs>
<href>http://reviews.example.com/api/review-requests/8/diffs/</href>
<method>GET</method>
</diffs>
<repository>
<href>http://reviews.example.com/api/repositories/1/</href>
<method>GET</method>
<title>Review Board SVN</title>
</repository>
<screenshots>
<href>http://reviews.example.com/api/review-requests/8/screenshots/</href>
<method>GET</method>
</screenshots>
<self>
<href>http://reviews.example.com/api/review-requests/8/</href>
<method>GET</method>
</self>
<update>
<href>http://reviews.example.com/api/review-requests/8/</href>
<method>PUT</method>
</update>
<last_update>
<href>http://reviews.example.com/api/review-requests/8/last-update/</href>
<method>GET</method>
</last_update>
<reviews>
<href>http://reviews.example.com/api/review-requests/8/reviews/</href>
<method>GET</method>
</reviews>
<draft>
<href>http://reviews.example.com/api/review-requests/8/draft/</href>
<method>GET</method>
</draft>
<file_attachments>
<href>http://reviews.example.com/api/review-requests/8/file-attachments/</href>
<method>GET</method>
</file_attachments>
<submitter>
<href>http://reviews.example.com/api/users/admin/</href>
<method>GET</method>
<title>admin</title>
</submitter>
<changes>
<href>http://reviews.example.com/api/review-requests/8/changes/</href>
<method>GET</method>
</changes>
<delete>
<href>http://reviews.example.com/api/review-requests/8/</href>
<method>DELETE</method>
</delete>
</links>
<public>1</public>
<target_groups>
<array>
</array>
</target_groups>
<bugs_closed>
<array>
</array>
</bugs_closed>
<changenum>
</changenum>
<target_people>
<array>
<item>
<href>http://reviews.example.com/api/users/grumpy/</href>
<method>GET</method>
<title>grumpy</title>
</item>
</array>
</target_people>
<testing_done></testing_done>
<branch>trunk</branch>
<time_added>2009-02-25 02:01:21</time_added>
<summary>Interdiff Revision Test</summary>
<id>8</id>
</watched_review_request>
</item>
</array>
</watched_review_requests>
</rsp>