Repository Group List Resource¶
Provides information on groups that are allowed access to a repository.
- Version Added:
4.0.11
Details¶
Name | repository_groups |
URI | /api/repositories/{repository_id}/groups/ |
Token Policy ID | repository_group |
HTTP Methods | |
Parent Resource | |
Child Resources |
Links¶
Name |
Method |
Resource |
---|---|---|
create | POST |
|
self | GET |
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 |
displaynameBoolean | Specifies whether |
invite-onlyBoolean | Whether to limit results to accessible invite-only review groups. Added in 5.0.6 |
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 |
show-invisibleBoolean | Whether to include accessible invisible review groups in the results. Added in 5.0.6 |
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 |
112 - OAuth2 Missing Scope ErrorHTTP 403 - Forbidden | Your OAuth2 token lacks the necessary scopes for this request. |
113 - OAuth2 Access Denied ErrorHTTP 403 - Forbidden | OAuth2 token access for this resource is prohibited. |
HTTP POST¶
Adds a group to the repository ACL.
Request Parameters¶
group_nameString | Required The group to add to the repository ACL. |
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 |
112 - OAuth2 Missing Scope ErrorHTTP 403 - Forbidden | Your OAuth2 token lacks the necessary scopes for this request. |
113 - OAuth2 Access Denied ErrorHTTP 403 - Forbidden | OAuth2 token access for this resource is prohibited. |
HTTP 400 - Bad Request |
Group does not exist. |
Examples¶
application/vnd.reviewboard.org.repository-groups+json¶
$ curl https://reviews.example.com/api/repositories/1/groups/ -H "Accept: application/json"
HTTP 200 OK
Content-Length: 704
Content-Type: application/vnd.reviewboard.org.repository-groups+json
ETag: bc50087d0f1eb18594bb595f086e5b474e303d60
Item-Content-Type: application/vnd.reviewboard.org.repository-group+json
Vary: Accept, Cookie
X-Content-Type-Options: nosniff
{
"groups": [
{
"absolute_url": "https://reviews.example.com/groups/privgroup/",
"display_name": "Private Group",
"extra_data": {},
"id": 4,
"invite_only": false,
"links": {
"delete": {
"href": "https://reviews.example.com/api/repositories/1/groups/privgroup/",
"method": "DELETE"
},
"self": {
"href": "https://reviews.example.com/api/repositories/1/groups/privgroup/",
"method": "GET"
}
},
"mailing_list": "",
"name": "privgroup",
"url": "/groups/privgroup/",
"visible": true
}
],
"links": {
"create": {
"href": "https://reviews.example.com/api/repositories/1/groups/",
"method": "POST"
},
"self": {
"href": "https://reviews.example.com/api/repositories/1/groups/",
"method": "GET"
}
},
"stat": "ok",
"total_results": 1
}