Review Group List Resource¶
Name | groups |
URI | /api/groups/ |
Description | Provides information on review groups. Review groups are groups of users that can be listed as an intended reviewer on a review request. Review groups cannot be created, deleted, or modified through the API. |
HTTP Methods |
|
Parent Resource | Root List Resource |
Child Resources | |
Anonymous Access | Yes, if anonymous site access is enabled |
Links¶
Name | Method | Resource |
---|---|---|
self | GET | Review Group List Resource |
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¶
Field | Type | Description |
---|---|---|
counts-only (optional) | Boolean | If specified, a single count field is returned with the number of results, instead of the results themselves. |
displayname (optional) | Boolean | Specifies whether q should also match the beginning of the display name. |
max-results (optional) | Integer | The maximum number of results to return in this list. By default, this is 25. |
q (optional) | String | 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. |
start (optional) | Integer | 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. |
Examples¶
application/json¶
{
"groups": [
{
"display_name": "Dev Group",
"id": 1,
"links": {
"self": {
"href": "http://reviews.example.com/api/groups/devgroup/",
"method": "GET"
},
"users": {
"href": "http://reviews.example.com/api/groups/devgroup/users/",
"method": "GET"
}
},
"mailing_list": "devgroup@example.com",
"name": "devgroup",
"url": "/groups/devgroup/"
},
{
"display_name": "Empty Group",
"id": 3,
"links": {
"self": {
"href": "http://reviews.example.com/api/groups/emptygroup/",
"method": "GET"
},
"users": {
"href": "http://reviews.example.com/api/groups/emptygroup/users/",
"method": "GET"
}
},
"mailing_list": "",
"name": "emptygroup",
"url": "/groups/emptygroup/"
},
{
"display_name": "New Group",
"id": 2,
"links": {
"self": {
"href": "http://reviews.example.com/api/groups/newgroup/",
"method": "GET"
},
"users": {
"href": "http://reviews.example.com/api/groups/newgroup/users/",
"method": "GET"
}
},
"mailing_list": "newgroup@example.com",
"name": "newgroup",
"url": "/groups/newgroup/"
},
{
"display_name": "Private Group",
"id": 4,
"links": {
"self": {
"href": "http://reviews.example.com/api/groups/privgroup/",
"method": "GET"
},
"users": {
"href": "http://reviews.example.com/api/groups/privgroup/users/",
"method": "GET"
}
},
"mailing_list": "",
"name": "privgroup",
"url": "/groups/privgroup/"
}
],
"links": {
"self": {
"href": "http://reviews.example.com/api/groups/",
"method": "GET"
}
},
"stat": "ok",
"total_results": 4
}
application/xml¶
<?xml version="1.0" encoding="utf-8"?>
<rsp>
<total_results>4</total_results>
<stat>ok</stat>
<groups>
<array>
<item>
<display_name>Dev Group</display_name>
<name>devgroup</name>
<links>
<self>
<href>http://reviews.example.com/api/groups/devgroup/</href>
<method>GET</method>
</self>
<users>
<href>http://reviews.example.com/api/groups/devgroup/users/</href>
<method>GET</method>
</users>
</links>
<url>/groups/devgroup/</url>
<id>1</id>
<mailing_list>devgroup@example.com</mailing_list>
</item>
<item>
<display_name>Empty Group</display_name>
<name>emptygroup</name>
<links>
<self>
<href>http://reviews.example.com/api/groups/emptygroup/</href>
<method>GET</method>
</self>
<users>
<href>http://reviews.example.com/api/groups/emptygroup/users/</href>
<method>GET</method>
</users>
</links>
<url>/groups/emptygroup/</url>
<id>3</id>
<mailing_list></mailing_list>
</item>
<item>
<display_name>New Group</display_name>
<name>newgroup</name>
<links>
<self>
<href>http://reviews.example.com/api/groups/newgroup/</href>
<method>GET</method>
</self>
<users>
<href>http://reviews.example.com/api/groups/newgroup/users/</href>
<method>GET</method>
</users>
</links>
<url>/groups/newgroup/</url>
<id>2</id>
<mailing_list>newgroup@example.com</mailing_list>
</item>
<item>
<display_name>Private Group</display_name>
<name>privgroup</name>
<links>
<self>
<href>http://reviews.example.com/api/groups/privgroup/</href>
<method>GET</method>
</self>
<users>
<href>http://reviews.example.com/api/groups/privgroup/users/</href>
<method>GET</method>
</users>
</links>
<url>/groups/privgroup/</url>
<id>4</id>
<mailing_list></mailing_list>
</item>
</array>
</groups>
<links>
<self>
<href>http://reviews.example.com/api/groups/</href>
<method>GET</method>
</self>
</links>
</rsp>