Jump to >

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

Review Group List Resource

Provides information on review groups.

Review groups are groups of users that can be listed as an intended reviewer on a review request.

Details

Name groups
URI /api/groups/
HTTP Methods
  • GET - Retrieves the list of review groups on the site.
  • POST - Creates a new review group.
Parent Resource Root List Resource
Child Resources
Anonymous Access Yes, if anonymous site access is enabled

HTTP GET

Retrieves the list of review groups on the site.

The list of review groups can be filtered down using the q and displayname parameters.

Setting q to a value will by default limit the results to group names starting with that value. This is a case-insensitive comparison.

If displayname is set to 1, the display names will also be checked along with the username. displayname is ignored if q is not set.

For example, accessing /api/groups/?q=dev&displayname=1 will list any groups with a name or display name starting with dev.

Request Parameters

counts-onlyBoolean If specified, a single count field is returned with the number of results, instead of the results themselves.
displaynameBoolean Specifies whether q should also match the beginning of the display name.
max-resultsInteger The maximum number of results to return in this list. By default, this is 25. There is a hard limit of 200; if you need more than 200 results, you will need to make more than one request, using the “next” pagination link.
qString The string that the group name (or the display name when using displayname) must start with in order to be included in the list. This is case-insensitive.
startInteger The 0-based index of the first result in the list. The start index is usually the previous start index plus the number of previous results. By default, this is 0.

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

HTTP POST

Creates a new review group.

This will create a brand new review group with the given name and display name. The group will be public by default, unless specified otherwise.

Extra data can be stored on the group for later lookup by passing extra_data.key_name=value. The key_name and value can be any valid strings. Passing a blank value will remove the key. The extra_data. prefix is required.

Request Parameters

display_nameString Required

The human-readable name of the group.

nameString Required

The name of the group.

invite_onlyBoolean Whether or not the group is invite-only. The default is false.
mailing_listString The e-mail address that all posts on a review group are sent to.
visibleBoolean Whether or not the group is visible to users who are not members. The default is true.

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
208 - Invalid UserHTTP 400 - Bad Request User does not exist.
223 - Group Already ExistsHTTP 409 - Conflict A group with this name already exists.

Examples

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

$ curl http://reviews.example.com/api/groups/ -H "Accept: application/json"
Vary: Accept, Cookie
Item-Content-Type: application/vnd.reviewboard.org.review-group+json
Content-Type: application/vnd.reviewboard.org.review-groups+json
X-Content-Type-Options: nosniff
{
  "groups": [
    {
      "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
    }, 
    {
      "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
    }, 
    {
      "absolute_url": "http://reviews.example.com/groups/newgroup/", 
      "display_name": "New Group", 
      "extra_data": {}, 
      "id": 2, 
      "invite_only": false, 
      "links": {
        "delete": {
          "href": "http://reviews.example.com/api/groups/newgroup/", 
          "method": "DELETE"
        }, 
        "review_group_users": {
          "href": "http://reviews.example.com/api/groups/newgroup/users/", 
          "method": "GET"
        }, 
        "self": {
          "href": "http://reviews.example.com/api/groups/newgroup/", 
          "method": "GET"
        }, 
        "update": {
          "href": "http://reviews.example.com/api/groups/newgroup/", 
          "method": "PUT"
        }
      }, 
      "mailing_list": "newgroup@example.com", 
      "name": "newgroup", 
      "url": "/groups/newgroup/", 
      "visible": true
    }, 
    {
      "absolute_url": "http://reviews.example.com/groups/privgroup/", 
      "display_name": "Private Group", 
      "extra_data": {}, 
      "id": 4, 
      "invite_only": false, 
      "links": {
        "delete": {
          "href": "http://reviews.example.com/api/groups/privgroup/", 
          "method": "DELETE"
        }, 
        "review_group_users": {
          "href": "http://reviews.example.com/api/groups/privgroup/users/", 
          "method": "GET"
        }, 
        "self": {
          "href": "http://reviews.example.com/api/groups/privgroup/", 
          "method": "GET"
        }, 
        "update": {
          "href": "http://reviews.example.com/api/groups/privgroup/", 
          "method": "PUT"
        }
      }, 
      "mailing_list": "", 
      "name": "privgroup", 
      "url": "/groups/privgroup/", 
      "visible": true
    }
  ], 
  "links": {
    "create": {
      "href": "http://reviews.example.com/api/groups/", 
      "method": "POST"
    }, 
    "self": {
      "href": "http://reviews.example.com/api/groups/", 
      "method": "GET"
    }
  }, 
  "stat": "ok", 
  "total_results": 4
}