diff options
Diffstat (limited to 'Documentation/rest-api-groups.txt')
-rw-r--r-- | Documentation/rest-api-groups.txt | 77 |
1 files changed, 76 insertions, 1 deletions
diff --git a/Documentation/rest-api-groups.txt b/Documentation/rest-api-groups.txt index d5d72567ff..00fd81f62a 100644 --- a/Documentation/rest-api-groups.txt +++ b/Documentation/rest-api-groups.txt @@ -124,6 +124,40 @@ client so they are generally disabled by default. Optional fields are: * `MEMBERS`: include list of direct group members. -- +==== Find groups that are owned by another group + +By setting `ownedBy` and specifying the link:#group-id[\{group-id\}] of another +group, it is possible to find all the groups for which the owning group is the +given group. + +.Request +---- + GET /groups/?ownedBy=7ca042f4d5847936fcb90ca91057673157fd06fc HTTP/1.0 +---- + +.Response +---- + HTTP/1.1 200 OK + Content-Disposition: attachment + Content-Type: application/json; charset=UTF-8 + + )]}' + { + "MyProject-Committers": { + "id": "9999c971bb4ab872aab759d8c49833ee6b9ff320", + "url": "#/admin/groups/uuid-9999c971bb4ab872aab759d8c49833ee6b9ff320", + "options": { + "visible_to_all": true + }, + "description":"contains all committers for MyProject", + "group_id": 551, + "owner": "MyProject-Owners", + "owner_id": "7ca042f4d5847936fcb90ca91057673157fd06fc", + "created_on": "2013-02-01 09:59:32.126000000" + } + } +---- + ==== Check if a group is owned by the calling user By setting the option `owned` and specifying a group to inspect with the option `group`/`g`, it is possible to find out if this group is @@ -563,6 +597,9 @@ Renames a Gerrit internal group. The new group name must be provided in the request body. +This endpoint is only allowed for Gerrit internal groups; attempting to call on a +non-internal group will return 405 Method Not Allowed. + .Request ---- PUT /groups/MyProject-Committers/name HTTP/1.0 @@ -596,6 +633,9 @@ response is "`409 Conflict`". Retrieves the description of a group. +This endpoint is only allowed for Gerrit internal groups; attempting to call on a +non-internal group will return 405 Method Not Allowed. + .Request ---- GET /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/description HTTP/1.0 @@ -623,6 +663,9 @@ Sets the description of a Gerrit internal group. The new group description must be provided in the request body. +This endpoint is only allowed for Gerrit internal groups; attempting to call on a +non-internal group will return 405 Method Not Allowed. + .Request ---- PUT /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/description HTTP/1.0 @@ -704,6 +747,9 @@ Sets the options of a Gerrit internal group. The new group options must be provided in the request body as a link:#group-options-input[GroupOptionsInput] entity. +This endpoint is only allowed for Gerrit internal groups; attempting to call on a +non-internal group will return 405 Method Not Allowed. + .Request ---- PUT /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/options HTTP/1.0 @@ -737,6 +783,9 @@ link:#group-options-info[GroupOptionsInfo] entity. Retrieves the owner group of a Gerrit internal group. +This endpoint is only allowed for Gerrit internal groups; attempting to call on a +non-internal group will return 405 Method Not Allowed. + .Request ---- GET /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/owner HTTP/1.0 @@ -779,6 +828,9 @@ The new owner group must be provided in the request body. The new owner can be specified by name, by group UUID or by the legacy numeric group ID. +This endpoint is only allowed for Gerrit internal groups; attempting to call on a +non-internal group will return 405 Method Not Allowed. + .Request ---- PUT /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/owner HTTP/1.0 @@ -821,6 +873,9 @@ describes the new owner group. Gets the audit log of a Gerrit internal group. +This endpoint is only allowed for Gerrit internal groups; attempting to call on a +non-internal group will return 405 Method Not Allowed. + .Request ---- GET /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/log.audit HTTP/1.0 @@ -931,6 +986,9 @@ As result a list of detailed link:rest-api-accounts.html#account-info[ AccountInfo] entries is returned. The entries in the list are sorted by full name, preferred email and id. +This endpoint is only allowed for Gerrit internal groups; attempting to call on a +non-internal group will return 405 Method Not Allowed. + .Request ---- GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/members/ HTTP/1.0 @@ -1043,6 +1101,9 @@ AccountInfo] entity is returned that describes the group member. Adds a user as member to a Gerrit internal group. +This endpoint is only allowed for Gerrit internal groups; attempting to call on a +non-internal group will return 405 Method Not Allowed. + .Request ---- PUT /groups/MyProject-Committers/members/John%20Doe HTTP/1.0 @@ -1137,6 +1198,9 @@ already a member of the group. Removes a user from a Gerrit internal group. +This endpoint is only allowed for Gerrit internal groups; attempting to call on a +non-internal group will return 405 Method Not Allowed. + .Request ---- DELETE /groups/MyProject-Committers/members/John%20Doe HTTP/1.0 @@ -1190,6 +1254,9 @@ Lists the direct subgroups of a group. As result a list of link:#group-info[GroupInfo] entries is returned. The entries in the list are sorted by group name and UUID. +This endpoint is only allowed for Gerrit internal groups; attempting to call on a +non-internal group will return 405 Method Not Allowed. + .Request ---- GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/groups/ HTTP/1.0 @@ -1262,6 +1329,9 @@ describes the subgroup. Adds an internal or external group as subgroup to a Gerrit internal group. External groups must be specified using the UUID. +This endpoint is only allowed for Gerrit internal groups; attempting to call on a +non-internal group will return 405 Method Not Allowed. + .Request ---- PUT /groups/MyProject-Committers/groups/MyGroup HTTP/1.0 @@ -1371,6 +1441,9 @@ group was already a subgroup of the group. Removes a subgroup from a Gerrit internal group. +This endpoint is only allowed for Gerrit internal groups; attempting to call on a +non-internal group will return 405 Method Not Allowed. + .Request ---- DELETE /groups/MyProject-Committers/groups/MyGroup HTTP/1.0 @@ -1445,7 +1518,9 @@ The group member that is added/removed. If `type` is `ADD_USER` or `REMOVE_USER` the member is returned as detailed link:rest-api-accounts.html#account-info[AccountInfo] entity, if `type` is `ADD_GROUP` or `REMOVE_GROUP` the member is returned as -link:#group-info[GroupInfo] entity. +link:#group-info[GroupInfo] entity. Note that the `name` in +link:#group-info[GroupInfo] will not be set if the member group is not +available. |`type` | The event type, can be: `ADD_USER`, `REMOVE_USER`, `ADD_GROUP` or `REMOVE_GROUP`. |