Jump to >

Watched Review Group List Resource

Name watched_review_groups
URI /api/users/{username}/watched/review-groups/
Description

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.

HTTP Methods
  • GET - Retrieves the list of watched review groups.
  • POST - Marks a review group 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 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.

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

Field Type Description
object_id (required) String The ID of the object to watch.

Errors

Examples

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

{
  "stat": "ok", 
  "watched_review_groups": [
    {
      "id": 1, 
      "watched_review_group": {
        "display_name": "Dev Group", 
        "id": 1, 
        "invite_only": false, 
        "links": {
          "delete": {
            "href": "http://reviews.example.com/api/groups/devgroup/", 
            "method": "DELETE"
          }, 
          "self": {
            "href": "http://reviews.example.com/api/groups/devgroup/", 
            "method": "GET"
          }, 
          "update": {
            "href": "http://reviews.example.com/api/groups/devgroup/", 
            "method": "PUT"
          }, 
          "users": {
            "href": "http://reviews.example.com/api/groups/devgroup/users/", 
            "method": "GET"
          }
        }, 
        "mailing_list": "devgroup@example.com", 
        "name": "devgroup", 
        "url": "/groups/devgroup/", 
        "visible": true
      }
    }, 
    {
      "id": 3, 
      "watched_review_group": {
        "display_name": "Empty Group", 
        "id": 3, 
        "invite_only": false, 
        "links": {
          "delete": {
            "href": "http://reviews.example.com/api/groups/emptygroup/", 
            "method": "DELETE"
          }, 
          "self": {
            "href": "http://reviews.example.com/api/groups/emptygroup/", 
            "method": "GET"
          }, 
          "update": {
            "href": "http://reviews.example.com/api/groups/emptygroup/", 
            "method": "PUT"
          }, 
          "users": {
            "href": "http://reviews.example.com/api/groups/emptygroup/users/", 
            "method": "GET"
          }
        }, 
        "mailing_list": "", 
        "name": "emptygroup", 
        "url": "/groups/emptygroup/", 
        "visible": true
      }
    }
  ]
}

application/vnd.reviewboard.org.watched-review-groups+xml

<?xml version="1.0" encoding="utf-8"?>
<rsp>
 <stat>ok</stat>
 <watched_review_groups>
  <array>
   <item>
    <id>1</id>
    <watched_review_group>
     <display_name>Dev Group</display_name>
     <name>devgroup</name>
     <links>
      <users>
       <href>http://reviews.example.com/api/groups/devgroup/users/</href>
       <method>GET</method>
      </users>
      <self>
       <href>http://reviews.example.com/api/groups/devgroup/</href>
       <method>GET</method>
      </self>
      <update>
       <href>http://reviews.example.com/api/groups/devgroup/</href>
       <method>PUT</method>
      </update>
      <delete>
       <href>http://reviews.example.com/api/groups/devgroup/</href>
       <method>DELETE</method>
      </delete>
     </links>
     <url>/groups/devgroup/</url>
     <visible>1</visible>
     <invite_only>0</invite_only>
     <id>1</id>
     <mailing_list>devgroup@example.com</mailing_list>
    </watched_review_group>
   </item>
   <item>
    <id>3</id>
    <watched_review_group>
     <display_name>Empty Group</display_name>
     <name>emptygroup</name>
     <links>
      <users>
       <href>http://reviews.example.com/api/groups/emptygroup/users/</href>
       <method>GET</method>
      </users>
      <self>
       <href>http://reviews.example.com/api/groups/emptygroup/</href>
       <method>GET</method>
      </self>
      <update>
       <href>http://reviews.example.com/api/groups/emptygroup/</href>
       <method>PUT</method>
      </update>
      <delete>
       <href>http://reviews.example.com/api/groups/emptygroup/</href>
       <method>DELETE</method>
      </delete>
     </links>
     <url>/groups/emptygroup/</url>
     <visible>1</visible>
     <invite_only>0</invite_only>
     <id>3</id>
     <mailing_list></mailing_list>
    </watched_review_group>
   </item>
  </array>
 </watched_review_groups>
</rsp>