Edwin Kempin | 2eebd14 | 2013-03-06 15:28:34 +0100 | [diff] [blame] | 1 | Gerrit Code Review - /groups/ REST API |
| 2 | ====================================== |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 3 | |
| 4 | This page describes the group related REST endpoints. |
| 5 | Please also take note of the general information on the |
| 6 | link:rest-api.html[REST API]. |
| 7 | |
Edwin Kempin | 578fff7 | 2013-02-11 08:08:27 +0100 | [diff] [blame] | 8 | [[group-endpoints]] |
| 9 | Group Endpoints |
| 10 | --------------- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 11 | |
Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 12 | [[list-groups]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 13 | List Groups |
| 14 | ~~~~~~~~~~~ |
| 15 | [verse] |
| 16 | 'GET /groups/' |
| 17 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 18 | Lists the groups accessible by the caller. This is the same as |
| 19 | using the link:cmd-ls-groups.html[ls-groups] command over SSH, |
| 20 | and accepts the same options as query parameters. |
| 21 | |
Edwin Kempin | 987d543 | 2013-02-04 10:20:44 +0100 | [diff] [blame] | 22 | As result a map is returned that maps the group names to |
| 23 | link:#group-info[GroupInfo] entries. The entries in the map are sorted |
| 24 | by group name. |
| 25 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 26 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 27 | ---- |
| 28 | GET /groups/ HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 29 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 30 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 31 | .Response |
| 32 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 33 | HTTP/1.1 200 OK |
| 34 | Content-Disposition: attachment |
| 35 | Content-Type: application/json;charset=UTF-8 |
| 36 | |
| 37 | )]}' |
| 38 | { |
| 39 | "Administrators": { |
| 40 | "kind": "gerritcodereview#group", |
| 41 | "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389", |
Edwin Kempin | e05c964 | 2013-02-11 09:36:21 +0100 | [diff] [blame] | 42 | "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389", |
| 43 | "options": { |
Edwin Kempin | e05c964 | 2013-02-11 09:36:21 +0100 | [diff] [blame] | 44 | }, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 45 | "description": "Gerrit Site Administrators", |
| 46 | "group_id": 1, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 47 | "owner": "Administrators", |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 48 | "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389" |
| 49 | }, |
| 50 | "Anonymous Users": { |
| 51 | "kind": "gerritcodereview#group", |
| 52 | "id": "global%3AAnonymous-Users", |
Edwin Kempin | e05c964 | 2013-02-11 09:36:21 +0100 | [diff] [blame] | 53 | "url": "#/admin/groups/uuid-global%3AAnonymous-Users", |
| 54 | "options": { |
Edwin Kempin | e05c964 | 2013-02-11 09:36:21 +0100 | [diff] [blame] | 55 | }, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 56 | "description": "Any user, signed-in or not", |
| 57 | "group_id": 2, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 58 | "owner": "Administrators", |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 59 | "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389" |
| 60 | }, |
| 61 | "MyProject_Committers": { |
| 62 | "kind": "gerritcodereview#group", |
| 63 | "id": "834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7", |
Edwin Kempin | e05c964 | 2013-02-11 09:36:21 +0100 | [diff] [blame] | 64 | "url": "#/admin/groups/uuid-834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7", |
| 65 | "options": { |
Edwin Kempin | e05c964 | 2013-02-11 09:36:21 +0100 | [diff] [blame] | 66 | "visible_to_all": true, |
| 67 | }, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 68 | "group_id": 6, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 69 | "owner": "MyProject_Committers", |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 70 | "owner_id": "834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7" |
| 71 | }, |
| 72 | "Non-Interactive Users": { |
| 73 | "kind": "gerritcodereview#group", |
| 74 | "id": "5057f3cbd3519d6ab69364429a89ffdffba50f73", |
Edwin Kempin | e05c964 | 2013-02-11 09:36:21 +0100 | [diff] [blame] | 75 | "url": "#/admin/groups/uuid-5057f3cbd3519d6ab69364429a89ffdffba50f73", |
| 76 | "options": { |
Edwin Kempin | e05c964 | 2013-02-11 09:36:21 +0100 | [diff] [blame] | 77 | }, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 78 | "description": "Users who perform batch actions on Gerrit", |
| 79 | "group_id": 4, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 80 | "owner": "Administrators", |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 81 | "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389" |
| 82 | }, |
| 83 | "Project Owners": { |
| 84 | "kind": "gerritcodereview#group", |
| 85 | "id": "global%3AProject-Owners", |
Edwin Kempin | e05c964 | 2013-02-11 09:36:21 +0100 | [diff] [blame] | 86 | "url": "#/admin/groups/uuid-global%3AProject-Owners", |
| 87 | "options": { |
Edwin Kempin | e05c964 | 2013-02-11 09:36:21 +0100 | [diff] [blame] | 88 | }, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 89 | "description": "Any owner of the project", |
| 90 | "group_id": 5, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 91 | "owner": "Administrators", |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 92 | "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389" |
| 93 | }, |
| 94 | "Registered Users": { |
| 95 | "kind": "gerritcodereview#group", |
| 96 | "id": "global%3ARegistered-Users", |
Edwin Kempin | e05c964 | 2013-02-11 09:36:21 +0100 | [diff] [blame] | 97 | "url": "#/admin/groups/uuid-global%3ARegistered-Users", |
| 98 | "options": { |
Edwin Kempin | e05c964 | 2013-02-11 09:36:21 +0100 | [diff] [blame] | 99 | }, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 100 | "description": "Any signed-in user", |
| 101 | "group_id": 3, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 102 | "owner": "Administrators", |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 103 | "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389" |
| 104 | } |
| 105 | } |
| 106 | ---- |
| 107 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 108 | .Get all groups |
| 109 | **** |
| 110 | get::/groups/ |
| 111 | **** |
| 112 | |
Edwin Kempin | abaab546 | 2013-02-11 15:30:19 +0100 | [diff] [blame] | 113 | [[group-options]] |
| 114 | Group Options |
| 115 | ^^^^^^^^^^^^^ |
| 116 | Additional fields can be obtained by adding `o` parameters, each option |
| 117 | requires more lookups and slows down the query response time to the |
| 118 | client so they are generally disabled by default. Optional fields are: |
| 119 | |
| 120 | [[includes]] |
| 121 | -- |
| 122 | * `INCLUDES`: include list of directly included groups. |
| 123 | -- |
| 124 | |
| 125 | [[members]] |
| 126 | -- |
| 127 | * `MEMBERS`: include list of direct group members. |
| 128 | -- |
| 129 | |
Edwin Kempin | a3b4b63 | 2013-02-11 10:33:55 +0100 | [diff] [blame] | 130 | Check if a group is owned by the calling user |
| 131 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 132 | By setting the option `owned` and specifying a group to inspect with |
| 133 | the option `q`, it is possible to find out, if this group is owned by |
| 134 | the calling user. |
| 135 | |
| 136 | .Request |
| 137 | ---- |
| 138 | GET /groups/?owned&q=MyProject-Committers HTTP/1.0 |
| 139 | ---- |
| 140 | |
| 141 | If the group is owned by the calling user, the returned map contains |
| 142 | this group. If the calling user doesn't own this group an empty map is |
| 143 | returned. |
| 144 | |
| 145 | .Response |
| 146 | ---- |
| 147 | HTTP/1.1 200 OK |
| 148 | Content-Disposition: attachment |
| 149 | Content-Type: application/json;charset=UTF-8 |
| 150 | |
| 151 | )]}' |
| 152 | { |
| 153 | "MyProject-Committers": { |
| 154 | "kind": "gerritcodereview#group", |
| 155 | "id": "9999c971bb4ab872aab759d8c49833ee6b9ff320", |
Edwin Kempin | a3b4b63 | 2013-02-11 10:33:55 +0100 | [diff] [blame] | 156 | "url": "#/admin/groups/uuid-9999c971bb4ab872aab759d8c49833ee6b9ff320", |
| 157 | "options": { |
Edwin Kempin | a3b4b63 | 2013-02-11 10:33:55 +0100 | [diff] [blame] | 158 | "visible_to_all": true |
| 159 | }, |
| 160 | "description":"contains all committers for MyProject", |
| 161 | "group_id": 551, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 162 | "owner": "MyProject-Owners", |
Edwin Kempin | a3b4b63 | 2013-02-11 10:33:55 +0100 | [diff] [blame] | 163 | "owner_id": "7ca042f4d5847936fcb90ca91057673157fd06fc" |
| 164 | } |
| 165 | } |
| 166 | ---- |
| 167 | |
Anthony Chin | dc78329 | 2014-04-10 11:14:41 -0400 | [diff] [blame^] | 168 | [[group-limit]] |
| 169 | ==== Group Limit |
| 170 | The `/groups/` URL also accepts a limit integer in the `n` parameter. |
| 171 | This limits the results to show `n` groups. |
| 172 | |
| 173 | Query the first 25 groups in group list. |
| 174 | ---- |
| 175 | GET /groups/?n=25 HTTP/1.0 |
| 176 | ---- |
| 177 | |
| 178 | The `/groups/` URL also accepts a start integer in the `S` parameter. |
| 179 | The results will skip `S` groups from group list. |
| 180 | |
| 181 | Query 25 groups starting from index 50. |
| 182 | ---- |
| 183 | GET /groups/?n=25&S=50 HTTP/1.0 |
| 184 | ---- |
| 185 | |
Edwin Kempin | a5cc112 | 2013-02-11 09:26:20 +0100 | [diff] [blame] | 186 | [[get-group]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 187 | Get Group |
| 188 | ~~~~~~~~~ |
| 189 | [verse] |
| 190 | 'GET /groups/link:#group-id[\{group-id\}]' |
| 191 | |
Edwin Kempin | a5cc112 | 2013-02-11 09:26:20 +0100 | [diff] [blame] | 192 | Retrieves a group. |
| 193 | |
| 194 | .Request |
| 195 | ---- |
| 196 | GET /groups/6a1e70e1a88782771a91808c8af9bbb7a9871389 HTTP/1.0 |
| 197 | ---- |
| 198 | |
| 199 | As response a link:#group-info[GroupInfo] entity is returned that |
| 200 | describes the group. |
| 201 | |
| 202 | .Response |
| 203 | ---- |
| 204 | HTTP/1.1 200 OK |
| 205 | Content-Disposition: attachment |
| 206 | Content-Type: application/json;charset=UTF-8 |
| 207 | |
| 208 | )]}' |
| 209 | { |
| 210 | "kind": "gerritcodereview#group", |
| 211 | "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389", |
| 212 | "name": "Administrators", |
| 213 | "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389", |
| 214 | "options": { |
Edwin Kempin | a5cc112 | 2013-02-11 09:26:20 +0100 | [diff] [blame] | 215 | }, |
| 216 | "description": "Gerrit Site Administrators", |
| 217 | "group_id": 1, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 218 | "owner": "Administrators", |
Edwin Kempin | a5cc112 | 2013-02-11 09:26:20 +0100 | [diff] [blame] | 219 | "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389" |
| 220 | } |
| 221 | ---- |
| 222 | |
Edwin Kempin | 578fff7 | 2013-02-11 08:08:27 +0100 | [diff] [blame] | 223 | [[create-group]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 224 | Create Group |
| 225 | ~~~~~~~~~~~~ |
| 226 | [verse] |
| 227 | 'PUT /groups/link:#group-name[\{group-name\}]' |
| 228 | |
Edwin Kempin | 578fff7 | 2013-02-11 08:08:27 +0100 | [diff] [blame] | 229 | Creates a new Gerrit internal group. |
| 230 | |
| 231 | In the request body additional data for the group can be provided as |
| 232 | link:#group-input[GroupInput]. |
| 233 | |
| 234 | .Request |
| 235 | ---- |
| 236 | PUT /groups/MyProject-Committers HTTP/1.0 |
| 237 | Content-Type: application/json;charset=UTF-8 |
| 238 | |
| 239 | { |
| 240 | "description": "contains all committers for MyProject", |
| 241 | "visible_to_all": true, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 242 | "owner": "MyProject-Owners", |
Edwin Kempin | 578fff7 | 2013-02-11 08:08:27 +0100 | [diff] [blame] | 243 | "owner_id": "7ca042f4d5847936fcb90ca91057673157fd06fc" |
| 244 | } |
| 245 | ---- |
| 246 | |
| 247 | As response the link:#group-info[GroupInfo] entity is returned that |
| 248 | describes the created group. |
| 249 | |
| 250 | .Response |
| 251 | ---- |
| 252 | HTTP/1.1 201 Created |
| 253 | Content-Disposition: attachment |
| 254 | Content-Type: application/json;charset=UTF-8 |
| 255 | |
| 256 | )]}' |
| 257 | { |
| 258 | "kind": "gerritcodereview#group", |
| 259 | "id": "9999c971bb4ab872aab759d8c49833ee6b9ff320", |
| 260 | "name": "MyProject-Committers", |
| 261 | "url": "#/admin/groups/uuid-9999c971bb4ab872aab759d8c49833ee6b9ff320", |
| 262 | "options": { |
Edwin Kempin | 578fff7 | 2013-02-11 08:08:27 +0100 | [diff] [blame] | 263 | "visible_to_all": true |
| 264 | }, |
| 265 | "description":"contains all committers for MyProject", |
| 266 | "group_id": 551, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 267 | "owner": "MyProject-Owners", |
Edwin Kempin | 578fff7 | 2013-02-11 08:08:27 +0100 | [diff] [blame] | 268 | "owner_id": "7ca042f4d5847936fcb90ca91057673157fd06fc" |
| 269 | } |
| 270 | ---- |
| 271 | |
Edwin Kempin | 0aa2710 | 2013-02-27 16:44:16 +0100 | [diff] [blame] | 272 | If the group creation fails because the name is already in use the |
| 273 | response is "`409 Conflict`". |
| 274 | |
Edwin Kempin | abaab546 | 2013-02-11 15:30:19 +0100 | [diff] [blame] | 275 | [[get-group-detail]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 276 | Get Group Detail |
| 277 | ~~~~~~~~~~~~~~~~ |
| 278 | [verse] |
| 279 | 'GET /groups/link:#group-id[\{group-id\}]/detail' |
| 280 | |
Edwin Kempin | abaab546 | 2013-02-11 15:30:19 +0100 | [diff] [blame] | 281 | Retrieves a group with the direct link:#members[members] and the |
| 282 | directly link:#includes[included groups]. |
| 283 | |
| 284 | .Request |
| 285 | ---- |
| 286 | GET /groups/6a1e70e1a88782771a91808c8af9bbb7a9871389/detail HTTP/1.0 |
| 287 | ---- |
| 288 | |
| 289 | As response a link:#group-info[GroupInfo] entity is returned that |
| 290 | describes the group. |
| 291 | |
| 292 | .Response |
| 293 | ---- |
| 294 | HTTP/1.1 200 OK |
| 295 | Content-Disposition: attachment |
| 296 | Content-Type: application/json;charset=UTF-8 |
| 297 | |
| 298 | )]}' |
| 299 | { |
| 300 | "kind": "gerritcodereview#group", |
| 301 | "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389", |
| 302 | "name": "Administrators", |
| 303 | "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389", |
| 304 | "options": { |
| 305 | }, |
| 306 | "description": "Gerrit Site Administrators", |
| 307 | "group_id": 1, |
| 308 | "owner": "Administrators", |
| 309 | "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389", |
| 310 | "members": [ |
| 311 | { |
Edwin Kempin | 51284e6 | 2013-03-05 15:26:41 +0100 | [diff] [blame] | 312 | "_account_id": 1000097, |
| 313 | "name": "Jane Roe", |
James Ring | 8e34272 | 2013-05-01 01:40:53 -0700 | [diff] [blame] | 314 | "email": "jane.roe@example.com", |
| 315 | "username": "jane" |
Edwin Kempin | abaab546 | 2013-02-11 15:30:19 +0100 | [diff] [blame] | 316 | }, |
| 317 | { |
Edwin Kempin | 51284e6 | 2013-03-05 15:26:41 +0100 | [diff] [blame] | 318 | "_account_id": 1000096, |
| 319 | "name": "John Doe", |
| 320 | "email": "john.doe@example.com" |
James Ring | 8e34272 | 2013-05-01 01:40:53 -0700 | [diff] [blame] | 321 | "username": "john" |
Edwin Kempin | abaab546 | 2013-02-11 15:30:19 +0100 | [diff] [blame] | 322 | } |
| 323 | ], |
| 324 | "includes": [] |
| 325 | } |
| 326 | ---- |
| 327 | |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 328 | [[get-group-name]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 329 | Get Group Name |
| 330 | ~~~~~~~~~~~~~~ |
| 331 | [verse] |
| 332 | 'GET /groups/link:#group-id[\{group-id\}]/name' |
| 333 | |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 334 | Retrieves the name of a group. |
| 335 | |
| 336 | .Request |
| 337 | ---- |
| 338 | GET /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/name HTTP/1.0 |
| 339 | ---- |
| 340 | |
| 341 | .Response |
| 342 | ---- |
| 343 | HTTP/1.1 200 OK |
| 344 | Content-Disposition: attachment |
| 345 | Content-Type: application/json;charset=UTF-8 |
| 346 | |
| 347 | )]}' |
| 348 | "MyProject-Committers" |
| 349 | ---- |
| 350 | |
| 351 | [[rename-group]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 352 | Rename Group |
| 353 | ~~~~~~~~~~~~ |
| 354 | [verse] |
| 355 | 'PUT /groups/link:#group-id[\{group-id\}]/name' |
| 356 | |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 357 | Renames a Gerrit internal group. |
| 358 | |
| 359 | The new group name must be provided in the request body. |
| 360 | |
| 361 | .Request |
| 362 | ---- |
| 363 | PUT /groups/MyProject-Committers/name HTTP/1.0 |
| 364 | Content-Type: application/json;charset=UTF-8 |
| 365 | |
| 366 | { |
| 367 | "name": "My-Project-Committers" |
| 368 | } |
| 369 | ---- |
| 370 | |
| 371 | As response the new group name is returned. |
| 372 | |
| 373 | .Response |
| 374 | ---- |
| 375 | HTTP/1.1 200 OK |
| 376 | Content-Disposition: attachment |
| 377 | Content-Type: application/json;charset=UTF-8 |
| 378 | |
| 379 | )]}' |
| 380 | "My-Project-Committers" |
| 381 | ---- |
| 382 | |
Edwin Kempin | 0aa2710 | 2013-02-27 16:44:16 +0100 | [diff] [blame] | 383 | If renaming the group fails because the new name is already in use the |
| 384 | response is "`409 Conflict`". |
| 385 | |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 386 | [[get-group-description]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 387 | Get Group Description |
| 388 | ~~~~~~~~~~~~~~~~~~~~~ |
| 389 | [verse] |
| 390 | 'GET /groups/link:#group-id[\{group-id\}]/description' |
| 391 | |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 392 | Retrieves the description of a group. |
| 393 | |
| 394 | .Request |
| 395 | ---- |
| 396 | GET /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/description HTTP/1.0 |
| 397 | ---- |
| 398 | |
| 399 | .Response |
| 400 | ---- |
| 401 | HTTP/1.1 200 OK |
| 402 | Content-Disposition: attachment |
| 403 | Content-Type: application/json;charset=UTF-8 |
| 404 | |
| 405 | )]}' |
| 406 | "contains all committers for MyProject" |
| 407 | ---- |
| 408 | |
Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 409 | If the group does not have a description an empty string is returned. |
| 410 | |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 411 | [[set-group-description]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 412 | Set Group Description |
| 413 | ~~~~~~~~~~~~~~~~~~~~~ |
| 414 | [verse] |
| 415 | 'PUT /groups/link:#group-id[\{group-id\}]/description' |
| 416 | |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 417 | Sets the description of a Gerrit internal group. |
| 418 | |
| 419 | The new group description must be provided in the request body. |
| 420 | |
| 421 | .Request |
| 422 | ---- |
| 423 | PUT /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/description HTTP/1.0 |
| 424 | Content-Type: application/json;charset=UTF-8 |
| 425 | |
| 426 | { |
| 427 | "description": "The committers of MyProject." |
| 428 | } |
| 429 | ---- |
| 430 | |
| 431 | As response the new group description is returned. |
| 432 | |
| 433 | .Response |
| 434 | ---- |
| 435 | HTTP/1.1 200 OK |
| 436 | Content-Disposition: attachment |
| 437 | Content-Type: application/json;charset=UTF-8 |
| 438 | |
| 439 | )]}' |
| 440 | "The committers of MyProject." |
| 441 | ---- |
| 442 | |
Edwin Kempin | 114ab16 | 2013-02-28 09:25:37 +0100 | [diff] [blame] | 443 | If the description was deleted the response is "`204 No Content`". |
| 444 | |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 445 | [[delete-group-description]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 446 | Delete Group Description |
| 447 | ~~~~~~~~~~~~~~~~~~~~~~~~ |
| 448 | [verse] |
| 449 | 'DELETE /groups/link:#group-id[\{group-id\}]/description' |
| 450 | |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 451 | Deletes the description of a Gerrit internal group. |
| 452 | |
| 453 | .Request |
| 454 | ---- |
| 455 | DELETE /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/description HTTP/1.0 |
| 456 | ---- |
| 457 | |
| 458 | .Response |
| 459 | ---- |
| 460 | HTTP/1.1 204 No Content |
| 461 | ---- |
| 462 | |
| 463 | [[get-group-options]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 464 | Get Group Options |
| 465 | ~~~~~~~~~~~~~~~~~ |
| 466 | [verse] |
| 467 | 'GET /groups/link:#group-id[\{group-id\}]/options' |
| 468 | |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 469 | Retrieves the options of a group. |
| 470 | |
| 471 | .Request |
| 472 | ---- |
| 473 | GET /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/options HTTP/1.0 |
| 474 | ---- |
| 475 | |
| 476 | As response a link:#group-options-info[GroupOptionsInfo] entity is |
| 477 | returned that describes the options of the group. |
| 478 | |
| 479 | .Response |
| 480 | ---- |
| 481 | HTTP/1.1 200 OK |
| 482 | Content-Disposition: attachment |
| 483 | Content-Type: application/json;charset=UTF-8 |
| 484 | |
| 485 | )]}' |
| 486 | { |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 487 | "visible_to_all": true |
| 488 | } |
| 489 | ---- |
| 490 | |
| 491 | [[set-group-options]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 492 | Set Group Options |
| 493 | ~~~~~~~~~~~~~~~~~ |
| 494 | [verse] |
| 495 | 'PUT /groups/link:#group-id[\{group-id\}]/options' |
| 496 | |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 497 | Sets the options of a Gerrit internal group. |
| 498 | |
| 499 | The new group options must be provided in the request body as a |
| 500 | link:#group-options-input[GroupOptionsInput] entity. |
| 501 | |
| 502 | .Request |
| 503 | ---- |
| 504 | PUT /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/options HTTP/1.0 |
| 505 | Content-Type: application/json;charset=UTF-8 |
| 506 | |
| 507 | { |
| 508 | "visible_to_all": true |
| 509 | } |
| 510 | ---- |
| 511 | |
| 512 | As response the new group options are returned as a |
| 513 | link:#group-options-info[GroupOptionsInfo] entity. |
| 514 | |
| 515 | .Response |
| 516 | ---- |
| 517 | HTTP/1.1 200 OK |
| 518 | Content-Disposition: attachment |
| 519 | Content-Type: application/json;charset=UTF-8 |
| 520 | |
| 521 | )]}' |
| 522 | { |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 523 | "visible_to_all": true |
| 524 | } |
| 525 | ---- |
| 526 | |
| 527 | [[get-group-owner]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 528 | Get Group Owner |
| 529 | ~~~~~~~~~~~~~~~ |
| 530 | [verse] |
| 531 | 'GET /groups/link:#group-id[\{group-id\}]/owner' |
| 532 | |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 533 | Retrieves the owner group of a Gerrit internal group. |
| 534 | |
| 535 | .Request |
| 536 | ---- |
| 537 | GET /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/owner HTTP/1.0 |
| 538 | ---- |
| 539 | |
| 540 | As response a link:#group-info[GroupInfo] entity is returned that |
| 541 | describes the owner group. |
| 542 | |
| 543 | .Response |
| 544 | ---- |
| 545 | HTTP/1.1 200 OK |
| 546 | Content-Disposition: attachment |
| 547 | Content-Type: application/json;charset=UTF-8 |
| 548 | |
| 549 | )]}' |
| 550 | { |
| 551 | "kind": "gerritcodereview#group", |
| 552 | "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389", |
| 553 | "name": "Administrators", |
| 554 | "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389", |
| 555 | "options": { |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 556 | }, |
| 557 | "description": "Gerrit Site Administrators", |
| 558 | "group_id": 1, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 559 | "owner": "Administrators", |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 560 | "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389" |
| 561 | } |
| 562 | ---- |
| 563 | |
| 564 | [[set-group-owner]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 565 | Set Group Owner |
| 566 | ~~~~~~~~~~~~~~~ |
| 567 | [verse] |
| 568 | 'PUT /groups/link:#group-id[\{group-id\}]/owner' |
| 569 | |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 570 | Sets the owner group of a Gerrit internal group. |
| 571 | |
| 572 | The new owner group must be provided in the request body. |
| 573 | |
Edwin Kempin | c977090 | 2013-02-15 15:38:03 +0100 | [diff] [blame] | 574 | The new owner can be specified by name, by group UUID or by the legacy |
| 575 | numeric group ID. |
| 576 | |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 577 | .Request |
| 578 | ---- |
| 579 | PUT /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/description HTTP/1.0 |
| 580 | Content-Type: application/json;charset=UTF-8 |
| 581 | |
| 582 | { |
| 583 | "owner": "6a1e70e1a88782771a91808c8af9bbb7a9871389" |
| 584 | } |
| 585 | ---- |
| 586 | |
| 587 | As response a link:#group-info[GroupInfo] entity is returned that |
| 588 | describes the new owner group. |
| 589 | |
| 590 | .Response |
| 591 | ---- |
| 592 | HTTP/1.1 200 OK |
| 593 | Content-Disposition: attachment |
| 594 | Content-Type: application/json;charset=UTF-8 |
| 595 | |
| 596 | )]}' |
| 597 | { |
| 598 | "kind": "gerritcodereview#group", |
| 599 | "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389", |
| 600 | "name": "Administrators", |
| 601 | "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389", |
| 602 | "options": { |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 603 | }, |
| 604 | "description": "Gerrit Site Administrators", |
| 605 | "group_id": 1, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 606 | "owner": "Administrators", |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 607 | "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389" |
| 608 | } |
| 609 | ---- |
| 610 | |
Edwin Kempin | 578fff7 | 2013-02-11 08:08:27 +0100 | [diff] [blame] | 611 | [[group-member-endpoints]] |
| 612 | Group Member Endpoints |
| 613 | ---------------------- |
| 614 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 615 | [[group-members]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 616 | List Group Members |
| 617 | ~~~~~~~~~~~~~~~~~~ |
| 618 | [verse] |
| 619 | 'GET /groups/link:#group-id[\{group-id\}]/members/' |
| 620 | |
Edwin Kempin | 2dc5edc | 2013-02-11 15:57:36 +0100 | [diff] [blame] | 621 | Lists the direct members of a Gerrit internal group. |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 622 | |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 623 | As result a list of detailed link:rest-api-accounts.html#account-info[ |
| 624 | AccountInfo] entries is returned. The entries in the list are sorted by |
| 625 | full name, preferred email and id. |
Edwin Kempin | 4156d6e0 | 2013-02-04 15:10:39 +0100 | [diff] [blame] | 626 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 627 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 628 | ---- |
| 629 | GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/members/ HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 630 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 631 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 632 | .Response |
| 633 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 634 | HTTP/1.1 200 OK |
| 635 | Content-Disposition: attachment |
| 636 | Content-Type: application/json;charset=UTF-8 |
| 637 | |
| 638 | )]}' |
| 639 | [ |
| 640 | { |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 641 | "_account_id": 1000097, |
| 642 | "name": "Jane Roe", |
James Ring | 8e34272 | 2013-05-01 01:40:53 -0700 | [diff] [blame] | 643 | "email": "jane.roe@example.com", |
| 644 | "username": "jane" |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 645 | }, |
| 646 | { |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 647 | "_account_id": 1000096, |
| 648 | "name": "John Doe", |
James Ring | 8e34272 | 2013-05-01 01:40:53 -0700 | [diff] [blame] | 649 | "email": "john.doe@example.com", |
| 650 | "username": "john" |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 651 | } |
| 652 | ] |
| 653 | ---- |
| 654 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 655 | .Get all members of the 'Administrators' group (normally group id = 1) |
| 656 | **** |
| 657 | get::/groups/1/members/ |
| 658 | **** |
| 659 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 660 | To resolve the included groups of a group recursively and to list all |
| 661 | members the parameter `recursive` can be set. |
| 662 | |
Edwin Kempin | d54de1c | 2013-03-08 16:37:14 +0100 | [diff] [blame] | 663 | Members from included external groups and from included groups which |
| 664 | are not visible to the calling user are ignored. |
| 665 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 666 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 667 | ---- |
| 668 | GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/members/?recursive HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 669 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 670 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 671 | .Response |
| 672 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 673 | HTTP/1.1 200 OK |
| 674 | Content-Disposition: attachment |
| 675 | Content-Type: application/json;charset=UTF-8 |
| 676 | |
| 677 | )]}' |
| 678 | [ |
| 679 | { |
Edwin Kempin | 3e22d48 | 2013-03-05 15:35:25 +0100 | [diff] [blame] | 680 | "_account_id": 1000097, |
| 681 | "name": "Jane Roe", |
James Ring | 8e34272 | 2013-05-01 01:40:53 -0700 | [diff] [blame] | 682 | "email": "jane.roe@example.com", |
| 683 | "username": "jane" |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 684 | }, |
| 685 | { |
Edwin Kempin | 3e22d48 | 2013-03-05 15:35:25 +0100 | [diff] [blame] | 686 | "_account_id": 1000096, |
| 687 | "name": "John Doe", |
James Ring | 8e34272 | 2013-05-01 01:40:53 -0700 | [diff] [blame] | 688 | "email": "john.doe@example.com", |
| 689 | "username": "john" |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 690 | }, |
| 691 | { |
Edwin Kempin | 3e22d48 | 2013-03-05 15:35:25 +0100 | [diff] [blame] | 692 | "_account_id": 1000098, |
| 693 | "name": "Richard Roe", |
James Ring | 8e34272 | 2013-05-01 01:40:53 -0700 | [diff] [blame] | 694 | "email": "richard.roe@example.com", |
| 695 | "username": "rroe" |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 696 | } |
| 697 | ] |
| 698 | ---- |
| 699 | |
Edwin Kempin | a5cc112 | 2013-02-11 09:26:20 +0100 | [diff] [blame] | 700 | [[get-group-member]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 701 | Get Group Member |
| 702 | ~~~~~~~~~~~~~~~~ |
| 703 | [verse] |
| 704 | 'GET /groups/link:#group-id[\{group-id\}]/members/link:rest-api-accounts.html#account-id[\{account-id\}]' |
| 705 | |
Edwin Kempin | a5cc112 | 2013-02-11 09:26:20 +0100 | [diff] [blame] | 706 | Retrieves a group member. |
| 707 | |
| 708 | .Request |
| 709 | ---- |
| 710 | GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/members/1000096 HTTP/1.0 |
| 711 | ---- |
| 712 | |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 713 | As response a detailed link:rest-api-accounts.html#account-info[ |
| 714 | AccountInfo] entity is returned that describes the group member. |
Edwin Kempin | a5cc112 | 2013-02-11 09:26:20 +0100 | [diff] [blame] | 715 | |
| 716 | .Response |
| 717 | ---- |
| 718 | HTTP/1.1 200 OK |
| 719 | Content-Disposition: attachment |
| 720 | Content-Type: application/json;charset=UTF-8 |
| 721 | |
| 722 | )]}' |
| 723 | { |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 724 | "_account_id": 1000096, |
| 725 | "name": "John Doe", |
James Ring | 8e34272 | 2013-05-01 01:40:53 -0700 | [diff] [blame] | 726 | "email": "john.doe@example.com", |
| 727 | "username": "john" |
Edwin Kempin | a5cc112 | 2013-02-11 09:26:20 +0100 | [diff] [blame] | 728 | } |
| 729 | ---- |
| 730 | |
Edwin Kempin | a5d6ead | 2013-02-06 10:59:06 +0100 | [diff] [blame] | 731 | [[add-group-member]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 732 | Add Group Member |
| 733 | ~~~~~~~~~~~~~~~~ |
| 734 | [verse] |
| 735 | 'PUT /groups/link:#group-id[\{group-id\}]/members/link:rest-api-accounts.html#account-id[\{account-id\}]' |
| 736 | |
Edwin Kempin | a5d6ead | 2013-02-06 10:59:06 +0100 | [diff] [blame] | 737 | Adds a user as member to a Gerrit internal group. |
| 738 | |
| 739 | .Request |
| 740 | ---- |
| 741 | PUT /groups/MyProject-Committers/members/John%20Doe HTTP/1.0 |
| 742 | ---- |
| 743 | |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 744 | As response a detailed link:rest-api-accounts.html#account-info[ |
| 745 | AccountInfo] entity is returned that describes the group member. |
Edwin Kempin | a5d6ead | 2013-02-06 10:59:06 +0100 | [diff] [blame] | 746 | |
| 747 | .Response |
| 748 | ---- |
| 749 | HTTP/1.1 201 Created |
| 750 | Content-Disposition: attachment |
| 751 | Content-Type: application/json;charset=UTF-8 |
| 752 | |
| 753 | )]}' |
| 754 | { |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 755 | "_account_id": 1000037, |
| 756 | "name": "John Doe", |
James Ring | 8e34272 | 2013-05-01 01:40:53 -0700 | [diff] [blame] | 757 | "email": "john.doe@example.com", |
| 758 | "username": "john" |
Edwin Kempin | a5d6ead | 2013-02-06 10:59:06 +0100 | [diff] [blame] | 759 | } |
| 760 | ---- |
| 761 | |
| 762 | The request also succeeds if the user is already a member of this |
| 763 | group, but then the HTTP response code is `200 OK`. |
| 764 | |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 765 | Add Group Members |
| 766 | ~~~~~~~~~~~~~~~~~ |
| 767 | [verse] |
| 768 | 'POST /groups/link:#group-id[\{group-id\}]/members' |
Edwin Kempin | 2cdef5f | 2013-02-06 16:50:15 +0100 | [diff] [blame] | 769 | |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 770 | OR |
| 771 | |
| 772 | [verse] |
| 773 | 'POST /groups/link:#group-id[\{group-id\}]/members.add' |
| 774 | |
Edwin Kempin | 2cdef5f | 2013-02-06 16:50:15 +0100 | [diff] [blame] | 775 | Adds one or several users to a Gerrit internal group. |
| 776 | |
| 777 | The users to be added to the group must be provided in the request body |
Sasa Zivkov | 737e0a3 | 2013-03-18 14:21:42 +0100 | [diff] [blame] | 778 | as a link:#members-input[MembersInput] entity. |
Edwin Kempin | 2cdef5f | 2013-02-06 16:50:15 +0100 | [diff] [blame] | 779 | |
| 780 | .Request |
| 781 | ---- |
| 782 | POST /groups/MyProject-Committers/members.add HTTP/1.0 |
| 783 | Content-Type: application/json;charset=UTF-8 |
| 784 | |
| 785 | { |
Chris St. Pierre | b39fb9e | 2013-08-06 15:55:00 -0400 | [diff] [blame] | 786 | "members": [ |
Edwin Kempin | 2cdef5f | 2013-02-06 16:50:15 +0100 | [diff] [blame] | 787 | "jane.roe@example.com", |
| 788 | "john.doe@example.com" |
Chris St. Pierre | b39fb9e | 2013-08-06 15:55:00 -0400 | [diff] [blame] | 789 | ] |
Edwin Kempin | 2cdef5f | 2013-02-06 16:50:15 +0100 | [diff] [blame] | 790 | } |
| 791 | ---- |
| 792 | |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 793 | As response a list of detailed link:rest-api-accounts.html#account-info[ |
| 794 | AccountInfo] entities is returned that describes the group members that |
Sasa Zivkov | 737e0a3 | 2013-03-18 14:21:42 +0100 | [diff] [blame] | 795 | were specified in the link:#members-input[MembersInput]. An |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 796 | link:rest-api-accounts.html#account-info[AccountInfo] entity |
Edwin Kempin | 2cdef5f | 2013-02-06 16:50:15 +0100 | [diff] [blame] | 797 | is returned for each user specified in the input, independently of |
| 798 | whether the user was newly added to the group or whether the user was |
| 799 | already a member of the group. |
| 800 | |
| 801 | .Response |
| 802 | ---- |
| 803 | HTTP/1.1 200 OK |
| 804 | Content-Disposition: attachment |
| 805 | Content-Type: application/json;charset=UTF-8 |
| 806 | |
| 807 | )]}' |
| 808 | [ |
| 809 | { |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 810 | "_account_id": 1000057, |
| 811 | "name": "Jane Roe", |
James Ring | 8e34272 | 2013-05-01 01:40:53 -0700 | [diff] [blame] | 812 | "email": "jane.roe@example.com", |
| 813 | "username": "jane" |
Edwin Kempin | 2cdef5f | 2013-02-06 16:50:15 +0100 | [diff] [blame] | 814 | }, |
| 815 | { |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 816 | "_account_id": 1000037, |
| 817 | "name": "John Doe", |
James Ring | 8e34272 | 2013-05-01 01:40:53 -0700 | [diff] [blame] | 818 | "email": "john.doe@example.com", |
| 819 | "username": "john" |
Edwin Kempin | 2cdef5f | 2013-02-06 16:50:15 +0100 | [diff] [blame] | 820 | } |
| 821 | ] |
| 822 | ---- |
| 823 | |
Edwin Kempin | acbdfd3 | 2013-02-07 12:38:53 +0100 | [diff] [blame] | 824 | [[delete-group-member]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 825 | Delete Group Member |
| 826 | ~~~~~~~~~~~~~~~~~~~ |
| 827 | [verse] |
| 828 | 'DELETE /groups/link:#group-id[\{group-id\}]/members/link:rest-api-accounts.html#account-id[\{account-id\}]' |
| 829 | |
Edwin Kempin | acbdfd3 | 2013-02-07 12:38:53 +0100 | [diff] [blame] | 830 | Deletes a user from a Gerrit internal group. |
| 831 | |
| 832 | .Request |
| 833 | ---- |
| 834 | DELETE /groups/MyProject-Committers/members/John%20Doe HTTP/1.0 |
| 835 | ---- |
| 836 | |
| 837 | .Response |
| 838 | ---- |
| 839 | HTTP/1.1 204 No Content |
| 840 | ---- |
| 841 | |
| 842 | [[delete-group-members]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 843 | Delete Group Members |
| 844 | ~~~~~~~~~~~~~~~~~~~~ |
| 845 | [verse] |
| 846 | 'POST /groups/link:#group-id[\{group-id\}]/members.delete' |
| 847 | |
Edwin Kempin | acbdfd3 | 2013-02-07 12:38:53 +0100 | [diff] [blame] | 848 | Delete one or several users from a Gerrit internal group. |
| 849 | |
| 850 | The users to be deleted from the group must be provided in the request |
Sasa Zivkov | 737e0a3 | 2013-03-18 14:21:42 +0100 | [diff] [blame] | 851 | body as a link:#members-input[MembersInput] entity. |
Edwin Kempin | acbdfd3 | 2013-02-07 12:38:53 +0100 | [diff] [blame] | 852 | |
| 853 | .Request |
| 854 | ---- |
| 855 | POST /groups/MyProject-Committers/members.delete HTTP/1.0 |
| 856 | Content-Type: application/json;charset=UTF-8 |
| 857 | |
| 858 | { |
Chris St. Pierre | b39fb9e | 2013-08-06 15:55:00 -0400 | [diff] [blame] | 859 | "members": [ |
Edwin Kempin | acbdfd3 | 2013-02-07 12:38:53 +0100 | [diff] [blame] | 860 | "jane.roe@example.com", |
| 861 | "john.doe@example.com" |
Chris St. Pierre | b39fb9e | 2013-08-06 15:55:00 -0400 | [diff] [blame] | 862 | ] |
Edwin Kempin | acbdfd3 | 2013-02-07 12:38:53 +0100 | [diff] [blame] | 863 | } |
| 864 | ---- |
| 865 | |
| 866 | .Response |
| 867 | ---- |
| 868 | HTTP/1.1 204 No Content |
| 869 | ---- |
| 870 | |
Edwin Kempin | 578fff7 | 2013-02-11 08:08:27 +0100 | [diff] [blame] | 871 | [[group-include-endpoints]] |
| 872 | Group Include Endpoints |
| 873 | ----------------------- |
| 874 | |
| 875 | [[included-groups]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 876 | List Included Groups |
| 877 | ~~~~~~~~~~~~~~~~~~~~ |
| 878 | [verse] |
| 879 | 'GET /groups/link:#group-id[\{group-id\}]/groups/' |
| 880 | |
Edwin Kempin | 578fff7 | 2013-02-11 08:08:27 +0100 | [diff] [blame] | 881 | Lists the directly included groups of a group. |
| 882 | |
| 883 | As result a list of link:#group-info[GroupInfo] entries is returned. |
| 884 | The entries in the list are sorted by group name and UUID. |
| 885 | |
| 886 | .Request |
| 887 | ---- |
| 888 | GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/groups/ HTTP/1.0 |
| 889 | ---- |
| 890 | |
| 891 | .Response |
| 892 | ---- |
| 893 | HTTP/1.1 200 OK |
| 894 | Content-Disposition: attachment |
| 895 | Content-Type: application/json;charset=UTF-8 |
| 896 | |
| 897 | )]}' |
| 898 | [ |
| 899 | { |
| 900 | "kind": "gerritcodereview#group", |
| 901 | "id": "7ca042f4d5847936fcb90ca91057673157fd06fc", |
| 902 | "name": "MyProject-Verifiers", |
Edwin Kempin | e05c964 | 2013-02-11 09:36:21 +0100 | [diff] [blame] | 903 | "url": "#/admin/groups/uuid-7ca042f4d5847936fcb90ca91057673157fd06fc", |
| 904 | "options": { |
Edwin Kempin | e05c964 | 2013-02-11 09:36:21 +0100 | [diff] [blame] | 905 | }, |
Edwin Kempin | 578fff7 | 2013-02-11 08:08:27 +0100 | [diff] [blame] | 906 | "group_id": 38, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 907 | "owner": "MyProject-Verifiers", |
Edwin Kempin | 578fff7 | 2013-02-11 08:08:27 +0100 | [diff] [blame] | 908 | "owner_id": "7ca042f4d5847936fcb90ca91057673157fd06fc" |
| 909 | } |
| 910 | ] |
| 911 | ---- |
| 912 | |
Edwin Kempin | a5cc112 | 2013-02-11 09:26:20 +0100 | [diff] [blame] | 913 | [[get-included-group]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 914 | Get Included Group |
| 915 | ~~~~~~~~~~~~~~~~~~ |
| 916 | [verse] |
| 917 | 'GET /groups/link:#group-id[\{group-id\}]/groups/link:#group-id[\{group-id\}]' |
| 918 | |
Edwin Kempin | a5cc112 | 2013-02-11 09:26:20 +0100 | [diff] [blame] | 919 | Retrieves an included group. |
| 920 | |
| 921 | .Request |
| 922 | ---- |
| 923 | GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/groups/7ca042f4d5847936fcb90ca91057673157fd06fc HTTP/1.0 |
| 924 | ---- |
| 925 | |
| 926 | As response a link:#group-info[GroupInfo] entity is returned that |
| 927 | describes the included group. |
| 928 | |
| 929 | .Response |
| 930 | ---- |
| 931 | HTTP/1.1 200 OK |
| 932 | Content-Disposition: attachment |
| 933 | Content-Type: application/json;charset=UTF-8 |
| 934 | |
| 935 | )]}' |
| 936 | { |
| 937 | "kind": "gerritcodereview#group", |
| 938 | "id": "7ca042f4d5847936fcb90ca91057673157fd06fc", |
| 939 | "name": "MyProject-Verifiers", |
| 940 | "url": "#/admin/groups/uuid-7ca042f4d5847936fcb90ca91057673157fd06fc", |
| 941 | "options": { |
Edwin Kempin | a5cc112 | 2013-02-11 09:26:20 +0100 | [diff] [blame] | 942 | }, |
| 943 | "group_id": 38, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 944 | "owner": "Administrators", |
Edwin Kempin | a5cc112 | 2013-02-11 09:26:20 +0100 | [diff] [blame] | 945 | "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389" |
| 946 | } |
| 947 | ---- |
| 948 | |
Edwin Kempin | 2689e3d | 2013-02-07 15:52:36 +0100 | [diff] [blame] | 949 | [[include-group]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 950 | Include Group |
| 951 | ~~~~~~~~~~~~~ |
| 952 | [verse] |
| 953 | 'PUT /groups/link:#group-id[\{group-id\}]/groups/link:#group-id[\{group-id\}]' |
| 954 | |
Dariusz Luksza | ccfa649 | 2013-06-07 11:07:38 +0200 | [diff] [blame] | 955 | Includes an internal or external group into a Gerrit internal group. |
| 956 | External groups must be specified using the UUID. |
Edwin Kempin | 2689e3d | 2013-02-07 15:52:36 +0100 | [diff] [blame] | 957 | |
| 958 | .Request |
| 959 | ---- |
| 960 | PUT /groups/MyProject-Committers/groups/MyGroup HTTP/1.0 |
| 961 | ---- |
| 962 | |
| 963 | As response a link:#group-info[GroupInfo] entity is returned that |
| 964 | describes the included group. |
| 965 | |
| 966 | .Response |
| 967 | ---- |
| 968 | HTTP/1.1 201 Created |
| 969 | Content-Disposition: attachment |
| 970 | Content-Type: application/json;charset=UTF-8 |
| 971 | |
| 972 | )]}' |
| 973 | { |
| 974 | "kind": "gerritcodereview#group", |
| 975 | "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389", |
| 976 | "name": "MyGroup", |
| 977 | "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389", |
| 978 | "options": { |
Edwin Kempin | 2689e3d | 2013-02-07 15:52:36 +0100 | [diff] [blame] | 979 | }, |
| 980 | "group_id": 8, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 981 | "owner": "Administrators", |
Edwin Kempin | 2689e3d | 2013-02-07 15:52:36 +0100 | [diff] [blame] | 982 | "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389" |
| 983 | } |
| 984 | ---- |
| 985 | |
| 986 | The request also succeeds if the group is already included in this |
| 987 | group, but then the HTTP response code is `200 OK`. |
| 988 | |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 989 | [[include-groups]] |
Edwin Kempin | 7722cc6 | 2013-03-08 09:03:15 +0100 | [diff] [blame] | 990 | Include Groups |
| 991 | ~~~~~~~~~~~~~~ |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 992 | [verse] |
| 993 | 'POST /groups/link:#group-id[\{group-id\}]/groups' |
Edwin Kempin | 2689e3d | 2013-02-07 15:52:36 +0100 | [diff] [blame] | 994 | |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 995 | OR |
| 996 | |
| 997 | [verse] |
| 998 | 'POST /groups/link:#group-id[\{group-id\}]/groups.add' |
| 999 | |
Edwin Kempin | 2689e3d | 2013-02-07 15:52:36 +0100 | [diff] [blame] | 1000 | Includes one or several groups into a Gerrit internal group. |
| 1001 | |
| 1002 | The groups to be included into the group must be provided in the |
| 1003 | request body as a link:#groups-input[GroupsInput] entity. |
| 1004 | |
| 1005 | .Request |
| 1006 | ---- |
| 1007 | POST /groups/MyProject-Committers/groups.add HTTP/1.0 |
| 1008 | Content-Type: application/json;charset=UTF-8 |
| 1009 | |
| 1010 | { |
| 1011 | "groups": { |
| 1012 | "MyGroup", |
| 1013 | "MyOtherGroup" |
| 1014 | } |
| 1015 | } |
| 1016 | ---- |
| 1017 | |
| 1018 | As response a list of link:#group-info[GroupInfo] entities is |
| 1019 | returned that describes the groups that were specified in the |
| 1020 | link:#groups-input[GroupsInput]. A link:#group-info[GroupInfo] entity |
| 1021 | is returned for each group specified in the input, independently of |
| 1022 | whether the group was newly included into the group or whether the |
| 1023 | group was already included in the group. |
| 1024 | |
| 1025 | .Response |
| 1026 | ---- |
| 1027 | HTTP/1.1 200 OK |
| 1028 | Content-Disposition: attachment |
| 1029 | Content-Type: application/json;charset=UTF-8 |
| 1030 | |
| 1031 | )]}' |
| 1032 | [ |
| 1033 | { |
| 1034 | "kind": "gerritcodereview#group", |
| 1035 | "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389", |
| 1036 | "name": "MyGroup", |
| 1037 | "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389", |
| 1038 | "options": { |
Edwin Kempin | 2689e3d | 2013-02-07 15:52:36 +0100 | [diff] [blame] | 1039 | }, |
| 1040 | "group_id": 8, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 1041 | "owner": "Administrators", |
Edwin Kempin | 2689e3d | 2013-02-07 15:52:36 +0100 | [diff] [blame] | 1042 | "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389" |
| 1043 | }, |
| 1044 | { |
| 1045 | "kind": "gerritcodereview#group", |
| 1046 | "id": "5057f3cbd3519d6ab69364429a89ffdffba50f73", |
| 1047 | "name": "MyOtherGroup", |
| 1048 | "url": "#/admin/groups/uuid-5057f3cbd3519d6ab69364429a89ffdffba50f73", |
| 1049 | "options": { |
Edwin Kempin | 2689e3d | 2013-02-07 15:52:36 +0100 | [diff] [blame] | 1050 | }, |
| 1051 | "group_id": 10, |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 1052 | "owner": "MyOtherGroup", |
Edwin Kempin | 2689e3d | 2013-02-07 15:52:36 +0100 | [diff] [blame] | 1053 | "owner_id": "5057f3cbd3519d6ab69364429a89ffdffba50f73" |
| 1054 | } |
| 1055 | ] |
| 1056 | ---- |
| 1057 | |
| 1058 | [[delete-included-group]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1059 | Delete Included Group |
| 1060 | ~~~~~~~~~~~~~~~~~~~~~ |
| 1061 | [verse] |
| 1062 | 'DELETE /groups/link:#group-id[\{group-id\}]/groups/link:#group-id[\{group-id\}]' |
| 1063 | |
Edwin Kempin | 2689e3d | 2013-02-07 15:52:36 +0100 | [diff] [blame] | 1064 | Deletes an included group from a Gerrit internal group. |
| 1065 | |
| 1066 | .Request |
| 1067 | ---- |
| 1068 | DELETE /groups/MyProject-Committers/groups/MyGroup HTTP/1.0 |
| 1069 | ---- |
| 1070 | |
| 1071 | .Response |
| 1072 | ---- |
| 1073 | HTTP/1.1 204 No Content |
| 1074 | ---- |
| 1075 | |
| 1076 | [[delete-included-groups]] |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1077 | Delete Included Groups |
| 1078 | ~~~~~~~~~~~~~~~~~~~~~~ |
| 1079 | [verse] |
| 1080 | 'POST /groups/link:#group-id[\{group-id\}]/groups.delete' |
| 1081 | |
Edwin Kempin | 2689e3d | 2013-02-07 15:52:36 +0100 | [diff] [blame] | 1082 | Delete one or several included groups from a Gerrit internal group. |
| 1083 | |
| 1084 | The groups to be deleted from the group must be provided in the request |
| 1085 | body as a link:#groups-input[GroupsInput] entity. |
| 1086 | |
| 1087 | .Request |
| 1088 | ---- |
| 1089 | POST /groups/MyProject-Committers/groups.delete HTTP/1.0 |
| 1090 | Content-Type: application/json;charset=UTF-8 |
| 1091 | |
| 1092 | { |
| 1093 | "members": { |
| 1094 | "MyGroup", |
| 1095 | "MyOtherGroup" |
| 1096 | } |
| 1097 | } |
| 1098 | ---- |
| 1099 | |
| 1100 | .Response |
| 1101 | ---- |
| 1102 | HTTP/1.1 204 No Content |
| 1103 | ---- |
| 1104 | |
Edwin Kempin | aa266ff | 2013-02-05 12:41:09 +0100 | [diff] [blame] | 1105 | |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 1106 | [[ids]] |
| 1107 | IDs |
| 1108 | --- |
| 1109 | |
Edwin Kempin | 2cdef5f | 2013-02-06 16:50:15 +0100 | [diff] [blame] | 1110 | [[account-id]] |
Edwin Kempin | 4efe257 | 2013-02-27 10:16:17 +0100 | [diff] [blame] | 1111 | link:rest-api-accounts.html#account-id[\{account-id\}] |
| 1112 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1113 | -- |
| 1114 | -- |
Edwin Kempin | a5d6ead | 2013-02-06 10:59:06 +0100 | [diff] [blame] | 1115 | |
Edwin Kempin | 2689e3d | 2013-02-07 15:52:36 +0100 | [diff] [blame] | 1116 | [[group-id]] |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 1117 | \{group-id\} |
| 1118 | ~~~~~~~~~~~~ |
| 1119 | Identifier for a group. |
| 1120 | |
| 1121 | This can be: |
| 1122 | |
| 1123 | * the UUID of the group |
| 1124 | * the legacy numeric ID of the group |
| 1125 | * the name of the group if it is unique |
| 1126 | |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1127 | [[group-name]] |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 1128 | \{group-name\} |
| 1129 | ~~~~~~~~~~~~~~ |
| 1130 | Group name that uniquely identifies one group. |
| 1131 | |
| 1132 | |
Edwin Kempin | 987d543 | 2013-02-04 10:20:44 +0100 | [diff] [blame] | 1133 | [[json-entities]] |
| 1134 | JSON Entities |
| 1135 | ------------- |
| 1136 | |
| 1137 | [[group-info]] |
| 1138 | GroupInfo |
| 1139 | ~~~~~~~~~ |
| 1140 | The `GroupInfo` entity contains information about a group. This can be |
| 1141 | a Gerrit internal group, or an external group that is known to Gerrit. |
| 1142 | |
| 1143 | [options="header",width="50%",cols="1,^1,5"] |
| 1144 | |=========================== |
| 1145 | |Field Name ||Description |
| 1146 | |`kind` ||`gerritcodereview#group` |
| 1147 | |`id` ||The URL encoded UUID of the group. |
Edwin Kempin | 5b591d1 | 2013-03-08 09:18:35 +0100 | [diff] [blame] | 1148 | |`name` | |
| 1149 | not set if returned in a map where the group name is used as map key| |
| 1150 | The name of the group. |
Edwin Kempin | 987d543 | 2013-02-04 10:20:44 +0100 | [diff] [blame] | 1151 | |`url` |optional| |
| 1152 | URL to information about the group. Typically a URL to a web page that |
| 1153 | permits users to apply to join the group, or manage their membership. |
| 1154 | |`options` ||link:#group-options-info[Options of the group] |
| 1155 | |`description` |only for internal groups|The description of the group. |
| 1156 | |`group_id` |only for internal groups|The numeric ID of the group. |
Edwin Kempin | c6993fb | 2013-02-11 12:39:13 +0100 | [diff] [blame] | 1157 | |`owner` |only for internal groups|The name of the owner group. |
Edwin Kempin | 987d543 | 2013-02-04 10:20:44 +0100 | [diff] [blame] | 1158 | |`owner_id` |only for internal groups|The URL encoded UUID of the owner group. |
Edwin Kempin | abaab546 | 2013-02-11 15:30:19 +0100 | [diff] [blame] | 1159 | |`members` |optional, only for internal groups| |
| 1160 | A list of link:rest-api-accounts.html#account-info[AccountInfo] |
| 1161 | entities describing the direct members. + |
| 1162 | Only set if link:#members[members] are requested. |
| 1163 | |`includes` |optional, only for internal groups| |
| 1164 | A list of link:#group-info[GroupInfo] entities describing the directly |
| 1165 | included groups. + |
| 1166 | Only set if link:#includes[included groups] are requested. |
Edwin Kempin | 987d543 | 2013-02-04 10:20:44 +0100 | [diff] [blame] | 1167 | |=========================== |
| 1168 | |
Edwin Kempin | c42abb9 | 2013-02-04 14:52:41 +0100 | [diff] [blame] | 1169 | The type of a group can be deduced from the group's UUID: |
| 1170 | [width="50%"] |
| 1171 | |============ |
| 1172 | |UUID matches "^[0-9a-f]\{40\}$"|Gerrit internal group |
| 1173 | |UUID starts with "global:"|Gerrit system group |
| 1174 | |UUID starts with "ldap:"|LDAP group |
| 1175 | |UUID starts with "<prefix>:"|other external group |
| 1176 | |============ |
| 1177 | |
Edwin Kempin | aa266ff | 2013-02-05 12:41:09 +0100 | [diff] [blame] | 1178 | [[group-input]] |
| 1179 | GroupInput |
| 1180 | ~~~~~~~~~~ |
| 1181 | The 'GroupInput' entity contains information for the creation of |
| 1182 | a new internal group. |
| 1183 | |
| 1184 | [options="header",width="50%",cols="1,^1,5"] |
| 1185 | |=========================== |
| 1186 | |Field Name ||Description |
| 1187 | |`name` |optional|The name of the group (not encoded). + |
| 1188 | If set, must match the group name in the URL. |
| 1189 | |`description` |optional|The description of the group. |
| 1190 | |`visible_to_all`|optional| |
| 1191 | Whether the group is visible to all registered users. + |
| 1192 | `false` if not set. |
| 1193 | |`owner_id`|optional|The URL encoded ID of the owner group. + |
| 1194 | This can be a group UUID, a legacy numeric group ID or a unique group |
| 1195 | name. + |
| 1196 | If not set, the new group will be self-owned. |
| 1197 | |=========================== |
| 1198 | |
Edwin Kempin | 2689e3d | 2013-02-07 15:52:36 +0100 | [diff] [blame] | 1199 | [[groups-input]] |
| 1200 | GroupsInput |
| 1201 | ~~~~~~~~~~~ |
| 1202 | The `GroupsInput` entity contains information about groups that should |
| 1203 | be included into a group or that should be deleted from a group. |
| 1204 | |
| 1205 | [options="header",width="50%",cols="1,^1,5"] |
| 1206 | |========================== |
| 1207 | |Field Name ||Description |
| 1208 | |`_one_group` |optional| |
| 1209 | The link:#group-id[id] of one group that should be included or deleted. |
| 1210 | |`groups` |optional| |
| 1211 | A list of link:#group-id[group ids] that identify the groups that |
| 1212 | should be included or deleted. |
| 1213 | |========================== |
| 1214 | |
Edwin Kempin | 987d543 | 2013-02-04 10:20:44 +0100 | [diff] [blame] | 1215 | [[group-options-info]] |
| 1216 | GroupOptionsInfo |
| 1217 | ~~~~~~~~~~~~~~~~ |
| 1218 | Options of the group. |
| 1219 | |
| 1220 | [options="header",width="50%",cols="1,^1,5"] |
Edwin Kempin | f04fc9c | 2013-02-05 14:09:45 +0100 | [diff] [blame] | 1221 | |============================= |
| 1222 | |Field Name ||Description |
Edwin Kempin | f04fc9c | 2013-02-05 14:09:45 +0100 | [diff] [blame] | 1223 | |`visible_to_all`|not set if `false`| |
Edwin Kempin | 987d543 | 2013-02-04 10:20:44 +0100 | [diff] [blame] | 1224 | Whether the group is visible to all registered users. |
Edwin Kempin | f04fc9c | 2013-02-05 14:09:45 +0100 | [diff] [blame] | 1225 | |============================= |
Edwin Kempin | 987d543 | 2013-02-04 10:20:44 +0100 | [diff] [blame] | 1226 | |
Edwin Kempin | 1461c22 | 2013-02-11 08:41:08 +0100 | [diff] [blame] | 1227 | [[group-options-input]] |
| 1228 | GroupOptionsInput |
| 1229 | ~~~~~~~~~~~~~~~~~ |
| 1230 | New options for a group. |
| 1231 | |
| 1232 | [options="header",width="50%",cols="1,^1,5"] |
| 1233 | |============================= |
| 1234 | |Field Name ||Description |
| 1235 | |`visible_to_all`|not set if `false`| |
| 1236 | Whether the group is visible to all registered users. |
| 1237 | |============================= |
| 1238 | |
Sasa Zivkov | 737e0a3 | 2013-03-18 14:21:42 +0100 | [diff] [blame] | 1239 | [[members-input]] |
| 1240 | MembersInput |
Edwin Kempin | 2cdef5f | 2013-02-06 16:50:15 +0100 | [diff] [blame] | 1241 | ~~~~~~~~~~~ |
Sasa Zivkov | 737e0a3 | 2013-03-18 14:21:42 +0100 | [diff] [blame] | 1242 | The `MembersInput` entity contains information about accounts that should |
Edwin Kempin | acbdfd3 | 2013-02-07 12:38:53 +0100 | [diff] [blame] | 1243 | be added as members to a group or that should be deleted from the group. |
Edwin Kempin | 2cdef5f | 2013-02-06 16:50:15 +0100 | [diff] [blame] | 1244 | |
| 1245 | [options="header",width="50%",cols="1,^1,5"] |
| 1246 | |========================== |
| 1247 | |Field Name ||Description |
| 1248 | |`_one_member`|optional| |
Edwin Kempin | acbdfd3 | 2013-02-07 12:38:53 +0100 | [diff] [blame] | 1249 | The link:#account-id[id] of one account that should be added or |
| 1250 | deleted. |
Edwin Kempin | 2cdef5f | 2013-02-06 16:50:15 +0100 | [diff] [blame] | 1251 | |`members` |optional| |
| 1252 | A list of link:#account-id[account ids] that identify the accounts that |
Edwin Kempin | acbdfd3 | 2013-02-07 12:38:53 +0100 | [diff] [blame] | 1253 | should be added or deleted. |
Edwin Kempin | 2cdef5f | 2013-02-06 16:50:15 +0100 | [diff] [blame] | 1254 | |========================== |
| 1255 | |
| 1256 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1257 | GERRIT |
| 1258 | ------ |
| 1259 | Part of link:index.html[Gerrit Code Review] |