blob: 4785350ec6d21019b025a699e3635a5449ecdc80 [file] [log] [blame]
Edwin Kempin2eebd142013-03-06 15:28:34 +01001Gerrit Code Review - /groups/ REST API
2======================================
Edwin Kempind0a63922013-01-23 16:32:59 +01003
4This page describes the group related REST endpoints.
5Please also take note of the general information on the
6link:rest-api.html[REST API].
7
Edwin Kempin578fff72013-02-11 08:08:27 +01008[[group-endpoints]]
9Group Endpoints
10---------------
Edwin Kempind0a63922013-01-23 16:32:59 +010011
Edwin Kempin76202742013-02-15 13:51:50 +010012[[list-groups]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +010013List Groups
14~~~~~~~~~~~
15[verse]
16'GET /groups/'
17
Edwin Kempind0a63922013-01-23 16:32:59 +010018Lists the groups accessible by the caller. This is the same as
19using the link:cmd-ls-groups.html[ls-groups] command over SSH,
20and accepts the same options as query parameters.
21
Edwin Kempin987d5432013-02-04 10:20:44 +010022As result a map is returned that maps the group names to
23link:#group-info[GroupInfo] entries. The entries in the map are sorted
24by group name.
25
Edwin Kempin37440832013-02-06 11:36:00 +010026.Request
Edwin Kempind0a63922013-01-23 16:32:59 +010027----
28 GET /groups/ HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +010029----
Edwin Kempind0a63922013-01-23 16:32:59 +010030
Edwin Kempin37440832013-02-06 11:36:00 +010031.Response
32----
Edwin Kempind0a63922013-01-23 16:32:59 +010033 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 Kempine05c9642013-02-11 09:36:21 +010042 "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389",
43 "options": {
Edwin Kempine05c9642013-02-11 09:36:21 +010044 },
Edwin Kempind0a63922013-01-23 16:32:59 +010045 "description": "Gerrit Site Administrators",
46 "group_id": 1,
Edwin Kempinc6993fb2013-02-11 12:39:13 +010047 "owner": "Administrators",
Edwin Kempind0a63922013-01-23 16:32:59 +010048 "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
49 },
50 "Anonymous Users": {
51 "kind": "gerritcodereview#group",
52 "id": "global%3AAnonymous-Users",
Edwin Kempine05c9642013-02-11 09:36:21 +010053 "url": "#/admin/groups/uuid-global%3AAnonymous-Users",
54 "options": {
Edwin Kempine05c9642013-02-11 09:36:21 +010055 },
Edwin Kempind0a63922013-01-23 16:32:59 +010056 "description": "Any user, signed-in or not",
57 "group_id": 2,
Edwin Kempinc6993fb2013-02-11 12:39:13 +010058 "owner": "Administrators",
Edwin Kempind0a63922013-01-23 16:32:59 +010059 "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
60 },
61 "MyProject_Committers": {
62 "kind": "gerritcodereview#group",
63 "id": "834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7",
Edwin Kempine05c9642013-02-11 09:36:21 +010064 "url": "#/admin/groups/uuid-834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7",
65 "options": {
Edwin Kempine05c9642013-02-11 09:36:21 +010066 "visible_to_all": true,
67 },
Edwin Kempind0a63922013-01-23 16:32:59 +010068 "group_id": 6,
Edwin Kempinc6993fb2013-02-11 12:39:13 +010069 "owner": "MyProject_Committers",
Edwin Kempind0a63922013-01-23 16:32:59 +010070 "owner_id": "834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7"
71 },
72 "Non-Interactive Users": {
73 "kind": "gerritcodereview#group",
74 "id": "5057f3cbd3519d6ab69364429a89ffdffba50f73",
Edwin Kempine05c9642013-02-11 09:36:21 +010075 "url": "#/admin/groups/uuid-5057f3cbd3519d6ab69364429a89ffdffba50f73",
76 "options": {
Edwin Kempine05c9642013-02-11 09:36:21 +010077 },
Edwin Kempind0a63922013-01-23 16:32:59 +010078 "description": "Users who perform batch actions on Gerrit",
79 "group_id": 4,
Edwin Kempinc6993fb2013-02-11 12:39:13 +010080 "owner": "Administrators",
Edwin Kempind0a63922013-01-23 16:32:59 +010081 "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
82 },
83 "Project Owners": {
84 "kind": "gerritcodereview#group",
85 "id": "global%3AProject-Owners",
Edwin Kempine05c9642013-02-11 09:36:21 +010086 "url": "#/admin/groups/uuid-global%3AProject-Owners",
87 "options": {
Edwin Kempine05c9642013-02-11 09:36:21 +010088 },
Edwin Kempind0a63922013-01-23 16:32:59 +010089 "description": "Any owner of the project",
90 "group_id": 5,
Edwin Kempinc6993fb2013-02-11 12:39:13 +010091 "owner": "Administrators",
Edwin Kempind0a63922013-01-23 16:32:59 +010092 "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
93 },
94 "Registered Users": {
95 "kind": "gerritcodereview#group",
96 "id": "global%3ARegistered-Users",
Edwin Kempine05c9642013-02-11 09:36:21 +010097 "url": "#/admin/groups/uuid-global%3ARegistered-Users",
98 "options": {
Edwin Kempine05c9642013-02-11 09:36:21 +010099 },
Edwin Kempind0a63922013-01-23 16:32:59 +0100100 "description": "Any signed-in user",
101 "group_id": 3,
Edwin Kempinc6993fb2013-02-11 12:39:13 +0100102 "owner": "Administrators",
Edwin Kempind0a63922013-01-23 16:32:59 +0100103 "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
104 }
105 }
106----
107
Edwin Kempina64c4b92013-01-23 11:30:40 +0100108.Get all groups
109****
110get::/groups/
111****
112
Edwin Kempinabaab5462013-02-11 15:30:19 +0100113[[group-options]]
114Group Options
115^^^^^^^^^^^^^
116Additional fields can be obtained by adding `o` parameters, each option
117requires more lookups and slows down the query response time to the
118client 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 Kempina3b4b632013-02-11 10:33:55 +0100130Check if a group is owned by the calling user
131^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132By setting the option `owned` and specifying a group to inspect with
133the option `q`, it is possible to find out, if this group is owned by
134the calling user.
135
136.Request
137----
138 GET /groups/?owned&q=MyProject-Committers HTTP/1.0
139----
140
141If the group is owned by the calling user, the returned map contains
142this group. If the calling user doesn't own this group an empty map is
143returned.
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 Kempina3b4b632013-02-11 10:33:55 +0100156 "url": "#/admin/groups/uuid-9999c971bb4ab872aab759d8c49833ee6b9ff320",
157 "options": {
Edwin Kempina3b4b632013-02-11 10:33:55 +0100158 "visible_to_all": true
159 },
160 "description":"contains all committers for MyProject",
161 "group_id": 551,
Edwin Kempinc6993fb2013-02-11 12:39:13 +0100162 "owner": "MyProject-Owners",
Edwin Kempina3b4b632013-02-11 10:33:55 +0100163 "owner_id": "7ca042f4d5847936fcb90ca91057673157fd06fc"
164 }
165 }
166----
167
Edwin Kempina5cc1122013-02-11 09:26:20 +0100168[[get-group]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100169Get Group
170~~~~~~~~~
171[verse]
172'GET /groups/link:#group-id[\{group-id\}]'
173
Edwin Kempina5cc1122013-02-11 09:26:20 +0100174Retrieves a group.
175
176.Request
177----
178 GET /groups/6a1e70e1a88782771a91808c8af9bbb7a9871389 HTTP/1.0
179----
180
181As response a link:#group-info[GroupInfo] entity is returned that
182describes the group.
183
184.Response
185----
186 HTTP/1.1 200 OK
187 Content-Disposition: attachment
188 Content-Type: application/json;charset=UTF-8
189
190 )]}'
191 {
192 "kind": "gerritcodereview#group",
193 "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389",
194 "name": "Administrators",
195 "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389",
196 "options": {
Edwin Kempina5cc1122013-02-11 09:26:20 +0100197 },
198 "description": "Gerrit Site Administrators",
199 "group_id": 1,
Edwin Kempinc6993fb2013-02-11 12:39:13 +0100200 "owner": "Administrators",
Edwin Kempina5cc1122013-02-11 09:26:20 +0100201 "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
202 }
203----
204
Edwin Kempin578fff72013-02-11 08:08:27 +0100205[[create-group]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100206Create Group
207~~~~~~~~~~~~
208[verse]
209'PUT /groups/link:#group-name[\{group-name\}]'
210
Edwin Kempin578fff72013-02-11 08:08:27 +0100211Creates a new Gerrit internal group.
212
213In the request body additional data for the group can be provided as
214link:#group-input[GroupInput].
215
216.Request
217----
218 PUT /groups/MyProject-Committers HTTP/1.0
219 Content-Type: application/json;charset=UTF-8
220
221 {
222 "description": "contains all committers for MyProject",
223 "visible_to_all": true,
Edwin Kempinc6993fb2013-02-11 12:39:13 +0100224 "owner": "MyProject-Owners",
Edwin Kempin578fff72013-02-11 08:08:27 +0100225 "owner_id": "7ca042f4d5847936fcb90ca91057673157fd06fc"
226 }
227----
228
229As response the link:#group-info[GroupInfo] entity is returned that
230describes the created group.
231
232.Response
233----
234 HTTP/1.1 201 Created
235 Content-Disposition: attachment
236 Content-Type: application/json;charset=UTF-8
237
238 )]}'
239 {
240 "kind": "gerritcodereview#group",
241 "id": "9999c971bb4ab872aab759d8c49833ee6b9ff320",
242 "name": "MyProject-Committers",
243 "url": "#/admin/groups/uuid-9999c971bb4ab872aab759d8c49833ee6b9ff320",
244 "options": {
Edwin Kempin578fff72013-02-11 08:08:27 +0100245 "visible_to_all": true
246 },
247 "description":"contains all committers for MyProject",
248 "group_id": 551,
Edwin Kempinc6993fb2013-02-11 12:39:13 +0100249 "owner": "MyProject-Owners",
Edwin Kempin578fff72013-02-11 08:08:27 +0100250 "owner_id": "7ca042f4d5847936fcb90ca91057673157fd06fc"
251 }
252----
253
Edwin Kempin0aa27102013-02-27 16:44:16 +0100254If the group creation fails because the name is already in use the
255response is "`409 Conflict`".
256
Edwin Kempinabaab5462013-02-11 15:30:19 +0100257[[get-group-detail]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100258Get Group Detail
259~~~~~~~~~~~~~~~~
260[verse]
261'GET /groups/link:#group-id[\{group-id\}]/detail'
262
Edwin Kempinabaab5462013-02-11 15:30:19 +0100263Retrieves a group with the direct link:#members[members] and the
264directly link:#includes[included groups].
265
266.Request
267----
268 GET /groups/6a1e70e1a88782771a91808c8af9bbb7a9871389/detail HTTP/1.0
269----
270
271As response a link:#group-info[GroupInfo] entity is returned that
272describes the group.
273
274.Response
275----
276 HTTP/1.1 200 OK
277 Content-Disposition: attachment
278 Content-Type: application/json;charset=UTF-8
279
280 )]}'
281 {
282 "kind": "gerritcodereview#group",
283 "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389",
284 "name": "Administrators",
285 "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389",
286 "options": {
287 },
288 "description": "Gerrit Site Administrators",
289 "group_id": 1,
290 "owner": "Administrators",
291 "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389",
292 "members": [
293 {
Edwin Kempin51284e62013-03-05 15:26:41 +0100294 "_account_id": 1000097,
295 "name": "Jane Roe",
James Ring8e342722013-05-01 01:40:53 -0700296 "email": "jane.roe@example.com",
297 "username": "jane"
Edwin Kempinabaab5462013-02-11 15:30:19 +0100298 },
299 {
Edwin Kempin51284e62013-03-05 15:26:41 +0100300 "_account_id": 1000096,
301 "name": "John Doe",
302 "email": "john.doe@example.com"
James Ring8e342722013-05-01 01:40:53 -0700303 "username": "john"
Edwin Kempinabaab5462013-02-11 15:30:19 +0100304 }
305 ],
306 "includes": []
307 }
308----
309
Edwin Kempin1461c222013-02-11 08:41:08 +0100310[[get-group-name]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100311Get Group Name
312~~~~~~~~~~~~~~
313[verse]
314'GET /groups/link:#group-id[\{group-id\}]/name'
315
Edwin Kempin1461c222013-02-11 08:41:08 +0100316Retrieves the name of a group.
317
318.Request
319----
320 GET /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/name HTTP/1.0
321----
322
323.Response
324----
325 HTTP/1.1 200 OK
326 Content-Disposition: attachment
327 Content-Type: application/json;charset=UTF-8
328
329 )]}'
330 "MyProject-Committers"
331----
332
333[[rename-group]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100334Rename Group
335~~~~~~~~~~~~
336[verse]
337'PUT /groups/link:#group-id[\{group-id\}]/name'
338
Edwin Kempin1461c222013-02-11 08:41:08 +0100339Renames a Gerrit internal group.
340
341The new group name must be provided in the request body.
342
343.Request
344----
345 PUT /groups/MyProject-Committers/name HTTP/1.0
346 Content-Type: application/json;charset=UTF-8
347
348 {
349 "name": "My-Project-Committers"
350 }
351----
352
353As response the new group name is returned.
354
355.Response
356----
357 HTTP/1.1 200 OK
358 Content-Disposition: attachment
359 Content-Type: application/json;charset=UTF-8
360
361 )]}'
362 "My-Project-Committers"
363----
364
Edwin Kempin0aa27102013-02-27 16:44:16 +0100365If renaming the group fails because the new name is already in use the
366response is "`409 Conflict`".
367
Edwin Kempin1461c222013-02-11 08:41:08 +0100368[[get-group-description]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100369Get Group Description
370~~~~~~~~~~~~~~~~~~~~~
371[verse]
372'GET /groups/link:#group-id[\{group-id\}]/description'
373
Edwin Kempin1461c222013-02-11 08:41:08 +0100374Retrieves the description of a group.
375
376.Request
377----
378 GET /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/description HTTP/1.0
379----
380
381.Response
382----
383 HTTP/1.1 200 OK
384 Content-Disposition: attachment
385 Content-Type: application/json;charset=UTF-8
386
387 )]}'
388 "contains all committers for MyProject"
389----
390
Edwin Kempinefec4492013-02-22 10:09:23 +0100391If the group does not have a description an empty string is returned.
392
Edwin Kempin1461c222013-02-11 08:41:08 +0100393[[set-group-description]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100394Set Group Description
395~~~~~~~~~~~~~~~~~~~~~
396[verse]
397'PUT /groups/link:#group-id[\{group-id\}]/description'
398
Edwin Kempin1461c222013-02-11 08:41:08 +0100399Sets the description of a Gerrit internal group.
400
401The new group description must be provided in the request body.
402
403.Request
404----
405 PUT /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/description HTTP/1.0
406 Content-Type: application/json;charset=UTF-8
407
408 {
409 "description": "The committers of MyProject."
410 }
411----
412
413As response the new group description is returned.
414
415.Response
416----
417 HTTP/1.1 200 OK
418 Content-Disposition: attachment
419 Content-Type: application/json;charset=UTF-8
420
421 )]}'
422 "The committers of MyProject."
423----
424
Edwin Kempin114ab162013-02-28 09:25:37 +0100425If the description was deleted the response is "`204 No Content`".
426
Edwin Kempin1461c222013-02-11 08:41:08 +0100427[[delete-group-description]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100428Delete Group Description
429~~~~~~~~~~~~~~~~~~~~~~~~
430[verse]
431'DELETE /groups/link:#group-id[\{group-id\}]/description'
432
Edwin Kempin1461c222013-02-11 08:41:08 +0100433Deletes the description of a Gerrit internal group.
434
435.Request
436----
437 DELETE /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/description HTTP/1.0
438----
439
440.Response
441----
442 HTTP/1.1 204 No Content
443----
444
445[[get-group-options]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100446Get Group Options
447~~~~~~~~~~~~~~~~~
448[verse]
449'GET /groups/link:#group-id[\{group-id\}]/options'
450
Edwin Kempin1461c222013-02-11 08:41:08 +0100451Retrieves the options of a group.
452
453.Request
454----
455 GET /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/options HTTP/1.0
456----
457
458As response a link:#group-options-info[GroupOptionsInfo] entity is
459returned that describes the options of the group.
460
461.Response
462----
463 HTTP/1.1 200 OK
464 Content-Disposition: attachment
465 Content-Type: application/json;charset=UTF-8
466
467 )]}'
468 {
Edwin Kempin1461c222013-02-11 08:41:08 +0100469 "visible_to_all": true
470 }
471----
472
473[[set-group-options]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100474Set Group Options
475~~~~~~~~~~~~~~~~~
476[verse]
477'PUT /groups/link:#group-id[\{group-id\}]/options'
478
Edwin Kempin1461c222013-02-11 08:41:08 +0100479Sets the options of a Gerrit internal group.
480
481The new group options must be provided in the request body as a
482link:#group-options-input[GroupOptionsInput] entity.
483
484.Request
485----
486 PUT /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/options HTTP/1.0
487 Content-Type: application/json;charset=UTF-8
488
489 {
490 "visible_to_all": true
491 }
492----
493
494As response the new group options are returned as a
495link:#group-options-info[GroupOptionsInfo] entity.
496
497.Response
498----
499 HTTP/1.1 200 OK
500 Content-Disposition: attachment
501 Content-Type: application/json;charset=UTF-8
502
503 )]}'
504 {
Edwin Kempin1461c222013-02-11 08:41:08 +0100505 "visible_to_all": true
506 }
507----
508
509[[get-group-owner]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100510Get Group Owner
511~~~~~~~~~~~~~~~
512[verse]
513'GET /groups/link:#group-id[\{group-id\}]/owner'
514
Edwin Kempin1461c222013-02-11 08:41:08 +0100515Retrieves the owner group of a Gerrit internal group.
516
517.Request
518----
519 GET /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/owner HTTP/1.0
520----
521
522As response a link:#group-info[GroupInfo] entity is returned that
523describes the owner group.
524
525.Response
526----
527 HTTP/1.1 200 OK
528 Content-Disposition: attachment
529 Content-Type: application/json;charset=UTF-8
530
531 )]}'
532 {
533 "kind": "gerritcodereview#group",
534 "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389",
535 "name": "Administrators",
536 "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389",
537 "options": {
Edwin Kempin1461c222013-02-11 08:41:08 +0100538 },
539 "description": "Gerrit Site Administrators",
540 "group_id": 1,
Edwin Kempinc6993fb2013-02-11 12:39:13 +0100541 "owner": "Administrators",
Edwin Kempin1461c222013-02-11 08:41:08 +0100542 "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
543 }
544----
545
546[[set-group-owner]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100547Set Group Owner
548~~~~~~~~~~~~~~~
549[verse]
550'PUT /groups/link:#group-id[\{group-id\}]/owner'
551
Edwin Kempin1461c222013-02-11 08:41:08 +0100552Sets the owner group of a Gerrit internal group.
553
554The new owner group must be provided in the request body.
555
Edwin Kempinc9770902013-02-15 15:38:03 +0100556The new owner can be specified by name, by group UUID or by the legacy
557numeric group ID.
558
Edwin Kempin1461c222013-02-11 08:41:08 +0100559.Request
560----
561 PUT /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/description HTTP/1.0
562 Content-Type: application/json;charset=UTF-8
563
564 {
565 "owner": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
566 }
567----
568
569As response a link:#group-info[GroupInfo] entity is returned that
570describes the new owner group.
571
572.Response
573----
574 HTTP/1.1 200 OK
575 Content-Disposition: attachment
576 Content-Type: application/json;charset=UTF-8
577
578 )]}'
579 {
580 "kind": "gerritcodereview#group",
581 "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389",
582 "name": "Administrators",
583 "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389",
584 "options": {
Edwin Kempin1461c222013-02-11 08:41:08 +0100585 },
586 "description": "Gerrit Site Administrators",
587 "group_id": 1,
Edwin Kempinc6993fb2013-02-11 12:39:13 +0100588 "owner": "Administrators",
Edwin Kempin1461c222013-02-11 08:41:08 +0100589 "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
590 }
591----
592
Edwin Kempin578fff72013-02-11 08:08:27 +0100593[[group-member-endpoints]]
594Group Member Endpoints
595----------------------
596
Edwin Kempind0a63922013-01-23 16:32:59 +0100597[[group-members]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100598List Group Members
599~~~~~~~~~~~~~~~~~~
600[verse]
601'GET /groups/link:#group-id[\{group-id\}]/members/'
602
Edwin Kempin2dc5edc2013-02-11 15:57:36 +0100603Lists the direct members of a Gerrit internal group.
Edwin Kempind0a63922013-01-23 16:32:59 +0100604
Edwin Kempin963dfd02013-02-27 12:39:32 +0100605As result a list of detailed link:rest-api-accounts.html#account-info[
606AccountInfo] entries is returned. The entries in the list are sorted by
607full name, preferred email and id.
Edwin Kempin4156d6e02013-02-04 15:10:39 +0100608
Edwin Kempin37440832013-02-06 11:36:00 +0100609.Request
Edwin Kempind0a63922013-01-23 16:32:59 +0100610----
611 GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/members/ HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +0100612----
Edwin Kempind0a63922013-01-23 16:32:59 +0100613
Edwin Kempin37440832013-02-06 11:36:00 +0100614.Response
615----
Edwin Kempind0a63922013-01-23 16:32:59 +0100616 HTTP/1.1 200 OK
617 Content-Disposition: attachment
618 Content-Type: application/json;charset=UTF-8
619
620 )]}'
621 [
622 {
Edwin Kempin963dfd02013-02-27 12:39:32 +0100623 "_account_id": 1000097,
624 "name": "Jane Roe",
James Ring8e342722013-05-01 01:40:53 -0700625 "email": "jane.roe@example.com",
626 "username": "jane"
Edwin Kempind0a63922013-01-23 16:32:59 +0100627 },
628 {
Edwin Kempin963dfd02013-02-27 12:39:32 +0100629 "_account_id": 1000096,
630 "name": "John Doe",
James Ring8e342722013-05-01 01:40:53 -0700631 "email": "john.doe@example.com",
632 "username": "john"
Edwin Kempind0a63922013-01-23 16:32:59 +0100633 }
634 ]
635----
636
Edwin Kempina64c4b92013-01-23 11:30:40 +0100637.Get all members of the 'Administrators' group (normally group id = 1)
638****
639get::/groups/1/members/
640****
641
Edwin Kempind0a63922013-01-23 16:32:59 +0100642To resolve the included groups of a group recursively and to list all
643members the parameter `recursive` can be set.
644
Edwin Kempind54de1c2013-03-08 16:37:14 +0100645Members from included external groups and from included groups which
646are not visible to the calling user are ignored.
647
Edwin Kempin37440832013-02-06 11:36:00 +0100648.Request
Edwin Kempind0a63922013-01-23 16:32:59 +0100649----
650 GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/members/?recursive HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +0100651----
Edwin Kempind0a63922013-01-23 16:32:59 +0100652
Edwin Kempin37440832013-02-06 11:36:00 +0100653.Response
654----
Edwin Kempind0a63922013-01-23 16:32:59 +0100655 HTTP/1.1 200 OK
656 Content-Disposition: attachment
657 Content-Type: application/json;charset=UTF-8
658
659 )]}'
660 [
661 {
Edwin Kempin3e22d482013-03-05 15:35:25 +0100662 "_account_id": 1000097,
663 "name": "Jane Roe",
James Ring8e342722013-05-01 01:40:53 -0700664 "email": "jane.roe@example.com",
665 "username": "jane"
Edwin Kempind0a63922013-01-23 16:32:59 +0100666 },
667 {
Edwin Kempin3e22d482013-03-05 15:35:25 +0100668 "_account_id": 1000096,
669 "name": "John Doe",
James Ring8e342722013-05-01 01:40:53 -0700670 "email": "john.doe@example.com",
671 "username": "john"
Edwin Kempind0a63922013-01-23 16:32:59 +0100672 },
673 {
Edwin Kempin3e22d482013-03-05 15:35:25 +0100674 "_account_id": 1000098,
675 "name": "Richard Roe",
James Ring8e342722013-05-01 01:40:53 -0700676 "email": "richard.roe@example.com",
677 "username": "rroe"
Edwin Kempind0a63922013-01-23 16:32:59 +0100678 }
679 ]
680----
681
Edwin Kempina5cc1122013-02-11 09:26:20 +0100682[[get-group-member]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100683Get Group Member
684~~~~~~~~~~~~~~~~
685[verse]
686'GET /groups/link:#group-id[\{group-id\}]/members/link:rest-api-accounts.html#account-id[\{account-id\}]'
687
Edwin Kempina5cc1122013-02-11 09:26:20 +0100688Retrieves a group member.
689
690.Request
691----
692 GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/members/1000096 HTTP/1.0
693----
694
Edwin Kempin963dfd02013-02-27 12:39:32 +0100695As response a detailed link:rest-api-accounts.html#account-info[
696AccountInfo] entity is returned that describes the group member.
Edwin Kempina5cc1122013-02-11 09:26:20 +0100697
698.Response
699----
700 HTTP/1.1 200 OK
701 Content-Disposition: attachment
702 Content-Type: application/json;charset=UTF-8
703
704 )]}'
705 {
Edwin Kempin963dfd02013-02-27 12:39:32 +0100706 "_account_id": 1000096,
707 "name": "John Doe",
James Ring8e342722013-05-01 01:40:53 -0700708 "email": "john.doe@example.com",
709 "username": "john"
Edwin Kempina5cc1122013-02-11 09:26:20 +0100710 }
711----
712
Edwin Kempina5d6ead2013-02-06 10:59:06 +0100713[[add-group-member]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100714Add Group Member
715~~~~~~~~~~~~~~~~
716[verse]
717'PUT /groups/link:#group-id[\{group-id\}]/members/link:rest-api-accounts.html#account-id[\{account-id\}]'
718
Edwin Kempina5d6ead2013-02-06 10:59:06 +0100719Adds a user as member to a Gerrit internal group.
720
721.Request
722----
723 PUT /groups/MyProject-Committers/members/John%20Doe HTTP/1.0
724----
725
Edwin Kempin963dfd02013-02-27 12:39:32 +0100726As response a detailed link:rest-api-accounts.html#account-info[
727AccountInfo] entity is returned that describes the group member.
Edwin Kempina5d6ead2013-02-06 10:59:06 +0100728
729.Response
730----
731 HTTP/1.1 201 Created
732 Content-Disposition: attachment
733 Content-Type: application/json;charset=UTF-8
734
735 )]}'
736 {
Edwin Kempin963dfd02013-02-27 12:39:32 +0100737 "_account_id": 1000037,
738 "name": "John Doe",
James Ring8e342722013-05-01 01:40:53 -0700739 "email": "john.doe@example.com",
740 "username": "john"
Edwin Kempina5d6ead2013-02-06 10:59:06 +0100741 }
742----
743
744The request also succeeds if the user is already a member of this
745group, but then the HTTP response code is `200 OK`.
746
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100747Add Group Members
748~~~~~~~~~~~~~~~~~
749[verse]
750'POST /groups/link:#group-id[\{group-id\}]/members'
Edwin Kempin2cdef5f2013-02-06 16:50:15 +0100751
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100752OR
753
754[verse]
755'POST /groups/link:#group-id[\{group-id\}]/members.add'
756
Edwin Kempin2cdef5f2013-02-06 16:50:15 +0100757Adds one or several users to a Gerrit internal group.
758
759The users to be added to the group must be provided in the request body
Sasa Zivkov737e0a32013-03-18 14:21:42 +0100760as a link:#members-input[MembersInput] entity.
Edwin Kempin2cdef5f2013-02-06 16:50:15 +0100761
762.Request
763----
764 POST /groups/MyProject-Committers/members.add HTTP/1.0
765 Content-Type: application/json;charset=UTF-8
766
767 {
768 "members": {
769 "jane.roe@example.com",
770 "john.doe@example.com"
771 }
772 }
773----
774
Edwin Kempin963dfd02013-02-27 12:39:32 +0100775As response a list of detailed link:rest-api-accounts.html#account-info[
776AccountInfo] entities is returned that describes the group members that
Sasa Zivkov737e0a32013-03-18 14:21:42 +0100777were specified in the link:#members-input[MembersInput]. An
Edwin Kempin963dfd02013-02-27 12:39:32 +0100778link:rest-api-accounts.html#account-info[AccountInfo] entity
Edwin Kempin2cdef5f2013-02-06 16:50:15 +0100779is returned for each user specified in the input, independently of
780whether the user was newly added to the group or whether the user was
781already a member of the group.
782
783.Response
784----
785 HTTP/1.1 200 OK
786 Content-Disposition: attachment
787 Content-Type: application/json;charset=UTF-8
788
789 )]}'
790 [
791 {
Edwin Kempin963dfd02013-02-27 12:39:32 +0100792 "_account_id": 1000057,
793 "name": "Jane Roe",
James Ring8e342722013-05-01 01:40:53 -0700794 "email": "jane.roe@example.com",
795 "username": "jane"
Edwin Kempin2cdef5f2013-02-06 16:50:15 +0100796 },
797 {
Edwin Kempin963dfd02013-02-27 12:39:32 +0100798 "_account_id": 1000037,
799 "name": "John Doe",
James Ring8e342722013-05-01 01:40:53 -0700800 "email": "john.doe@example.com",
801 "username": "john"
Edwin Kempin2cdef5f2013-02-06 16:50:15 +0100802 }
803 ]
804----
805
Edwin Kempinacbdfd32013-02-07 12:38:53 +0100806[[delete-group-member]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100807Delete Group Member
808~~~~~~~~~~~~~~~~~~~
809[verse]
810'DELETE /groups/link:#group-id[\{group-id\}]/members/link:rest-api-accounts.html#account-id[\{account-id\}]'
811
Edwin Kempinacbdfd32013-02-07 12:38:53 +0100812Deletes a user from a Gerrit internal group.
813
814.Request
815----
816 DELETE /groups/MyProject-Committers/members/John%20Doe HTTP/1.0
817----
818
819.Response
820----
821 HTTP/1.1 204 No Content
822----
823
824[[delete-group-members]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100825Delete Group Members
826~~~~~~~~~~~~~~~~~~~~
827[verse]
828'POST /groups/link:#group-id[\{group-id\}]/members.delete'
829
Edwin Kempinacbdfd32013-02-07 12:38:53 +0100830Delete one or several users from a Gerrit internal group.
831
832The users to be deleted from the group must be provided in the request
Sasa Zivkov737e0a32013-03-18 14:21:42 +0100833body as a link:#members-input[MembersInput] entity.
Edwin Kempinacbdfd32013-02-07 12:38:53 +0100834
835.Request
836----
837 POST /groups/MyProject-Committers/members.delete HTTP/1.0
838 Content-Type: application/json;charset=UTF-8
839
840 {
841 "members": {
842 "jane.roe@example.com",
843 "john.doe@example.com"
844 }
845 }
846----
847
848.Response
849----
850 HTTP/1.1 204 No Content
851----
852
Edwin Kempin578fff72013-02-11 08:08:27 +0100853[[group-include-endpoints]]
854Group Include Endpoints
855-----------------------
856
857[[included-groups]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100858List Included Groups
859~~~~~~~~~~~~~~~~~~~~
860[verse]
861'GET /groups/link:#group-id[\{group-id\}]/groups/'
862
Edwin Kempin578fff72013-02-11 08:08:27 +0100863Lists the directly included groups of a group.
864
865As result a list of link:#group-info[GroupInfo] entries is returned.
866The entries in the list are sorted by group name and UUID.
867
868.Request
869----
870 GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/groups/ HTTP/1.0
871----
872
873.Response
874----
875 HTTP/1.1 200 OK
876 Content-Disposition: attachment
877 Content-Type: application/json;charset=UTF-8
878
879 )]}'
880 [
881 {
882 "kind": "gerritcodereview#group",
883 "id": "7ca042f4d5847936fcb90ca91057673157fd06fc",
884 "name": "MyProject-Verifiers",
Edwin Kempine05c9642013-02-11 09:36:21 +0100885 "url": "#/admin/groups/uuid-7ca042f4d5847936fcb90ca91057673157fd06fc",
886 "options": {
Edwin Kempine05c9642013-02-11 09:36:21 +0100887 },
Edwin Kempin578fff72013-02-11 08:08:27 +0100888 "group_id": 38,
Edwin Kempinc6993fb2013-02-11 12:39:13 +0100889 "owner": "MyProject-Verifiers",
Edwin Kempin578fff72013-02-11 08:08:27 +0100890 "owner_id": "7ca042f4d5847936fcb90ca91057673157fd06fc"
891 }
892 ]
893----
894
Edwin Kempina5cc1122013-02-11 09:26:20 +0100895[[get-included-group]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100896Get Included Group
897~~~~~~~~~~~~~~~~~~
898[verse]
899'GET /groups/link:#group-id[\{group-id\}]/groups/link:#group-id[\{group-id\}]'
900
Edwin Kempina5cc1122013-02-11 09:26:20 +0100901Retrieves an included group.
902
903.Request
904----
905 GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/groups/7ca042f4d5847936fcb90ca91057673157fd06fc HTTP/1.0
906----
907
908As response a link:#group-info[GroupInfo] entity is returned that
909describes the included group.
910
911.Response
912----
913 HTTP/1.1 200 OK
914 Content-Disposition: attachment
915 Content-Type: application/json;charset=UTF-8
916
917 )]}'
918 {
919 "kind": "gerritcodereview#group",
920 "id": "7ca042f4d5847936fcb90ca91057673157fd06fc",
921 "name": "MyProject-Verifiers",
922 "url": "#/admin/groups/uuid-7ca042f4d5847936fcb90ca91057673157fd06fc",
923 "options": {
Edwin Kempina5cc1122013-02-11 09:26:20 +0100924 },
925 "group_id": 38,
Edwin Kempinc6993fb2013-02-11 12:39:13 +0100926 "owner": "Administrators",
Edwin Kempina5cc1122013-02-11 09:26:20 +0100927 "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
928 }
929----
930
Edwin Kempin2689e3d2013-02-07 15:52:36 +0100931[[include-group]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100932Include Group
933~~~~~~~~~~~~~
934[verse]
935'PUT /groups/link:#group-id[\{group-id\}]/groups/link:#group-id[\{group-id\}]'
936
Edwin Kempin2689e3d2013-02-07 15:52:36 +0100937Includes a group into a Gerrit internal group.
938
939.Request
940----
941 PUT /groups/MyProject-Committers/groups/MyGroup HTTP/1.0
942----
943
944As response a link:#group-info[GroupInfo] entity is returned that
945describes the included group.
946
947.Response
948----
949 HTTP/1.1 201 Created
950 Content-Disposition: attachment
951 Content-Type: application/json;charset=UTF-8
952
953 )]}'
954 {
955 "kind": "gerritcodereview#group",
956 "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389",
957 "name": "MyGroup",
958 "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389",
959 "options": {
Edwin Kempin2689e3d2013-02-07 15:52:36 +0100960 },
961 "group_id": 8,
Edwin Kempinc6993fb2013-02-11 12:39:13 +0100962 "owner": "Administrators",
Edwin Kempin2689e3d2013-02-07 15:52:36 +0100963 "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
964 }
965----
966
967The request also succeeds if the group is already included in this
968group, but then the HTTP response code is `200 OK`.
969
John Spurlockd25fad12013-03-09 11:48:49 -0500970[[include-groups]]
Edwin Kempin7722cc62013-03-08 09:03:15 +0100971Include Groups
972~~~~~~~~~~~~~~
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100973[verse]
974'POST /groups/link:#group-id[\{group-id\}]/groups'
Edwin Kempin2689e3d2013-02-07 15:52:36 +0100975
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100976OR
977
978[verse]
979'POST /groups/link:#group-id[\{group-id\}]/groups.add'
980
Edwin Kempin2689e3d2013-02-07 15:52:36 +0100981Includes one or several groups into a Gerrit internal group.
982
983The groups to be included into the group must be provided in the
984request body as a link:#groups-input[GroupsInput] entity.
985
986.Request
987----
988 POST /groups/MyProject-Committers/groups.add HTTP/1.0
989 Content-Type: application/json;charset=UTF-8
990
991 {
992 "groups": {
993 "MyGroup",
994 "MyOtherGroup"
995 }
996 }
997----
998
999As response a list of link:#group-info[GroupInfo] entities is
1000returned that describes the groups that were specified in the
1001link:#groups-input[GroupsInput]. A link:#group-info[GroupInfo] entity
1002is returned for each group specified in the input, independently of
1003whether the group was newly included into the group or whether the
1004group was already included in the group.
1005
1006.Response
1007----
1008 HTTP/1.1 200 OK
1009 Content-Disposition: attachment
1010 Content-Type: application/json;charset=UTF-8
1011
1012 )]}'
1013 [
1014 {
1015 "kind": "gerritcodereview#group",
1016 "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389",
1017 "name": "MyGroup",
1018 "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389",
1019 "options": {
Edwin Kempin2689e3d2013-02-07 15:52:36 +01001020 },
1021 "group_id": 8,
Edwin Kempinc6993fb2013-02-11 12:39:13 +01001022 "owner": "Administrators",
Edwin Kempin2689e3d2013-02-07 15:52:36 +01001023 "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
1024 },
1025 {
1026 "kind": "gerritcodereview#group",
1027 "id": "5057f3cbd3519d6ab69364429a89ffdffba50f73",
1028 "name": "MyOtherGroup",
1029 "url": "#/admin/groups/uuid-5057f3cbd3519d6ab69364429a89ffdffba50f73",
1030 "options": {
Edwin Kempin2689e3d2013-02-07 15:52:36 +01001031 },
1032 "group_id": 10,
Edwin Kempinc6993fb2013-02-11 12:39:13 +01001033 "owner": "MyOtherGroup",
Edwin Kempin2689e3d2013-02-07 15:52:36 +01001034 "owner_id": "5057f3cbd3519d6ab69364429a89ffdffba50f73"
1035 }
1036 ]
1037----
1038
1039[[delete-included-group]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001040Delete Included Group
1041~~~~~~~~~~~~~~~~~~~~~
1042[verse]
1043'DELETE /groups/link:#group-id[\{group-id\}]/groups/link:#group-id[\{group-id\}]'
1044
Edwin Kempin2689e3d2013-02-07 15:52:36 +01001045Deletes an included group from a Gerrit internal group.
1046
1047.Request
1048----
1049 DELETE /groups/MyProject-Committers/groups/MyGroup HTTP/1.0
1050----
1051
1052.Response
1053----
1054 HTTP/1.1 204 No Content
1055----
1056
1057[[delete-included-groups]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001058Delete Included Groups
1059~~~~~~~~~~~~~~~~~~~~~~
1060[verse]
1061'POST /groups/link:#group-id[\{group-id\}]/groups.delete'
1062
Edwin Kempin2689e3d2013-02-07 15:52:36 +01001063Delete one or several included groups from a Gerrit internal group.
1064
1065The groups to be deleted from the group must be provided in the request
1066body as a link:#groups-input[GroupsInput] entity.
1067
1068.Request
1069----
1070 POST /groups/MyProject-Committers/groups.delete HTTP/1.0
1071 Content-Type: application/json;charset=UTF-8
1072
1073 {
1074 "members": {
1075 "MyGroup",
1076 "MyOtherGroup"
1077 }
1078 }
1079----
1080
1081.Response
1082----
1083 HTTP/1.1 204 No Content
1084----
1085
Edwin Kempinaa266ff2013-02-05 12:41:09 +01001086
Edwin Kempin34d83352013-02-06 10:40:17 +01001087[[ids]]
1088IDs
1089---
1090
Edwin Kempin2cdef5f2013-02-06 16:50:15 +01001091[[account-id]]
Edwin Kempin4efe2572013-02-27 10:16:17 +01001092link:rest-api-accounts.html#account-id[\{account-id\}]
1093~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1094--
1095--
Edwin Kempina5d6ead2013-02-06 10:59:06 +01001096
Edwin Kempin2689e3d2013-02-07 15:52:36 +01001097[[group-id]]
Edwin Kempin34d83352013-02-06 10:40:17 +01001098\{group-id\}
1099~~~~~~~~~~~~
1100Identifier for a group.
1101
1102This can be:
1103
1104* the UUID of the group
1105* the legacy numeric ID of the group
1106* the name of the group if it is unique
1107
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001108[[group-name]]
Edwin Kempin34d83352013-02-06 10:40:17 +01001109\{group-name\}
1110~~~~~~~~~~~~~~
1111Group name that uniquely identifies one group.
1112
1113
Edwin Kempin987d5432013-02-04 10:20:44 +01001114[[json-entities]]
1115JSON Entities
1116-------------
1117
1118[[group-info]]
1119GroupInfo
1120~~~~~~~~~
1121The `GroupInfo` entity contains information about a group. This can be
1122a Gerrit internal group, or an external group that is known to Gerrit.
1123
1124[options="header",width="50%",cols="1,^1,5"]
1125|===========================
1126|Field Name ||Description
1127|`kind` ||`gerritcodereview#group`
1128|`id` ||The URL encoded UUID of the group.
Edwin Kempin5b591d12013-03-08 09:18:35 +01001129|`name` |
1130not set if returned in a map where the group name is used as map key|
1131The name of the group.
Edwin Kempin987d5432013-02-04 10:20:44 +01001132|`url` |optional|
1133URL to information about the group. Typically a URL to a web page that
1134permits users to apply to join the group, or manage their membership.
1135|`options` ||link:#group-options-info[Options of the group]
1136|`description` |only for internal groups|The description of the group.
1137|`group_id` |only for internal groups|The numeric ID of the group.
Edwin Kempinc6993fb2013-02-11 12:39:13 +01001138|`owner` |only for internal groups|The name of the owner group.
Edwin Kempin987d5432013-02-04 10:20:44 +01001139|`owner_id` |only for internal groups|The URL encoded UUID of the owner group.
Edwin Kempinabaab5462013-02-11 15:30:19 +01001140|`members` |optional, only for internal groups|
1141A list of link:rest-api-accounts.html#account-info[AccountInfo]
1142entities describing the direct members. +
1143Only set if link:#members[members] are requested.
1144|`includes` |optional, only for internal groups|
1145A list of link:#group-info[GroupInfo] entities describing the directly
1146included groups. +
1147Only set if link:#includes[included groups] are requested.
Edwin Kempin987d5432013-02-04 10:20:44 +01001148|===========================
1149
Edwin Kempinc42abb92013-02-04 14:52:41 +01001150The type of a group can be deduced from the group's UUID:
1151[width="50%"]
1152|============
1153|UUID matches "^[0-9a-f]\{40\}$"|Gerrit internal group
1154|UUID starts with "global:"|Gerrit system group
1155|UUID starts with "ldap:"|LDAP group
1156|UUID starts with "<prefix>:"|other external group
1157|============
1158
Edwin Kempinaa266ff2013-02-05 12:41:09 +01001159[[group-input]]
1160GroupInput
1161~~~~~~~~~~
1162The 'GroupInput' entity contains information for the creation of
1163a new internal group.
1164
1165[options="header",width="50%",cols="1,^1,5"]
1166|===========================
1167|Field Name ||Description
1168|`name` |optional|The name of the group (not encoded). +
1169If set, must match the group name in the URL.
1170|`description` |optional|The description of the group.
1171|`visible_to_all`|optional|
1172Whether the group is visible to all registered users. +
1173`false` if not set.
1174|`owner_id`|optional|The URL encoded ID of the owner group. +
1175This can be a group UUID, a legacy numeric group ID or a unique group
1176name. +
1177If not set, the new group will be self-owned.
1178|===========================
1179
Edwin Kempin2689e3d2013-02-07 15:52:36 +01001180[[groups-input]]
1181GroupsInput
1182~~~~~~~~~~~
1183The `GroupsInput` entity contains information about groups that should
1184be included into a group or that should be deleted from a group.
1185
1186[options="header",width="50%",cols="1,^1,5"]
1187|==========================
1188|Field Name ||Description
1189|`_one_group` |optional|
1190The link:#group-id[id] of one group that should be included or deleted.
1191|`groups` |optional|
1192A list of link:#group-id[group ids] that identify the groups that
1193should be included or deleted.
1194|==========================
1195
Edwin Kempin987d5432013-02-04 10:20:44 +01001196[[group-options-info]]
1197GroupOptionsInfo
1198~~~~~~~~~~~~~~~~
1199Options of the group.
1200
1201[options="header",width="50%",cols="1,^1,5"]
Edwin Kempinf04fc9c2013-02-05 14:09:45 +01001202|=============================
1203|Field Name ||Description
Edwin Kempinf04fc9c2013-02-05 14:09:45 +01001204|`visible_to_all`|not set if `false`|
Edwin Kempin987d5432013-02-04 10:20:44 +01001205Whether the group is visible to all registered users.
Edwin Kempinf04fc9c2013-02-05 14:09:45 +01001206|=============================
Edwin Kempin987d5432013-02-04 10:20:44 +01001207
Edwin Kempin1461c222013-02-11 08:41:08 +01001208[[group-options-input]]
1209GroupOptionsInput
1210~~~~~~~~~~~~~~~~~
1211New options for a group.
1212
1213[options="header",width="50%",cols="1,^1,5"]
1214|=============================
1215|Field Name ||Description
1216|`visible_to_all`|not set if `false`|
1217Whether the group is visible to all registered users.
1218|=============================
1219
Sasa Zivkov737e0a32013-03-18 14:21:42 +01001220[[members-input]]
1221MembersInput
Edwin Kempin2cdef5f2013-02-06 16:50:15 +01001222~~~~~~~~~~~
Sasa Zivkov737e0a32013-03-18 14:21:42 +01001223The `MembersInput` entity contains information about accounts that should
Edwin Kempinacbdfd32013-02-07 12:38:53 +01001224be added as members to a group or that should be deleted from the group.
Edwin Kempin2cdef5f2013-02-06 16:50:15 +01001225
1226[options="header",width="50%",cols="1,^1,5"]
1227|==========================
1228|Field Name ||Description
1229|`_one_member`|optional|
Edwin Kempinacbdfd32013-02-07 12:38:53 +01001230The link:#account-id[id] of one account that should be added or
1231deleted.
Edwin Kempin2cdef5f2013-02-06 16:50:15 +01001232|`members` |optional|
1233A list of link:#account-id[account ids] that identify the accounts that
Edwin Kempinacbdfd32013-02-07 12:38:53 +01001234should be added or deleted.
Edwin Kempin2cdef5f2013-02-06 16:50:15 +01001235|==========================
1236
1237
Edwin Kempind0a63922013-01-23 16:32:59 +01001238GERRIT
1239------
1240Part of link:index.html[Gerrit Code Review]