blob: 88b45777eb30cf36eb8a2c77461a5af3cbc55798 [file] [log] [blame]
Edwin Kempin2eebd142013-03-06 15:28:34 +01001Gerrit Code Review - /projects/ REST API
2========================================
Edwin Kempind0a63922013-01-23 16:32:59 +01003
4This page describes the project related REST endpoints.
5Please also take note of the general information on the
6link:rest-api.html[REST API].
7
8Endpoints
9---------
10
Edwin Kempinc3fe3cb2013-02-13 15:09:23 +010011[[project-endpoints]]
12Project Endpoints
13-----------------
14
Edwin Kempin76202742013-02-15 13:51:50 +010015[[list-projects]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +010016List Projects
17~~~~~~~~~~~~~
18[verse]
19'GET /projects/'
20
Edwin Kempind0a63922013-01-23 16:32:59 +010021Lists the projects accessible by the caller. This is the same as
22using the link:cmd-ls-projects.html[ls-projects] command over SSH,
23and accepts the same options as query parameters.
24
Edwin Kempin51a6dc92013-02-04 15:43:59 +010025As result a map is returned that maps the project names to
26link:#project-info[ProjectInfo] entries. The entries in the map are sorted
27by project name.
28
Edwin Kempin37440832013-02-06 11:36:00 +010029.Request
Edwin Kempind0a63922013-01-23 16:32:59 +010030----
31 GET /projects/?d HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +010032----
Edwin Kempind0a63922013-01-23 16:32:59 +010033
Edwin Kempin37440832013-02-06 11:36:00 +010034.Response
35----
Edwin Kempind0a63922013-01-23 16:32:59 +010036 HTTP/1.1 200 OK
37 Content-Disposition: attachment
38 Content-Type: application/json;charset=UTF-8
39
40 )]}'
41 {
42 "external/bison": {
43 "kind": "gerritcodereview#project",
44 "id": "external%2Fbison",
45 "description": "GNU parser generator"
46 },
47 "external/gcc": {
48 "kind": "gerritcodereview#project",
49 "id": "external%2Fgcc",
50 },
51 "external/openssl": {
52 "kind": "gerritcodereview#project",
53 "id": "external%2Fopenssl",
54 "description": "encryption\ncrypto routines"
55 },
56 "test": {
57 "kind": "gerritcodereview#project",
58 "id": "test",
59 "description": "\u003chtml\u003e is escaped"
60 }
61 }
62----
63
Edwin Kempina64c4b92013-01-23 11:30:40 +010064.Get all projects with their description
65****
66get::/projects/?d
67****
68
Edwin Kempind0a63922013-01-23 16:32:59 +010069[[suggest-projects]]
70The `/projects/` URL also accepts a prefix string in the `p` parameter.
71This limits the results to those projects that start with the specified
72prefix.
73List all projects that start with `platform/`:
Edwin Kempin37440832013-02-06 11:36:00 +010074
75.Request
Edwin Kempind0a63922013-01-23 16:32:59 +010076----
77 GET /projects/?p=platform%2F HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +010078----
Edwin Kempind0a63922013-01-23 16:32:59 +010079
Edwin Kempin37440832013-02-06 11:36:00 +010080.Response
81----
Edwin Kempind0a63922013-01-23 16:32:59 +010082 HTTP/1.1 200 OK
83 Content-Disposition: attachment
84 Content-Type: application/json;charset=UTF-8
85
86 )]}'
87 {
88 "platform/drivers": {
89 "kind": "gerritcodereview#project",
90 "id": "platform%2Fdrivers",
91 },
92 "platform/tools": {
93 "kind": "gerritcodereview#project",
94 "id": "platform%2Ftools",
95 }
96 }
97----
98E.g. this feature can be used by suggestion client UI's to limit results.
99
Edwin Kempin5c544e22013-03-06 13:35:45 +0100100[[get-project]]
101Get Project
102~~~~~~~~~~~
103[verse]
104'GET /projects/link:#project-name[\{project-name\}]'
105
106Retrieves a project.
107
108.Request
109----
110 GET /projects/plugins%2Freplication HTTP/1.0
111----
112
113As response a link:#project-info[ProjectInfo] entity is returned that
114describes the project.
115
116.Response
117----
118 HTTP/1.1 200 OK
119 Content-Disposition: attachment
120 Content-Type: application/json;charset=UTF-8
121
122 )]}'
123 {
124 "kind": "gerritcodereview#project",
125 "id": "plugins%2Freplication",
126 "name": "plugins/replication",
127 "parent": "Public-Plugins",
128 "description": "Copies to other servers using the Git protocol"
129 }
130----
131
Bruce Zu798ea122013-02-18 16:55:43 +0800132[[create-project]]
133Create Project
134~~~~~~~~~~~~~~
135[verse]
136'PUT /projects/link:#project-name[\{project-name\}]'
137
138Creates a new project.
139
140In the request body additional data for the project can be provided as
141link:#project-input[ProjectInput].
142
143.Request
144----
145 PUT /projects/MyProject HTTP/1.0
146 Content-Type: application/json;charset=UTF-8
147
148 {
149 "description": "This is a demo project.",
150 "submit_type": "CHERRY_PICK",
151 "owners": [
152 "MyProject-Owners"
153 ]
154 }
155----
156
157As response the link:#project-info[ProjectInfo] entity is returned that
158describes the created project.
159
160.Response
161----
162 HTTP/1.1 201 Created
163 Content-Disposition: attachment
164 Content-Type: application/json;charset=UTF-8
165
166 )]}'
167 {
168 "kind": "gerritcodereview#project",
169 "id": "MyProject",
170 "name": "MyProject",
171 "parent": "All-Projects",
172 "description": "This is a demo project."
173 }
174----
175
Edwin Kempin57f303c2013-02-13 15:52:22 +0100176[[get-project-description]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100177Get Project Description
178~~~~~~~~~~~~~~~~~~~~~~~
179[verse]
180'GET /projects/link:#project-name[\{project-name\}]/description'
181
Edwin Kempin57f303c2013-02-13 15:52:22 +0100182Retrieves the description of a project.
183
184.Request
185----
186 GET /projects/plugins%2Freplication/description HTTP/1.0
187----
188
189.Response
190----
191 HTTP/1.1 200 OK
192 Content-Disposition: attachment
193 Content-Type: application/json;charset=UTF-8
194
195 )]}'
196 "Copies to other servers using the Git protocol"
197----
198
Edwin Kempinefec4492013-02-22 10:09:23 +0100199If the project does not have a description an empty string is returned.
200
Edwin Kempin57f303c2013-02-13 15:52:22 +0100201[[set-project-description]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100202Set Project Description
203~~~~~~~~~~~~~~~~~~~~~~~
204[verse]
205'PUT /projects/link:#project-name[\{project-name\}]/description'
206
Edwin Kempin57f303c2013-02-13 15:52:22 +0100207Sets the description of a project.
208
209The new project description must be provided in the request body inside
210a link:#project-description-input[ProjectDescriptionInput] entity.
211
212.Request
213----
214 PUT /projects/plugins%2Freplication/description HTTP/1.0
215 Content-Type: application/json;charset=UTF-8
216
217 {
218 "description": "Plugin for Gerrit that handles the replication.",
219 "commit_message": "Update the project description"
220 }
221----
222
223As response the new project description is returned.
224
225.Response
226----
227 HTTP/1.1 200 OK
228 Content-Disposition: attachment
229 Content-Type: application/json;charset=UTF-8
230
231 )]}'
232 "Plugin for Gerrit that handles the replication."
233----
234
Edwin Kempin114ab162013-02-28 09:25:37 +0100235If the description was deleted the response is "`204 No Content`".
236
Edwin Kempin57f303c2013-02-13 15:52:22 +0100237[[delete-project-description]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100238Delete Project Description
239~~~~~~~~~~~~~~~~~~~~~~~~~~
240[verse]
241'DELETE /projects/link:#project-name[\{project-name\}]/description'
242
Edwin Kempin57f303c2013-02-13 15:52:22 +0100243Deletes the description of a project.
244
Edwin Kempinefec4492013-02-22 10:09:23 +0100245The request body does not need to include a
246link:#project-description-input[ProjectDescriptionInput] entity if no
247commit message is specified.
Edwin Kempin57f303c2013-02-13 15:52:22 +0100248
Edwin Kempinefec4492013-02-22 10:09:23 +0100249Please note that some proxies prohibit request bodies for DELETE
Edwin Kempin57f303c2013-02-13 15:52:22 +0100250requests. In this case, if you want to specify a commit message, use
251link:#set-project-description[PUT] to delete the description.
252
253.Request
254----
255 DELETE /projects/plugins%2Freplication/description HTTP/1.0
256----
257
258.Response
259----
260 HTTP/1.1 204 No Content
261----
262
Edwin Kempinecad88c2013-02-14 12:09:44 +0100263[[get-project-parent]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100264Get Project Parent
265~~~~~~~~~~~~~~~~~~
266[verse]
267'GET /projects/link:#project-name[\{project-name\}]/parent'
268
Edwin Kempinecad88c2013-02-14 12:09:44 +0100269Retrieves the name of a project's parent project. For the
270`All-Projects` root project an empty string is returned.
271
272.Request
273----
274 GET /projects/plugins%2Freplication/parent HTTP/1.0
275----
276
277.Response
278----
279 HTTP/1.1 200 OK
280 Content-Disposition: attachment
281 Content-Type: application/json;charset=UTF-8
282
283 )]}'
284 "All-Projects"
285----
286
287[[set-project-parent]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100288Set Project Parent
289~~~~~~~~~~~~~~~~~~
290[verse]
291'PUT /projects/link:#project-name[\{project-name\}]/parent'
292
Edwin Kempinecad88c2013-02-14 12:09:44 +0100293Sets the parent project for a project.
294
295The new name of the parent project must be provided in the request body
296inside a link:#project-parent-input[ProjectParentInput] entity.
297
298.Request
299----
300 PUT /projects/plugins%2Freplication/parent HTTP/1.0
301 Content-Type: application/json;charset=UTF-8
302
303 {
304 "parent": "Public-Plugins",
305 "commit_message": "Update the project parent"
306 }
307----
308
309As response the new parent project name is returned.
310
311.Response
312----
313 HTTP/1.1 200 OK
314 Content-Disposition: attachment
315 Content-Type: application/json;charset=UTF-8
316
317 )]}'
318 "Public-Plugins"
319----
320
Edwin Kempin6b813372013-03-13 17:07:33 +0100321[[get-head]]
322Get HEAD
323~~~~~~~~
324[verse]
325'GET /projects/link:#project-name[\{project-name\}]/HEAD'
326
327Retrieves for a project the name of the branch to which `HEAD` points.
328
329.Request
330----
331 GET /projects/plugins%2Freplication/HEAD HTTP/1.0
332----
333
334.Response
335----
336 HTTP/1.1 200 OK
337 Content-Disposition: attachment
338 Content-Type: application/json;charset=UTF-8
339
340 )]}'
341 "refs/heads/master"
342----
343
344[[set-head]]
345Set HEAD
346~~~~~~~~
347[verse]
348'PUT /projects/link:#project-name[\{project-name\}]/HEAD'
349
350Sets `HEAD` for a project.
351
352The new ref to which `HEAD` should point must be provided in the
353request body inside a link:#head-input[HeadInput] entity.
354
355.Request
356----
357 PUT /projects/plugins%2Freplication/HEAD HTTP/1.0
358 Content-Type: application/json;charset=UTF-8
359
360 {
361 "ref": "refs/heads/stable"
362 }
363----
364
365As response the new ref to which `HEAD` points is returned.
366
367.Response
368----
369 HTTP/1.1 200 OK
370 Content-Disposition: attachment
371 Content-Type: application/json;charset=UTF-8
372
373 )]}'
374 "refs/heads/stable"
375----
376
Edwin Kempin19ea9b92013-03-20 13:20:26 +0100377[[get-repository-statistics]]
378Get Repository Statistics
379~~~~~~~~~~~~~~~~~~~~~~~~~
380[verse]
381'GET /projects/link:#project-name[\{project-name\}]/statistics.git'
382
383Return statistics for the repository of a project.
384
385.Request
386----
387 GET /projects/plugins%2Freplication/statistics.git HTTP/1.0
388----
389
390The repository statistics are returned as a
391link:#repository-statistics-info[RepositoryStatisticsInfo] entity.
392
393.Response
394----
395 HTTP/1.1 200 OK
396 Content-Disposition: attachment
397 Content-Type: application/json;charset=UTF-8
398
399 )]}'
400 {
401 "number_of_loose_objects": 127,
402 "number_of_loose_refs": 15,
403 "number_of_pack_files": 15,
404 "number_of_packed_objects": 67,
405 "number_of_packed_refs": 0,
406 "size_of_loose_objects": 29466,
407 "size_of_packed_objects": 9646
408 }
409----
410
Dave Borowitz237073a2013-04-04 16:52:27 -0700411[[get-config]]
412Get Config
413~~~~~~~~~~
414[verse]
415'GET /projects/link:#project-name[\{project-name\}]/config'
416
417Gets some configuration information about a project. Note that this
418config info is not simply the contents of `project.config`; it generally
419contains fields that may have been inherited from parent projects.
420
421.Request
422----
423 GET /projects/myproject/config
424----
425
426A link:#config-info[ConfigInfo] entity is returned that describes the
427project configuration. Some fields are only visible to users that have
428read access to `refs/meta/config`.
429
430.Response
431----
432 HTTP/1.1 200 OK
433 Content-Disposition: attachment
434 Content-Type: application/json;charset=UTF-8
435
436 )]}'
437 {
438 "kind": "gerritcodereview#project_config",
Edwin Kempina23eb102013-07-17 09:10:54 +0200439 "description": "demo project",
Edwin Kempin0cb5a562013-07-12 15:41:04 +0200440 "use_contributor_agreements": {
441 "value": true,
442 "configured_value": "TRUE",
443 "inherited_value": false
444 },
445 "use_content_merge": {
446 "value": true,
447 "configured_value": "INHERIT",
448 "inherited_value": true
449 },
450 "use_signed_off_by": {
451 "value": false,
452 "configured_value": "INHERIT",
453 "inherited_value": false
454 },
455 "require_change_id": {
456 "value": false,
457 "configured_value": "FALSE",
458 "inherited_value": true
Edwin Kempin3c99f592013-07-15 10:12:27 +0200459 },
460 "max_object_size_limit": {
461 "value": "15m",
462 "configured_value": "15m",
463 "inherited_value": "20m"
464 },
465 "submit_type": "MERGE_IF_NECESSARY",
466 "state": "ACTIVE",
Dave Borowitz20027892013-04-08 10:42:23 -0700467 "commentlinks": {}
Dave Borowitz237073a2013-04-04 16:52:27 -0700468 }
469----
470
Edwin Kempina23eb102013-07-17 09:10:54 +0200471[[set-config]]
472Set Config
473~~~~~~~~~~
474[verse]
475'PUT /projects/link:#project-name[\{project-name\}]/config'
476
477Sets the configuration of a project.
478
479The new configuration must be provided in the request body as a
480link:#config-input[ConfigInput] entity.
481
482.Request
483----
484 PUT /projects/myproject/config HTTP/1.0
485 Content-Type: application/json;charset=UTF-8
486
487 {
488 "description": "demo project",
489 "use_contributor_agreements": "FALSE",
490 "use_content_merge": "INHERIT",
491 "use_signed_off_by": "INHERIT",
492 "require_change_id": "TRUE",
493 "max_object_size_limit": "10m",
494 "submit_type": "REBASE_IF_NECESSARY",
495 "state": "ACTIVE"
496 }
497----
498
499As response the new configuration is returned as a link:#config-info[
500ConfigInfo] entity.
501
502.Response
503----
504 HTTP/1.1 200 OK
505 Content-Disposition: attachment
506 Content-Type: application/json;charset=UTF-8
507
508 )]}'
509 {
510 "kind": "gerritcodereview#project_config",
511 "use_contributor_agreements": {
512 "value": false,
513 "configured_value": "FALSE",
514 "inherited_value": false
515 },
516 "use_content_merge": {
517 "value": true,
518 "configured_value": "INHERIT",
519 "inherited_value": true
520 },
521 "use_signed_off_by": {
522 "value": false,
523 "configured_value": "INHERIT",
524 "inherited_value": false
525 },
526 "require_change_id": {
527 "value": true,
528 "configured_value": "TRUE",
529 "inherited_value": true
530 },
531 "max_object_size_limit": {
532 "value": "10m",
533 "configured_value": "10m",
534 "inherited_value": "20m"
535 },
536 "submit_type": "REBASE_IF_NECESSARY",
537 "state": "ACTIVE",
538 "commentlinks": {}
539 }
540----
541
Edwin Kempinef3542f2013-03-19 13:31:49 +0100542[[run-gc]]
543Run GC
544~~~~~~
545[verse]
546'POST /projects/link:#project-name[\{project-name\}]/gc'
547
548Run the Git garbage collection for the repository of a project.
549
550.Request
551----
552 POST /projects/plugins%2Freplication/gc HTTP/1.0
553----
554
555The response is the streamed output of the garbage collection.
556
557.Response
558----
559 HTTP/1.1 200 OK
560 Content-Disposition: attachment
561 Content-Type: text/plain;charset=UTF-8
562
563 collecting garbage for "plugins/replication":
564 Pack refs: 100% (21/21)
565 Counting objects: 20
566 Finding sources: 100% (20/20)
567 Getting sizes: 100% (13/13)
568 Compressing objects: 83% (5/6)
569 Writing objects: 100% (20/20)
570 Selecting commits: 100% (7/7)
571 Building bitmaps: 100% (7/7)
572 Finding sources: 100% (41/41)
573 Getting sizes: 100% (25/25)
574 Compressing objects: 52% (12/23)
575 Writing objects: 100% (41/41)
576 Prune loose objects also found in pack files: 100% (36/36)
577 Prune loose, unreferenced objects: 100% (36/36)
578 done.
579----
580
Edwin Kempina686de92013-05-09 15:12:34 +0200581[[branch-endpoints]]
582Branch Endpoints
583----------------
584
585[[list-branches]]
586List Branches
587~~~~~~~~~~~~~
588[verse]
589'GET /projects/link:#project-name[\{project-name\}]/branches/'
590
591List the branches of a project.
592
593As result a list of link:#branch-info[BranchInfo] entries is
594returned.
595
596.Request
597----
598 GET /projects/work%2Fmy-project/branches/ HTTP/1.0
599----
600
601.Response
602----
603 HTTP/1.1 200 OK
604 Content-Disposition: attachment
605 Content-Type: application/json;charset=UTF-8
606
607 )]}'
608 [
609 {
610 "ref": "HEAD",
611 "revision": "master"
612 },
613 {
614 "ref": "refs/meta/config",
615 "revision": "76016386a0d8ecc7b6be212424978bb45959d668"
616 },
617 {
618 "ref": "refs/heads/master",
619 "revision": "67ebf73496383c6777035e374d2d664009e2aa5c"
620 },
621 {
622 "ref": "refs/heads/stable",
623 "revision": "64ca533bd0eb5252d2fee83f63da67caae9b4674",
624 "can_delete": true
625 }
626 ]
627----
628
Edwin Kempin196e1732013-05-09 15:12:34 +0200629[[get-branch]]
630Get Branch
631~~~~~~~~~~
632[verse]
633'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]'
634
635Retrieves a branch of a project.
636
637.Request
638----
639 GET /projects/work%2Fmy-project/branches/master HTTP/1.0
640----
641
642As response a link:#branch-info[BranchInfo] entity is returned that
643describes the branch.
644
645.Response
646----
647 HTTP/1.1 200 OK
648 Content-Disposition: attachment
649 Content-Type: application/json;charset=UTF-8
650
651 )]}'
652 {
653 "ref": "refs/heads/master",
654 "revision": "67ebf73496383c6777035e374d2d664009e2aa5c"
655 }
656----
657
Edwin Kempin5c0d6b32013-05-09 19:54:37 +0200658[[create-branch]]
659Create Branch
660~~~~~~~~~~~~~
661[verse]
662'PUT /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]'
663
664Creates a new branch.
665
666In the request body additional data for the branch can be provided as
667link:#branch-input[BranchInput].
668
669.Request
670----
671 PUT /projects/MyProject/branches/stable HTTP/1.0
672 Content-Type: application/json;charset=UTF-8
673
674 {
675 "revision": "76016386a0d8ecc7b6be212424978bb45959d668"
676 }
677----
678
679As response a link:#branch-info[BranchInfo] entity is returned that
680describes the created branch.
681
682.Response
683----
684 HTTP/1.1 201 Created
685 Content-Disposition: attachment
686 Content-Type: application/json;charset=UTF-8
687
688 )]}'
689 {
690 "ref": "refs/heads/stable",
691 "revision": "76016386a0d8ecc7b6be212424978bb45959d668",
692 "can_delete": true
693 }
694----
695
Edwin Kempin6ce96a12013-06-06 13:20:01 +0200696[[delete-branch]]
697Delete Branch
698~~~~~~~~~~~~~
699[verse]
700'DELETE /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]'
701
702Deletes a branch.
703
704.Request
705----
706 DELETE /projects/MyProject/branches/stable HTTP/1.0
707----
708
709.Response
710----
711 HTTP/1.1 204 No Content
712----
713
Edwin Kempin4425c742013-03-18 13:23:00 +0100714[[child-project-endpoints]]
715Child Project Endpoints
716-----------------------
717
718[[list-child-projects]]
719List Child Projects
720~~~~~~~~~~~~~~~~~~~
721[verse]
722'GET /projects/link:#project-name[\{project-name\}]/children/'
723
724List the direct child projects of a project.
725
726.Request
727----
728 GET /projects/Public-Plugins/children/ HTTP/1.0
729----
730
731As result a list of link:#project-info[ProjectInfo] entries is
732returned that describe the child projects.
733
734.Response
735----
736 HTTP/1.1 200 OK
737 Content-Disposition: attachment
738 Content-Type: application/json;charset=UTF-8
739
740 )]}'
741 [
742 {
743 "kind": "gerritcodereview#project",
744 "id": "plugins%2Freplication",
745 "name": "plugins/replication",
746 "parent": "Public-Plugins",
747 "description": "Copies to other servers using the Git protocol"
748 },
749 {
750 "kind": "gerritcodereview#project",
751 "id": "plugins%2Freviewnotes",
752 "name": "plugins/reviewnotes",
753 "parent": "Public-Plugins",
754 "description": "Annotates merged commits using notes on refs/notes/review."
755 },
756 {
757 "kind": "gerritcodereview#project",
758 "id": "plugins%2Fsingleusergroup",
759 "name": "plugins/singleusergroup",
760 "parent": "Public-Plugins",
761 "description": "GroupBackend enabling users to be directly added to access rules"
762 }
763 ]
764----
765
Edwin Kempinf95bd172013-03-19 11:10:57 +0100766To resolve the child projects of a project recursively the parameter
767`recursive` can be set.
768
769Child projects that are not visible to the calling user are ignored and
770are not resolved further.
771
772.Request
773----
774 GET /projects/Public-Projects/children/?recursive HTTP/1.0
775----
776
777.Response
778----
779 HTTP/1.1 200 OK
780 Content-Disposition: attachment
781 Content-Type: application/json;charset=UTF-8
782
783 )]}'
784 [
785 {
786 "kind": "gerritcodereview#project",
787 "id": "gerrit",
788 "name": "gerrit",
789 "parent": "Public-Projects",
790 "description": "Gerrit Code Review"
791 },
792 {
793 "kind": "gerritcodereview#project",
794 "id": "plugins%2Freplication",
795 "name": "plugins/replication",
796 "parent": "Public-Plugins",
797 "description": "Copies to other servers using the Git protocol"
798 },
799 {
800 "kind": "gerritcodereview#project",
801 "id": "plugins%2Freviewnotes",
802 "name": "plugins/reviewnotes",
803 "parent": "Public-Plugins",
804 "description": "Annotates merged commits using notes on refs/notes/review."
805 },
806 {
807 "kind": "gerritcodereview#project",
808 "id": "plugins%2Fsingleusergroup",
809 "name": "plugins/singleusergroup",
810 "parent": "Public-Plugins",
811 "description": "GroupBackend enabling users to be directly added to access rules"
812 },
813 {
814 "kind": "gerritcodereview#project",
815 "id": "Public-Plugins",
816 "name": "Public-Plugins",
817 "parent": "Public-Projects",
818 "description": "Parent project for plugins/*"
819 }
820 ]
821----
822
Edwin Kempin5b6c4062013-03-19 09:26:03 +0100823[[get-child-project]]
824Get Child Project
825~~~~~~~~~~~~~~~~~
826[verse]
827'GET /projects/link:#project-name[\{project-name\}]/children/link:#project-name[\{project-name\}]'
828
Edwin Kempin8a3fb5b2013-03-21 15:02:22 +0100829Retrieves a child project. If a non-direct child project should be
830retrieved the parameter `recursive` must be set.
Edwin Kempin5b6c4062013-03-19 09:26:03 +0100831
832.Request
833----
834 GET /projects/Public-Plugins/children/plugins%2Freplication HTTP/1.0
835----
836
837As response a link:#project-info[ProjectInfo] entity is returned that
838describes the child project.
839
840.Response
841----
842 HTTP/1.1 200 OK
843 Content-Disposition: attachment
844 Content-Type: application/json;charset=UTF-8
845
846 )]}'
847 {
848 "kind": "gerritcodereview#project",
849 "id": "plugins%2Freplication",
850 "name": "plugins/replication",
851 "parent": "Public-Plugins",
852 "description": "Copies to other servers using the Git protocol"
853 }
854----
855
Edwin Kempinc3fe3cb2013-02-13 15:09:23 +0100856[[dashboard-endpoints]]
857Dashboard Endpoints
858-------------------
859
Edwin Kempin76202742013-02-15 13:51:50 +0100860[[list-dashboards]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100861List Dashboards
862~~~~~~~~~~~~~~~
863[verse]
864'GET /projects/link:#project-name[\{project-name\}]/dashboards/'
865
Edwin Kempind0a63922013-01-23 16:32:59 +0100866List custom dashboards for a project.
867
Edwin Kempin55367622013-02-05 09:09:23 +0100868As result a list of link:#dashboard-info[DashboardInfo] entries is
869returned.
870
Edwin Kempind0a63922013-01-23 16:32:59 +0100871List all dashboards for the `work/my-project` project:
Edwin Kempin37440832013-02-06 11:36:00 +0100872
873.Request
Edwin Kempind0a63922013-01-23 16:32:59 +0100874----
875 GET /projects/work%2Fmy-project/dashboards/ HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +0100876----
Edwin Kempind0a63922013-01-23 16:32:59 +0100877
Edwin Kempin37440832013-02-06 11:36:00 +0100878.Response
879----
Edwin Kempind0a63922013-01-23 16:32:59 +0100880 HTTP/1.1 200 OK
881 Content-Disposition: attachment
882 Content-Type: application/json;charset=UTF-8
883
884 )]}'
885 [
886 {
887 "kind": "gerritcodereview#dashboard",
888 "id": "main:closed",
889 "ref": "main",
890 "path": "closed",
891 "description": "Merged and abandoned changes in last 7 weeks",
892 "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
893 "default": true,
894 "title": "Closed changes",
895 "sections": [
896 {
897 "name": "Merged",
898 "query": "status:merged age:7w"
899 },
900 {
901 "name": "Abandoned",
902 "query": "status:abandoned age:7w"
903 }
904 ]
905 }
906 ]
907----
908
Edwin Kempina64c4b92013-01-23 11:30:40 +0100909.Get all dashboards of the 'All-Projects' project
910****
911get::/projects/All-Projects/dashboards/
912****
913
Edwin Kempin67e923c2013-02-14 13:57:12 +0100914[[get-dashboard]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100915Get Dashboard
916~~~~~~~~~~~~~
917[verse]
918'GET /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]'
919
Edwin Kempin67e923c2013-02-14 13:57:12 +0100920Retrieves a project dashboard. The dashboard can be defined on that
921project or be inherited from a parent project.
922
923.Request
924----
925 GET /projects/work%2Fmy-project/dashboards/main:closed HTTP/1.0
926----
927
928As response a link:#dashboard-info[DashboardInfo] entity is returned
929that describes the dashboard.
930
931.Response
932----
933 HTTP/1.1 200 OK
934 Content-Disposition: attachment
935 Content-Type: application/json;charset=UTF-8
936
937 )]}'
938 {
939 "kind": "gerritcodereview#dashboard",
940 "id": "main:closed",
941 "ref": "main",
942 "path": "closed",
943 "description": "Merged and abandoned changes in last 7 weeks",
944 "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
945 "default": true,
946 "title": "Closed changes",
947 "sections": [
948 {
949 "name": "Merged",
950 "query": "status:merged age:7w"
951 },
952 {
953 "name": "Abandoned",
954 "query": "status:abandoned age:7w"
955 }
956 ]
957 }
958----
959
960To retrieve the default dashboard of a project use `default` as
961dashboard-id.
Edwin Kempin37440832013-02-06 11:36:00 +0100962
963.Request
Edwin Kempind0a63922013-01-23 16:32:59 +0100964----
965 GET /projects/work%2Fmy-project/dashboards/default HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +0100966----
Edwin Kempind0a63922013-01-23 16:32:59 +0100967
Edwin Kempin37440832013-02-06 11:36:00 +0100968.Response
969----
Edwin Kempind0a63922013-01-23 16:32:59 +0100970 HTTP/1.1 200 OK
971 Content-Disposition: attachment
972 Content-Type: application/json;charset=UTF-8
973
974 )]}'
975 {
976 "kind": "gerritcodereview#dashboard",
977 "id": "main:closed",
978 "ref": "main",
979 "path": "closed",
Edwin Kempin67e923c2013-02-14 13:57:12 +0100980 "description": "Merged and abandoned changes in last 7 weeks",
981 "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
Edwin Kempind0a63922013-01-23 16:32:59 +0100982 "default": true,
Edwin Kempin67e923c2013-02-14 13:57:12 +0100983 "title": "Closed changes",
984 "sections": [
985 {
986 "name": "Merged",
987 "query": "status:merged age:7w"
988 },
989 {
990 "name": "Abandoned",
991 "query": "status:abandoned age:7w"
992 }
993 ]
Edwin Kempind0a63922013-01-23 16:32:59 +0100994 }
995----
996
Edwin Kempin67e923c2013-02-14 13:57:12 +0100997[[set-dashboard]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100998Set Dashboard
999~~~~~~~~~~~~~
1000[verse]
1001'PUT /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]'
1002
Edwin Kempin67e923c2013-02-14 13:57:12 +01001003Updates/Creates a project dashboard.
1004
1005Currently only supported for the `default` dashboard.
1006
1007The creation/update information for the dashboard must be provided in
1008the request body as a link:#dashboard-input[DashboardInput] entity.
1009
1010.Request
1011----
1012 PUT /projects/work%2Fmy-project/dashboards/default HTTP/1.0
1013 Content-Type: application/json;charset=UTF-8
1014
1015 {
1016 "id": "main:closed",
1017 "commit_message": "Define the default dashboard"
1018 }
1019----
1020
1021As response the new/updated dashboard is returned as a
1022link:#dashboard-info[DashboardInfo] entity.
1023
1024.Response
1025----
1026 HTTP/1.1 200 OK
1027 Content-Disposition: attachment
1028 Content-Type: application/json;charset=UTF-8
1029
1030 )]}'
1031 {
1032 "kind": "gerritcodereview#dashboard",
1033 "id": "main:closed",
1034 "ref": "main",
1035 "path": "closed",
1036 "description": "Merged and abandoned changes in last 7 weeks",
1037 "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
1038 "default": true,
1039 "title": "Closed changes",
1040 "sections": [
1041 {
1042 "name": "Merged",
1043 "query": "status:merged age:7w"
1044 },
1045 {
1046 "name": "Abandoned",
1047 "query": "status:abandoned age:7w"
1048 }
1049 ]
1050 }
1051----
1052
1053[[delete-dashboard]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001054Delete Dashboard
1055~~~~~~~~~~~~~~~~
1056[verse]
1057'DELETE /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]'
1058
Edwin Kempin67e923c2013-02-14 13:57:12 +01001059Deletes a project dashboard.
1060
1061Currently only supported for the `default` dashboard.
1062
Edwin Kempinefec4492013-02-22 10:09:23 +01001063The request body does not need to include a link:#dashboard-input[
John Spurlockd25fad12013-03-09 11:48:49 -05001064DashboardInput] entity if no commit message is specified.
Edwin Kempin67e923c2013-02-14 13:57:12 +01001065
1066Please note that some proxies prohibit request bodies for DELETE
1067requests.
1068
1069.Request
1070----
1071 DELETE /projects/work%2Fmy-project/dashboards/default HTTP/1.0
1072----
1073
1074.Response
1075----
1076 HTTP/1.1 204 No Content
1077----
1078
Edwin Kempin34d83352013-02-06 10:40:17 +01001079
1080[[ids]]
1081IDs
1082---
1083
Edwin Kempin196e1732013-05-09 15:12:34 +02001084[[branch-id]]
1085\{branch-id\}
1086~~~~~~~~~~~~~
1087The name of a branch or `HEAD`. The prefix `refs/heads/` can be
1088omitted.
1089
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001090[[dashboard-id]]
Edwin Kempin67e923c2013-02-14 13:57:12 +01001091\{dashboard-id\}
1092~~~~~~~~~~~~~~~~
1093The ID of a dashboard in the format '<ref>:<path>'.
1094
1095A special dashboard ID is `default` which represents the default
1096dashboard of a project.
1097
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001098[[project-name]]
Edwin Kempin34d83352013-02-06 10:40:17 +01001099\{project-name\}
1100~~~~~~~~~~~~~~~~
1101The name of the project.
1102
1103
Edwin Kempin51a6dc92013-02-04 15:43:59 +01001104[[json-entities]]
1105JSON Entities
1106-------------
1107
Edwin Kempina686de92013-05-09 15:12:34 +02001108[[branch-info]]
1109BranchInfo
1110~~~~~~~~~~
1111The `BranchInfo` entity contains information about a branch.
1112
1113[options="header",width="50%",cols="1,^2,4"]
1114|=========================
1115|Field Name ||Description
1116|`ref` ||The ref of the branch.
1117|`revision` ||The revision to which the branch points.
1118|`can_delete`|`false` if not set|
1119Whether the calling user can delete this branch.
1120|=========================
1121
Edwin Kempin5c0d6b32013-05-09 19:54:37 +02001122[[branch-input]]
1123BranchInput
1124~~~~~~~~~~~
1125The `BranchInput` entity contains information for the creation of
1126a new branch.
1127
1128[options="header",width="50%",cols="1,^2,4"]
1129|=======================
1130|Field Name||Description
1131|`ref` |optional|
1132The name of the branch. The prefix `refs/heads/` can be
1133omitted. +
1134If set, must match the branch ID in the URL.
1135|`revision`|optional|
1136The base revision of the new branch. +
1137If not set, `HEAD` will be used as base revision.
1138|=======================
1139
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001140[[config-info]]
1141ConfigInfo
1142~~~~~~~~~~
1143The `ConfigInfo` entity contains information about the effective project
1144configuration.
1145
Edwin Kempin81e1d1f2013-07-15 10:13:46 +02001146[options="header",width="50%",cols="1,^2,4"]
Edwin Kempin3660c132013-07-16 08:03:11 +02001147|=========================================
1148|Field Name ||Description
Edwin Kempina23eb102013-07-17 09:10:54 +02001149|`description` |optional|
1150The description of the project.
Edwin Kempin3660c132013-07-16 08:03:11 +02001151|`use_contributor_agreements`|optional|
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001152link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether
1153authors must complete a contributor agreement on the site before
1154pushing any commits or changes to this project.
Edwin Kempin3660c132013-07-16 08:03:11 +02001155|`use_content_merge` |optional|
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001156link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether
1157Gerrit will try to perform a 3-way merge of text file content when a
1158file has been modified by both the destination branch and the change
1159being submitted. This option only takes effect if submit type is not
1160FAST_FORWARD_ONLY.
Edwin Kempin3660c132013-07-16 08:03:11 +02001161|`use_signed_off_by` |optional|
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001162link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether
1163each change must contain a Signed-off-by line from either the author or
1164the uploader in the commit message.
Edwin Kempin3660c132013-07-16 08:03:11 +02001165|`require_change_id` |optional|
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001166link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether a
1167valid link:user-changeid.html[Change-Id] footer in any commit uploaded
1168for review is required. This does not apply to commits pushed directly
1169to a branch or tag.
Edwin Kempin3c99f592013-07-15 10:12:27 +02001170|`max_object_size_limit` ||
1171The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size
1172limit] of this project as a link:#max-object-size-limit-info[
1173MaxObjectSizeLimitInfo] entity.
1174|`submit_type` ||
1175The default submit type of the project, can be `MERGE_IF_NECESSARY`,
1176`FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `MERGE_ALWAYS` or
1177`CHERRY_PICK`.
1178|`state` |optional|
1179The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. +
1180Not set if the project state is `ACTIVE`.
Edwin Kempin3660c132013-07-16 08:03:11 +02001181|`commentlinks` ||
Edwin Kempin8aa53af2013-07-15 10:43:15 +02001182Map with the comment link configurations of the project. The name of
1183the comment link configuration is mapped to the comment link
1184configuration, which has the same format as the
1185link:config-gerrit.html#_a_id_commentlink_a_section_commentlink[
1186commentlink section] of `gerrit.config`.
Edwin Kempin3660c132013-07-16 08:03:11 +02001187|`theme` |optional|
Edwin Kempin272402e2013-07-15 11:17:36 +02001188The theme that is configured for the project as a link:#theme-info[
1189ThemeInfo] entity.
Edwin Kempin3660c132013-07-16 08:03:11 +02001190|=========================================
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001191
Edwin Kempina23eb102013-07-17 09:10:54 +02001192[[config-input]]
1193ConfigInput
1194~~~~~~~~~~~
1195The `ConfigInput` entity describes a new project configuration.
1196
1197[options="header",width="50%",cols="1,^2,4"]
1198|=========================================
1199|Field Name ||Description
1200|`description` |optional|
1201The new description of the project. +
1202If not set, the description is removed.
1203|`use_contributor_agreements`|optional|
1204Whether authors must complete a contributor agreement on the site
1205before pushing any commits or changes to this project. +
1206Can be `TRUE`, `FALSE` or `INHERIT`. +
1207If not set, this setting is not updated.
1208|`use_content_merge` |optional|
1209Whether Gerrit will try to perform a 3-way merge of text file content
1210when a file has been modified by both the destination branch and the
1211change being submitted. This option only takes effect if submit type is
1212not FAST_FORWARD_ONLY. +
1213Can be `TRUE`, `FALSE` or `INHERIT`. +
1214If not set, this setting is not updated.
1215|`use_signed_off_by` |optional|
1216Whether each change must contain a Signed-off-by line from either the
1217author or the uploader in the commit message. +
1218Can be `TRUE`, `FALSE` or `INHERIT`. +
1219If not set, this setting is not updated.
1220|`require_change_id` |optional|
1221Whether a valid link:user-changeid.html[Change-Id] footer in any commit
1222uploaded for review is required. This does not apply to commits pushed
1223directly to a branch or tag. +
1224Can be `TRUE`, `FALSE` or `INHERIT`. +
1225If not set, this setting is not updated.
1226|`max_object_size_limit` |optional|
1227The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size
1228limit] of this project as a link:#max-object-size-limit-info[
1229MaxObjectSizeLimitInfo] entity. +
1230If set to `0`, the max object size limit is removed. +
1231If not set, this setting is not updated.
1232|`submit_type` |optional|
1233The default submit type of the project, can be `MERGE_IF_NECESSARY`,
1234`FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `MERGE_ALWAYS` or
1235`CHERRY_PICK`. +
1236If not set, the submit type is not updated.
1237|`state` |optional|
1238The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. +
1239Not set if the project state is `ACTIVE`. +
1240If not set, the project state is not updated.
1241|=========================================
1242
Edwin Kempin55367622013-02-05 09:09:23 +01001243[[dashboard-info]]
1244DashboardInfo
1245~~~~~~~~~~~~~
1246The `DashboardInfo` entity contains information about a project
1247dashboard.
1248
1249[options="header",width="50%",cols="1,^2,4"]
1250|===============================
1251|Field Name ||Description
1252|`kind` ||`gerritcodereview#dashboard`
1253|`id` ||
1254The ID of the dashboard. The ID has the format '<ref>:<path>',
1255where ref and path are URL encoded.
1256|`project` ||
1257The name of the project for which this dashboard is returned.
1258|`defining_project`||
1259The name of the project in which this dashboard is defined.
1260This is different from `project` if the dashboard is inherited from a
1261parent project.
1262|`ref` ||
1263The name of the ref in which the dashboard is defined, without the
1264`refs/meta/dashboards/` prefix, which is common for all dashboard refs.
1265|`path` ||
1266The path of the file in which the dashboard is defined.
1267|`description` |optional|The description of the dashboard.
1268|`foreach` |optional|
1269Subquery that applies to all sections in the dashboard. +
1270Tokens such as `${project}` are not resolved.
1271|`url` ||
1272The URL under which the dashboard can be opened in the Gerrit WebUI. +
1273The URL is relative to the canonical web URL. +
1274Tokens in the queries such as `${project}` are resolved.
1275|`default` |not set if `false`|
1276Whether this is the default dashboard of the project.
1277|`title` |optional|The title of the dashboard.
1278|`sections` ||
1279The list of link:#dashboard-section-info[sections] in the dashboard.
1280|===============================
1281
Edwin Kempin67e923c2013-02-14 13:57:12 +01001282[[dashboard-input]]
1283DashboardInput
1284~~~~~~~~~~~~~~
1285The `DashboardInput` entity contains information to create/update a
1286project dashboard.
1287
1288[options="header",width="50%",cols="1,^2,4"]
1289|=============================
1290|Field Name ||Description
1291|`id` |optional|
Edwin Kempinc95c5082013-03-12 16:56:25 +01001292URL encoded ID of a dashboard to which this dashboard should link to.
Edwin Kempin67e923c2013-02-14 13:57:12 +01001293|`commit_message`|optional|
1294Message that should be used to commit the change of the dashboard.
1295|=============================
1296
Edwin Kempin55367622013-02-05 09:09:23 +01001297[[dashboard-section-info]]
1298DashboardSectionInfo
1299~~~~~~~~~~~~~~~~~~~~
1300The `DashboardSectionInfo` entity contains information about a section
1301in a dashboard.
1302
1303[options="header",width="50%",cols="1,6"]
1304|===========================
1305|Field Name |Description
1306|`name` |The title of the section.
1307|`query` |The query of the section. +
1308Tokens such as `${project}` are not resolved.
1309|===========================
1310
Edwin Kempin6b813372013-03-13 17:07:33 +01001311[[head-input]]
1312HeadInput
1313~~~~~~~~~
1314The `HeadInput` entity contains information for setting `HEAD` for a
1315project.
1316
1317[options="header",width="50%",cols="1,6"]
1318|============================
1319|Field Name |Description
1320|`ref` |
1321The ref to which `HEAD` should be set, the `refs/heads` prefix can be
1322omitted.
1323|============================
1324
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001325[[inherited-boolean-info]]
1326InheritedBooleanInfo
1327~~~~~~~~~~~~~~~~~~~~
1328A boolean value that can also be inherited.
1329
1330[options="header",width="50%",cols="1,^2,4"]
1331|================================
1332|Field Name ||Description
1333|`value` ||
1334The effective boolean value.
1335|`configured_value` ||
1336The configured value, can be `TRUE`, `FALSE` or `INHERITED`.
1337|`inherited_value` |optional|
1338The boolean value inherited from the parent. +
1339Not set if there is no parent.
1340|================================
1341
Edwin Kempin3c99f592013-07-15 10:12:27 +02001342[[max-object-size-limit-info]]
1343MaxObjectSizeLimitInfo
1344~~~~~~~~~~~~~~~~~~~~~~
1345The `MaxObjectSizeLimitInfo` entity contains information about the
1346link:config-gerrit.html#receive.maxObjectSizeLimit[max object size
1347limit] of a project.
1348
1349[options="header",width="50%",cols="1,^2,4"]
1350|===============================
1351|Field Name ||Description
1352|`value` |optional|
1353The effective value of the max object size limit as a formatted string. +
1354Not set if there is no limit for the object size.
1355|`configured_value`|optional|
1356The max object size limit that is configured on the project as a
1357formatted string. +
1358Not set if there is no limit for the object size configured on project
1359level.
1360|`inherited_value` |optional|
1361The max object size limit that is inherited as a formatted string. +
1362Not set if there is no global limit for the object size.
1363|===============================
1364
Edwin Kempin57f303c2013-02-13 15:52:22 +01001365[[project-description-input]]
1366ProjectDescriptionInput
1367~~~~~~~~~~~~~~~~~~~~~~~
1368The `ProjectDescriptionInput` entity contains information for setting a
1369project description.
1370
1371[options="header",width="50%",cols="1,^2,4"]
1372|=============================
1373|Field Name ||Description
1374|`description` |optional|The project description. +
1375The project description will be deleted if not set.
1376|`commit_message`|optional|
1377Message that should be used to commit the change of the project
1378description in the `project.config` file to the `refs/meta/config`
1379branch.
1380|=============================
1381
Edwin Kempin51a6dc92013-02-04 15:43:59 +01001382[[project-info]]
1383ProjectInfo
1384~~~~~~~~~~~
1385The `ProjectInfo` entity contains information about a project.
1386
1387[options="header",width="50%",cols="1,^2,4"]
1388|===========================
1389|Field Name ||Description
1390|`kind` ||`gerritcodereview#project`
1391|`id` ||The URL encoded project name.
1392|`name` |
1393not set if returned in a map where the project name is used as map key|
1394The name of the project.
Edwin Kempinf3611822013-03-19 08:23:09 +01001395|`parent` |optional|
Edwin Kempin51a6dc92013-02-04 15:43:59 +01001396The name of the parent project. +
1397`?-<n>` if the parent project is not visible (`<n>` is a number which
1398is increased for each non-visible project).
1399|`description` |optional|The description of the project.
1400|`branches` |optional|Map of branch names to HEAD revisions.
1401|===========================
1402
Bruce Zu798ea122013-02-18 16:55:43 +08001403[[project-input]]
1404ProjectInput
1405~~~~~~~~~~~~
1406The `ProjectInput` entity contains information for the creation of
1407a new project.
1408
1409[options="header",width="50%",cols="1,^2,4"]
1410|=========================================
1411|Field Name ||Description
1412|`name` |optional|
1413The name of the project (not encoded). +
1414If set, must match the project name in the URL.
1415|`parent` |optional|
1416The name of the parent project. +
1417If not set, the `All-Projects` project will be the parent project.
1418|`description` |optional|The description of the project.
1419|`permissions_only` |`false` if not set|
1420Whether a permission-only project should be created.
1421|`create_empty_commit` |`false` if not set|
1422Whether an empty initial commit should be created.
1423|`submit_type` |optional|
1424The submit type that should be set for the project
1425(`MERGE_IF_NECESSARY`, `REBASE_IF_NECESSARY`, `FAST_FORWARD_ONLY`,
1426`MERGE_ALWAYS`, `CHERRY_PICK`). +
1427If not set, `MERGE_IF_NECESSARY` is set as submit type.
1428|`branches` |optional|
1429A list of branches that should be initially created. +
1430For the branch names the `refs/heads/` prefix can be omitted.
1431|`owners` |optional|
1432A list of groups that should be assigned as project owner. +
1433Each group in the list must be specified as
1434link:rest-api-groups.html#group-id[group-id]. +
1435If not set, the link:config-gerrit.html#repository.name.ownerGroup[
1436groups that are configured as default owners] are set as project
1437owners.
1438|`use_contributor_agreements`|`INHERIT` if not set|
1439Whether contributor agreements should be used for the project (`TRUE`,
1440`FALSE`, `INHERIT`).
1441|`use_signed_off_by` |`INHERIT` if not set|
1442Whether the usage of 'Signed-Off-By' footers is required for the
1443project (`TRUE`, `FALSE`, `INHERIT`).
1444|`use_content_merge` |`INHERIT` if not set|
1445Whether content merge should be enabled for the project (`TRUE`,
1446`FALSE`, `INHERIT`). +
1447`FALSE`, if the `submit_type` is `FAST_FORWARD_ONLY`.
1448|`require_change_id` |`INHERIT` if not set|
1449Whether the usage of Change-Ids is required for the project (`TRUE`,
1450`FALSE`, `INHERIT`).
Sasa Zivkov6b40cb42013-07-01 15:28:22 +02001451|`max_object_size_limit` |optional|
1452Max allowed Git object size for this project.
1453Common unit suffixes of 'k', 'm', or 'g' are supported.
Bruce Zu798ea122013-02-18 16:55:43 +08001454|=========================================
1455
Edwin Kempinecad88c2013-02-14 12:09:44 +01001456[[project-parent-input]]
1457ProjectParentInput
1458~~~~~~~~~~~~~~~~~~
1459The `ProjectParentInput` entity contains information for setting a
1460project parent.
1461
1462[options="header",width="50%",cols="1,^2,4"]
1463|=============================
1464|Field Name ||Description
1465|`parent` ||The name of the parent project.
1466|`commit_message`|optional|
1467Message that should be used to commit the change of the project parent
1468in the `project.config` file to the `refs/meta/config` branch.
1469|=============================
1470
Edwin Kempin19ea9b92013-03-20 13:20:26 +01001471[[repository-statistics-info]]
1472RepositoryStatisticsInfo
1473~~~~~~~~~~~~~~~~~~~~~~~~
1474The `RepositoryStatisticsInfo` entity contains information about
1475statistics of a Git repository.
1476
1477[options="header",width="50%",cols="1,6"]
1478|======================================
1479|Field Name |Description
1480|`number_of_loose_objects` |Number of loose objects.
1481|`number_of_loose_refs` |Number of loose refs.
1482|`number_of_pack_files` |Number of pack files.
1483|`number_of_packed_objects`|Number of packed objects.
1484|`number_of_packed_refs` |Number of packed refs.
1485|`size_of_loose_objects` |Size of loose objects in bytes.
1486|`size_of_packed_objects` |Size of packed objects in bytes.
1487|======================================
1488
Edwin Kempin272402e2013-07-15 11:17:36 +02001489[[theme-info]]
1490ThemeInfo
1491~~~~~~~~~
1492The `ThemeInfo` entity describes a theme.
1493
1494[options="header",width="50%",cols="1,^2,4"]
1495|=============================
1496|Field Name ||Description
1497|`css` |optional|
1498The path to the `GerritSite.css` file.
1499|`header` |optional|
1500The path to the `GerritSiteHeader.html` file.
1501|`footer` |optional|
1502The path to the `GerritSiteFooter.html` file.
1503|=============================
1504
Edwin Kempind0a63922013-01-23 16:32:59 +01001505
1506GERRIT
1507------
1508Part of link:index.html[Gerrit Code Review]