Jump to >

This documentation covers Review Board 2.0. You can see the latest Review Board documentation or all other versions.

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/
HTTP Methods
  • GET - Retrieves the list of watched review requests.
  • POST - Marks a review request as being watched.
Parent Resource Watched List Resource
Child Resources
Anonymous Access Yes, if anonymous site access is enabled

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

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

Examples

application/vnd.reviewboard.org.watched-review-requests+json

$ curl http://reviews.example.com/api/users/admin/watched/review-requests/ -H "Accept: application/json"
Vary: Accept, Cookie
Item-Content-Type: application/vnd.reviewboard.org.watched-review-request+json
Content-Type: application/vnd.reviewboard.org.watched-review-requests+json
X-Content-Type-Options: nosniff
{
  "stat": "ok", 
  "watched_review_requests": [
    {
      "id": 8, 
      "watched_review_request": {
        "absolute_url": "http://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, 
        "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, 
        "last_updated": "2013-09-07T02:26:18Z", 
        "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"
          }, 
          "diff_context": {
            "href": "http://reviews.example.com/api/review-requests/8/diff-context/", 
            "method": "GET"
          }, 
          "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, 
        "ship_it_count": 0, 
        "status": "pending", 
        "summary": "Interdiff Revision Test", 
        "target_groups": [], 
        "target_people": [
          {
            "href": "http://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/"
      }
    }
  ]
}