blob: c2e937a846d4a4aa4ed30152892a6bb8ed236d4d [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
Edwin Kempinc3fe3cb2013-02-13 15:09:23 +01008[[project-endpoints]]
9Project Endpoints
10-----------------
11
Edwin Kempin76202742013-02-15 13:51:50 +010012[[list-projects]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +010013List Projects
14~~~~~~~~~~~~~
15[verse]
16'GET /projects/'
17
Edwin Kempind0a63922013-01-23 16:32:59 +010018Lists the projects accessible by the caller. This is the same as
19using the link:cmd-ls-projects.html[ls-projects] command over SSH,
20and accepts the same options as query parameters.
21
Edwin Kempin51a6dc92013-02-04 15:43:59 +010022As result a map is returned that maps the project names to
23link:#project-info[ProjectInfo] entries. The entries in the map are sorted
24by project name.
25
Edwin Kempin37440832013-02-06 11:36:00 +010026.Request
Edwin Kempind0a63922013-01-23 16:32:59 +010027----
28 GET /projects/?d 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 "external/bison": {
40 "kind": "gerritcodereview#project",
41 "id": "external%2Fbison",
42 "description": "GNU parser generator"
43 },
44 "external/gcc": {
45 "kind": "gerritcodereview#project",
46 "id": "external%2Fgcc",
47 },
48 "external/openssl": {
49 "kind": "gerritcodereview#project",
50 "id": "external%2Fopenssl",
51 "description": "encryption\ncrypto routines"
52 },
53 "test": {
54 "kind": "gerritcodereview#project",
55 "id": "test",
56 "description": "\u003chtml\u003e is escaped"
57 }
58 }
59----
60
Edwin Kempina64c4b92013-01-23 11:30:40 +010061.Get all projects with their description
62****
63get::/projects/?d
64****
65
Edwin Kempind0a63922013-01-23 16:32:59 +010066[[suggest-projects]]
67The `/projects/` URL also accepts a prefix string in the `p` parameter.
68This limits the results to those projects that start with the specified
69prefix.
70List all projects that start with `platform/`:
Edwin Kempin37440832013-02-06 11:36:00 +010071
72.Request
Edwin Kempind0a63922013-01-23 16:32:59 +010073----
74 GET /projects/?p=platform%2F HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +010075----
Edwin Kempind0a63922013-01-23 16:32:59 +010076
Edwin Kempin37440832013-02-06 11:36:00 +010077.Response
78----
Edwin Kempind0a63922013-01-23 16:32:59 +010079 HTTP/1.1 200 OK
80 Content-Disposition: attachment
81 Content-Type: application/json;charset=UTF-8
82
83 )]}'
84 {
85 "platform/drivers": {
86 "kind": "gerritcodereview#project",
87 "id": "platform%2Fdrivers",
88 },
89 "platform/tools": {
90 "kind": "gerritcodereview#project",
91 "id": "platform%2Ftools",
92 }
93 }
94----
95E.g. this feature can be used by suggestion client UI's to limit results.
96
Edwin Kempin5c544e22013-03-06 13:35:45 +010097[[get-project]]
98Get Project
99~~~~~~~~~~~
100[verse]
101'GET /projects/link:#project-name[\{project-name\}]'
102
103Retrieves a project.
104
105.Request
106----
107 GET /projects/plugins%2Freplication HTTP/1.0
108----
109
110As response a link:#project-info[ProjectInfo] entity is returned that
111describes the project.
112
113.Response
114----
115 HTTP/1.1 200 OK
116 Content-Disposition: attachment
117 Content-Type: application/json;charset=UTF-8
118
119 )]}'
120 {
121 "kind": "gerritcodereview#project",
122 "id": "plugins%2Freplication",
123 "name": "plugins/replication",
124 "parent": "Public-Plugins",
125 "description": "Copies to other servers using the Git protocol"
126 }
127----
128
Bruce Zu798ea122013-02-18 16:55:43 +0800129[[create-project]]
130Create Project
131~~~~~~~~~~~~~~
132[verse]
133'PUT /projects/link:#project-name[\{project-name\}]'
134
135Creates a new project.
136
137In the request body additional data for the project can be provided as
138link:#project-input[ProjectInput].
139
140.Request
141----
142 PUT /projects/MyProject HTTP/1.0
143 Content-Type: application/json;charset=UTF-8
144
145 {
146 "description": "This is a demo project.",
147 "submit_type": "CHERRY_PICK",
148 "owners": [
149 "MyProject-Owners"
150 ]
151 }
152----
153
154As response the link:#project-info[ProjectInfo] entity is returned that
155describes the created project.
156
157.Response
158----
159 HTTP/1.1 201 Created
160 Content-Disposition: attachment
161 Content-Type: application/json;charset=UTF-8
162
163 )]}'
164 {
165 "kind": "gerritcodereview#project",
166 "id": "MyProject",
167 "name": "MyProject",
168 "parent": "All-Projects",
169 "description": "This is a demo project."
170 }
171----
172
Edwin Kempin57f303c2013-02-13 15:52:22 +0100173[[get-project-description]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100174Get Project Description
175~~~~~~~~~~~~~~~~~~~~~~~
176[verse]
177'GET /projects/link:#project-name[\{project-name\}]/description'
178
Edwin Kempin57f303c2013-02-13 15:52:22 +0100179Retrieves the description of a project.
180
181.Request
182----
183 GET /projects/plugins%2Freplication/description HTTP/1.0
184----
185
186.Response
187----
188 HTTP/1.1 200 OK
189 Content-Disposition: attachment
190 Content-Type: application/json;charset=UTF-8
191
192 )]}'
193 "Copies to other servers using the Git protocol"
194----
195
Edwin Kempinefec4492013-02-22 10:09:23 +0100196If the project does not have a description an empty string is returned.
197
Edwin Kempin57f303c2013-02-13 15:52:22 +0100198[[set-project-description]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100199Set Project Description
200~~~~~~~~~~~~~~~~~~~~~~~
201[verse]
202'PUT /projects/link:#project-name[\{project-name\}]/description'
203
Edwin Kempin57f303c2013-02-13 15:52:22 +0100204Sets the description of a project.
205
206The new project description must be provided in the request body inside
207a link:#project-description-input[ProjectDescriptionInput] entity.
208
209.Request
210----
211 PUT /projects/plugins%2Freplication/description HTTP/1.0
212 Content-Type: application/json;charset=UTF-8
213
214 {
215 "description": "Plugin for Gerrit that handles the replication.",
216 "commit_message": "Update the project description"
217 }
218----
219
220As response the new project description is returned.
221
222.Response
223----
224 HTTP/1.1 200 OK
225 Content-Disposition: attachment
226 Content-Type: application/json;charset=UTF-8
227
228 )]}'
229 "Plugin for Gerrit that handles the replication."
230----
231
Edwin Kempin114ab162013-02-28 09:25:37 +0100232If the description was deleted the response is "`204 No Content`".
233
Edwin Kempin57f303c2013-02-13 15:52:22 +0100234[[delete-project-description]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100235Delete Project Description
236~~~~~~~~~~~~~~~~~~~~~~~~~~
237[verse]
238'DELETE /projects/link:#project-name[\{project-name\}]/description'
239
Edwin Kempin57f303c2013-02-13 15:52:22 +0100240Deletes the description of a project.
241
Edwin Kempinefec4492013-02-22 10:09:23 +0100242The request body does not need to include a
243link:#project-description-input[ProjectDescriptionInput] entity if no
244commit message is specified.
Edwin Kempin57f303c2013-02-13 15:52:22 +0100245
Edwin Kempinefec4492013-02-22 10:09:23 +0100246Please note that some proxies prohibit request bodies for DELETE
Edwin Kempin57f303c2013-02-13 15:52:22 +0100247requests. In this case, if you want to specify a commit message, use
248link:#set-project-description[PUT] to delete the description.
249
250.Request
251----
252 DELETE /projects/plugins%2Freplication/description HTTP/1.0
253----
254
255.Response
256----
257 HTTP/1.1 204 No Content
258----
259
Edwin Kempinecad88c2013-02-14 12:09:44 +0100260[[get-project-parent]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100261Get Project Parent
262~~~~~~~~~~~~~~~~~~
263[verse]
264'GET /projects/link:#project-name[\{project-name\}]/parent'
265
Edwin Kempinecad88c2013-02-14 12:09:44 +0100266Retrieves the name of a project's parent project. For the
267`All-Projects` root project an empty string is returned.
268
269.Request
270----
271 GET /projects/plugins%2Freplication/parent HTTP/1.0
272----
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 "All-Projects"
282----
283
284[[set-project-parent]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100285Set Project Parent
286~~~~~~~~~~~~~~~~~~
287[verse]
288'PUT /projects/link:#project-name[\{project-name\}]/parent'
289
Edwin Kempinecad88c2013-02-14 12:09:44 +0100290Sets the parent project for a project.
291
292The new name of the parent project must be provided in the request body
293inside a link:#project-parent-input[ProjectParentInput] entity.
294
295.Request
296----
297 PUT /projects/plugins%2Freplication/parent HTTP/1.0
298 Content-Type: application/json;charset=UTF-8
299
300 {
301 "parent": "Public-Plugins",
302 "commit_message": "Update the project parent"
303 }
304----
305
306As response the new parent project name is returned.
307
308.Response
309----
310 HTTP/1.1 200 OK
311 Content-Disposition: attachment
312 Content-Type: application/json;charset=UTF-8
313
314 )]}'
315 "Public-Plugins"
316----
317
Edwin Kempin6b813372013-03-13 17:07:33 +0100318[[get-head]]
319Get HEAD
320~~~~~~~~
321[verse]
322'GET /projects/link:#project-name[\{project-name\}]/HEAD'
323
324Retrieves for a project the name of the branch to which `HEAD` points.
325
326.Request
327----
328 GET /projects/plugins%2Freplication/HEAD HTTP/1.0
329----
330
331.Response
332----
333 HTTP/1.1 200 OK
334 Content-Disposition: attachment
335 Content-Type: application/json;charset=UTF-8
336
337 )]}'
338 "refs/heads/master"
339----
340
341[[set-head]]
342Set HEAD
343~~~~~~~~
344[verse]
345'PUT /projects/link:#project-name[\{project-name\}]/HEAD'
346
347Sets `HEAD` for a project.
348
349The new ref to which `HEAD` should point must be provided in the
350request body inside a link:#head-input[HeadInput] entity.
351
352.Request
353----
354 PUT /projects/plugins%2Freplication/HEAD HTTP/1.0
355 Content-Type: application/json;charset=UTF-8
356
357 {
358 "ref": "refs/heads/stable"
359 }
360----
361
362As response the new ref to which `HEAD` points is returned.
363
364.Response
365----
366 HTTP/1.1 200 OK
367 Content-Disposition: attachment
368 Content-Type: application/json;charset=UTF-8
369
370 )]}'
371 "refs/heads/stable"
372----
373
Edwin Kempin19ea9b92013-03-20 13:20:26 +0100374[[get-repository-statistics]]
375Get Repository Statistics
376~~~~~~~~~~~~~~~~~~~~~~~~~
377[verse]
378'GET /projects/link:#project-name[\{project-name\}]/statistics.git'
379
380Return statistics for the repository of a project.
381
382.Request
383----
384 GET /projects/plugins%2Freplication/statistics.git HTTP/1.0
385----
386
387The repository statistics are returned as a
388link:#repository-statistics-info[RepositoryStatisticsInfo] entity.
389
390.Response
391----
392 HTTP/1.1 200 OK
393 Content-Disposition: attachment
394 Content-Type: application/json;charset=UTF-8
395
396 )]}'
397 {
398 "number_of_loose_objects": 127,
399 "number_of_loose_refs": 15,
400 "number_of_pack_files": 15,
401 "number_of_packed_objects": 67,
402 "number_of_packed_refs": 0,
403 "size_of_loose_objects": 29466,
404 "size_of_packed_objects": 9646
405 }
406----
407
Dave Borowitz237073a2013-04-04 16:52:27 -0700408[[get-config]]
409Get Config
410~~~~~~~~~~
411[verse]
412'GET /projects/link:#project-name[\{project-name\}]/config'
413
414Gets some configuration information about a project. Note that this
415config info is not simply the contents of `project.config`; it generally
416contains fields that may have been inherited from parent projects.
417
418.Request
419----
420 GET /projects/myproject/config
421----
422
423A link:#config-info[ConfigInfo] entity is returned that describes the
424project configuration. Some fields are only visible to users that have
425read access to `refs/meta/config`.
426
427.Response
428----
429 HTTP/1.1 200 OK
430 Content-Disposition: attachment
431 Content-Type: application/json;charset=UTF-8
432
433 )]}'
434 {
435 "kind": "gerritcodereview#project_config",
Edwin Kempina23eb102013-07-17 09:10:54 +0200436 "description": "demo project",
Edwin Kempin0cb5a562013-07-12 15:41:04 +0200437 "use_contributor_agreements": {
438 "value": true,
439 "configured_value": "TRUE",
440 "inherited_value": false
441 },
442 "use_content_merge": {
443 "value": true,
444 "configured_value": "INHERIT",
445 "inherited_value": true
446 },
447 "use_signed_off_by": {
448 "value": false,
449 "configured_value": "INHERIT",
450 "inherited_value": false
451 },
452 "require_change_id": {
453 "value": false,
454 "configured_value": "FALSE",
455 "inherited_value": true
Edwin Kempin3c99f592013-07-15 10:12:27 +0200456 },
457 "max_object_size_limit": {
458 "value": "15m",
459 "configured_value": "15m",
460 "inherited_value": "20m"
461 },
462 "submit_type": "MERGE_IF_NECESSARY",
463 "state": "ACTIVE",
David Ostrovsky9e8b2fb2013-08-30 08:09:53 +0200464 "commentlinks": {},
465 "actions": {
466 "cookbook~hello-project": {
467 "method": "POST",
468 "label": "Say hello",
469 "title": "Say hello in different languages",
470 "enabled": true
471 }
472 }
Dave Borowitz237073a2013-04-04 16:52:27 -0700473 }
474----
475
Edwin Kempina23eb102013-07-17 09:10:54 +0200476[[set-config]]
477Set Config
478~~~~~~~~~~
479[verse]
480'PUT /projects/link:#project-name[\{project-name\}]/config'
481
482Sets the configuration of a project.
483
484The new configuration must be provided in the request body as a
485link:#config-input[ConfigInput] entity.
486
487.Request
488----
489 PUT /projects/myproject/config HTTP/1.0
490 Content-Type: application/json;charset=UTF-8
491
492 {
493 "description": "demo project",
494 "use_contributor_agreements": "FALSE",
495 "use_content_merge": "INHERIT",
496 "use_signed_off_by": "INHERIT",
497 "require_change_id": "TRUE",
498 "max_object_size_limit": "10m",
499 "submit_type": "REBASE_IF_NECESSARY",
500 "state": "ACTIVE"
501 }
502----
503
504As response the new configuration is returned as a link:#config-info[
505ConfigInfo] entity.
506
507.Response
508----
509 HTTP/1.1 200 OK
510 Content-Disposition: attachment
511 Content-Type: application/json;charset=UTF-8
512
513 )]}'
514 {
515 "kind": "gerritcodereview#project_config",
516 "use_contributor_agreements": {
517 "value": false,
518 "configured_value": "FALSE",
519 "inherited_value": false
520 },
521 "use_content_merge": {
522 "value": true,
523 "configured_value": "INHERIT",
524 "inherited_value": true
525 },
526 "use_signed_off_by": {
527 "value": false,
528 "configured_value": "INHERIT",
529 "inherited_value": false
530 },
531 "require_change_id": {
532 "value": true,
533 "configured_value": "TRUE",
534 "inherited_value": true
535 },
536 "max_object_size_limit": {
537 "value": "10m",
538 "configured_value": "10m",
539 "inherited_value": "20m"
540 },
541 "submit_type": "REBASE_IF_NECESSARY",
542 "state": "ACTIVE",
543 "commentlinks": {}
544 }
545----
546
Edwin Kempinef3542f2013-03-19 13:31:49 +0100547[[run-gc]]
548Run GC
549~~~~~~
550[verse]
551'POST /projects/link:#project-name[\{project-name\}]/gc'
552
553Run the Git garbage collection for the repository of a project.
554
Edwin Kempin4bdc72d2013-11-13 13:30:49 +0100555Options for the Git garbage collection can be specified in the
556request body as a link:#gc-input[GCInput] entity.
557
Edwin Kempinef3542f2013-03-19 13:31:49 +0100558.Request
559----
560 POST /projects/plugins%2Freplication/gc HTTP/1.0
Edwin Kempin4bdc72d2013-11-13 13:30:49 +0100561 Content-Type: application/json;charset=UTF-8
562
563 {
564 "show_progress": true
565 }
Edwin Kempinef3542f2013-03-19 13:31:49 +0100566----
567
568The response is the streamed output of the garbage collection.
569
570.Response
571----
572 HTTP/1.1 200 OK
573 Content-Disposition: attachment
574 Content-Type: text/plain;charset=UTF-8
575
576 collecting garbage for "plugins/replication":
577 Pack refs: 100% (21/21)
578 Counting objects: 20
579 Finding sources: 100% (20/20)
580 Getting sizes: 100% (13/13)
581 Compressing objects: 83% (5/6)
582 Writing objects: 100% (20/20)
583 Selecting commits: 100% (7/7)
584 Building bitmaps: 100% (7/7)
585 Finding sources: 100% (41/41)
586 Getting sizes: 100% (25/25)
587 Compressing objects: 52% (12/23)
588 Writing objects: 100% (41/41)
589 Prune loose objects also found in pack files: 100% (36/36)
590 Prune loose, unreferenced objects: 100% (36/36)
591 done.
592----
593
Edwin Kempina686de92013-05-09 15:12:34 +0200594[[branch-endpoints]]
595Branch Endpoints
596----------------
597
598[[list-branches]]
599List Branches
600~~~~~~~~~~~~~
601[verse]
602'GET /projects/link:#project-name[\{project-name\}]/branches/'
603
604List the branches of a project.
605
606As result a list of link:#branch-info[BranchInfo] entries is
607returned.
608
609.Request
610----
611 GET /projects/work%2Fmy-project/branches/ HTTP/1.0
612----
613
614.Response
615----
616 HTTP/1.1 200 OK
617 Content-Disposition: attachment
618 Content-Type: application/json;charset=UTF-8
619
620 )]}'
621 [
622 {
623 "ref": "HEAD",
624 "revision": "master"
625 },
626 {
627 "ref": "refs/meta/config",
628 "revision": "76016386a0d8ecc7b6be212424978bb45959d668"
629 },
630 {
631 "ref": "refs/heads/master",
632 "revision": "67ebf73496383c6777035e374d2d664009e2aa5c"
633 },
634 {
635 "ref": "refs/heads/stable",
636 "revision": "64ca533bd0eb5252d2fee83f63da67caae9b4674",
637 "can_delete": true
638 }
639 ]
640----
641
Edwin Kempin196e1732013-05-09 15:12:34 +0200642[[get-branch]]
643Get Branch
644~~~~~~~~~~
645[verse]
646'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]'
647
648Retrieves a branch of a project.
649
650.Request
651----
652 GET /projects/work%2Fmy-project/branches/master HTTP/1.0
653----
654
655As response a link:#branch-info[BranchInfo] entity is returned that
656describes the branch.
657
658.Response
659----
660 HTTP/1.1 200 OK
661 Content-Disposition: attachment
662 Content-Type: application/json;charset=UTF-8
663
664 )]}'
665 {
666 "ref": "refs/heads/master",
667 "revision": "67ebf73496383c6777035e374d2d664009e2aa5c"
668 }
669----
670
Edwin Kempin5c0d6b32013-05-09 19:54:37 +0200671[[create-branch]]
672Create Branch
673~~~~~~~~~~~~~
674[verse]
675'PUT /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]'
676
677Creates a new branch.
678
679In the request body additional data for the branch can be provided as
680link:#branch-input[BranchInput].
681
682.Request
683----
684 PUT /projects/MyProject/branches/stable HTTP/1.0
685 Content-Type: application/json;charset=UTF-8
686
687 {
688 "revision": "76016386a0d8ecc7b6be212424978bb45959d668"
689 }
690----
691
692As response a link:#branch-info[BranchInfo] entity is returned that
693describes the created branch.
694
695.Response
696----
697 HTTP/1.1 201 Created
698 Content-Disposition: attachment
699 Content-Type: application/json;charset=UTF-8
700
701 )]}'
702 {
703 "ref": "refs/heads/stable",
704 "revision": "76016386a0d8ecc7b6be212424978bb45959d668",
705 "can_delete": true
706 }
707----
708
Edwin Kempin6ce96a12013-06-06 13:20:01 +0200709[[delete-branch]]
710Delete Branch
711~~~~~~~~~~~~~
712[verse]
713'DELETE /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]'
714
715Deletes a branch.
716
717.Request
718----
719 DELETE /projects/MyProject/branches/stable HTTP/1.0
720----
721
722.Response
723----
724 HTTP/1.1 204 No Content
725----
726
Edwin Kempin4425c742013-03-18 13:23:00 +0100727[[child-project-endpoints]]
728Child Project Endpoints
729-----------------------
730
731[[list-child-projects]]
732List Child Projects
733~~~~~~~~~~~~~~~~~~~
734[verse]
735'GET /projects/link:#project-name[\{project-name\}]/children/'
736
737List the direct child projects of a project.
738
739.Request
740----
741 GET /projects/Public-Plugins/children/ HTTP/1.0
742----
743
744As result a list of link:#project-info[ProjectInfo] entries is
745returned that describe the child projects.
746
747.Response
748----
749 HTTP/1.1 200 OK
750 Content-Disposition: attachment
751 Content-Type: application/json;charset=UTF-8
752
753 )]}'
754 [
755 {
756 "kind": "gerritcodereview#project",
757 "id": "plugins%2Freplication",
758 "name": "plugins/replication",
759 "parent": "Public-Plugins",
760 "description": "Copies to other servers using the Git protocol"
761 },
762 {
763 "kind": "gerritcodereview#project",
764 "id": "plugins%2Freviewnotes",
765 "name": "plugins/reviewnotes",
766 "parent": "Public-Plugins",
767 "description": "Annotates merged commits using notes on refs/notes/review."
768 },
769 {
770 "kind": "gerritcodereview#project",
771 "id": "plugins%2Fsingleusergroup",
772 "name": "plugins/singleusergroup",
773 "parent": "Public-Plugins",
774 "description": "GroupBackend enabling users to be directly added to access rules"
775 }
776 ]
777----
778
Edwin Kempinf95bd172013-03-19 11:10:57 +0100779To resolve the child projects of a project recursively the parameter
780`recursive` can be set.
781
782Child projects that are not visible to the calling user are ignored and
783are not resolved further.
784
785.Request
786----
787 GET /projects/Public-Projects/children/?recursive HTTP/1.0
788----
789
790.Response
791----
792 HTTP/1.1 200 OK
793 Content-Disposition: attachment
794 Content-Type: application/json;charset=UTF-8
795
796 )]}'
797 [
798 {
799 "kind": "gerritcodereview#project",
800 "id": "gerrit",
801 "name": "gerrit",
802 "parent": "Public-Projects",
803 "description": "Gerrit Code Review"
804 },
805 {
806 "kind": "gerritcodereview#project",
807 "id": "plugins%2Freplication",
808 "name": "plugins/replication",
809 "parent": "Public-Plugins",
810 "description": "Copies to other servers using the Git protocol"
811 },
812 {
813 "kind": "gerritcodereview#project",
814 "id": "plugins%2Freviewnotes",
815 "name": "plugins/reviewnotes",
816 "parent": "Public-Plugins",
817 "description": "Annotates merged commits using notes on refs/notes/review."
818 },
819 {
820 "kind": "gerritcodereview#project",
821 "id": "plugins%2Fsingleusergroup",
822 "name": "plugins/singleusergroup",
823 "parent": "Public-Plugins",
824 "description": "GroupBackend enabling users to be directly added to access rules"
825 },
826 {
827 "kind": "gerritcodereview#project",
828 "id": "Public-Plugins",
829 "name": "Public-Plugins",
830 "parent": "Public-Projects",
831 "description": "Parent project for plugins/*"
832 }
833 ]
834----
835
Edwin Kempin5b6c4062013-03-19 09:26:03 +0100836[[get-child-project]]
837Get Child Project
838~~~~~~~~~~~~~~~~~
839[verse]
840'GET /projects/link:#project-name[\{project-name\}]/children/link:#project-name[\{project-name\}]'
841
Edwin Kempin8a3fb5b2013-03-21 15:02:22 +0100842Retrieves a child project. If a non-direct child project should be
843retrieved the parameter `recursive` must be set.
Edwin Kempin5b6c4062013-03-19 09:26:03 +0100844
845.Request
846----
847 GET /projects/Public-Plugins/children/plugins%2Freplication HTTP/1.0
848----
849
850As response a link:#project-info[ProjectInfo] entity is returned that
851describes the child project.
852
853.Response
854----
855 HTTP/1.1 200 OK
856 Content-Disposition: attachment
857 Content-Type: application/json;charset=UTF-8
858
859 )]}'
860 {
861 "kind": "gerritcodereview#project",
862 "id": "plugins%2Freplication",
863 "name": "plugins/replication",
864 "parent": "Public-Plugins",
865 "description": "Copies to other servers using the Git protocol"
866 }
867----
868
Edwin Kempinc3fe3cb2013-02-13 15:09:23 +0100869[[dashboard-endpoints]]
870Dashboard Endpoints
871-------------------
872
Edwin Kempin76202742013-02-15 13:51:50 +0100873[[list-dashboards]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100874List Dashboards
875~~~~~~~~~~~~~~~
876[verse]
877'GET /projects/link:#project-name[\{project-name\}]/dashboards/'
878
Edwin Kempind0a63922013-01-23 16:32:59 +0100879List custom dashboards for a project.
880
Edwin Kempin55367622013-02-05 09:09:23 +0100881As result a list of link:#dashboard-info[DashboardInfo] entries is
882returned.
883
Edwin Kempind0a63922013-01-23 16:32:59 +0100884List all dashboards for the `work/my-project` project:
Edwin Kempin37440832013-02-06 11:36:00 +0100885
886.Request
Edwin Kempind0a63922013-01-23 16:32:59 +0100887----
888 GET /projects/work%2Fmy-project/dashboards/ HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +0100889----
Edwin Kempind0a63922013-01-23 16:32:59 +0100890
Edwin Kempin37440832013-02-06 11:36:00 +0100891.Response
892----
Edwin Kempind0a63922013-01-23 16:32:59 +0100893 HTTP/1.1 200 OK
894 Content-Disposition: attachment
895 Content-Type: application/json;charset=UTF-8
896
897 )]}'
898 [
899 {
900 "kind": "gerritcodereview#dashboard",
901 "id": "main:closed",
902 "ref": "main",
903 "path": "closed",
904 "description": "Merged and abandoned changes in last 7 weeks",
905 "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
906 "default": true,
907 "title": "Closed changes",
908 "sections": [
909 {
910 "name": "Merged",
911 "query": "status:merged age:7w"
912 },
913 {
914 "name": "Abandoned",
915 "query": "status:abandoned age:7w"
916 }
917 ]
918 }
919 ]
920----
921
Edwin Kempina64c4b92013-01-23 11:30:40 +0100922.Get all dashboards of the 'All-Projects' project
923****
924get::/projects/All-Projects/dashboards/
925****
926
Edwin Kempin67e923c2013-02-14 13:57:12 +0100927[[get-dashboard]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100928Get Dashboard
929~~~~~~~~~~~~~
930[verse]
931'GET /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]'
932
Edwin Kempin67e923c2013-02-14 13:57:12 +0100933Retrieves a project dashboard. The dashboard can be defined on that
934project or be inherited from a parent project.
935
936.Request
937----
938 GET /projects/work%2Fmy-project/dashboards/main:closed HTTP/1.0
939----
940
941As response a link:#dashboard-info[DashboardInfo] entity is returned
942that describes the dashboard.
943
944.Response
945----
946 HTTP/1.1 200 OK
947 Content-Disposition: attachment
948 Content-Type: application/json;charset=UTF-8
949
950 )]}'
951 {
952 "kind": "gerritcodereview#dashboard",
953 "id": "main:closed",
954 "ref": "main",
955 "path": "closed",
956 "description": "Merged and abandoned changes in last 7 weeks",
957 "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
958 "default": true,
959 "title": "Closed changes",
960 "sections": [
961 {
962 "name": "Merged",
963 "query": "status:merged age:7w"
964 },
965 {
966 "name": "Abandoned",
967 "query": "status:abandoned age:7w"
968 }
969 ]
970 }
971----
972
973To retrieve the default dashboard of a project use `default` as
974dashboard-id.
Edwin Kempin37440832013-02-06 11:36:00 +0100975
976.Request
Edwin Kempind0a63922013-01-23 16:32:59 +0100977----
978 GET /projects/work%2Fmy-project/dashboards/default HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +0100979----
Edwin Kempind0a63922013-01-23 16:32:59 +0100980
Edwin Kempin37440832013-02-06 11:36:00 +0100981.Response
982----
Edwin Kempind0a63922013-01-23 16:32:59 +0100983 HTTP/1.1 200 OK
984 Content-Disposition: attachment
985 Content-Type: application/json;charset=UTF-8
986
987 )]}'
988 {
989 "kind": "gerritcodereview#dashboard",
990 "id": "main:closed",
991 "ref": "main",
992 "path": "closed",
Edwin Kempin67e923c2013-02-14 13:57:12 +0100993 "description": "Merged and abandoned changes in last 7 weeks",
994 "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
Edwin Kempind0a63922013-01-23 16:32:59 +0100995 "default": true,
Edwin Kempin67e923c2013-02-14 13:57:12 +0100996 "title": "Closed changes",
997 "sections": [
998 {
999 "name": "Merged",
1000 "query": "status:merged age:7w"
1001 },
1002 {
1003 "name": "Abandoned",
1004 "query": "status:abandoned age:7w"
1005 }
1006 ]
Edwin Kempind0a63922013-01-23 16:32:59 +01001007 }
1008----
1009
Edwin Kempin67e923c2013-02-14 13:57:12 +01001010[[set-dashboard]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001011Set Dashboard
1012~~~~~~~~~~~~~
1013[verse]
1014'PUT /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]'
1015
Edwin Kempin67e923c2013-02-14 13:57:12 +01001016Updates/Creates a project dashboard.
1017
1018Currently only supported for the `default` dashboard.
1019
1020The creation/update information for the dashboard must be provided in
1021the request body as a link:#dashboard-input[DashboardInput] entity.
1022
1023.Request
1024----
1025 PUT /projects/work%2Fmy-project/dashboards/default HTTP/1.0
1026 Content-Type: application/json;charset=UTF-8
1027
1028 {
1029 "id": "main:closed",
1030 "commit_message": "Define the default dashboard"
1031 }
1032----
1033
1034As response the new/updated dashboard is returned as a
1035link:#dashboard-info[DashboardInfo] entity.
1036
1037.Response
1038----
1039 HTTP/1.1 200 OK
1040 Content-Disposition: attachment
1041 Content-Type: application/json;charset=UTF-8
1042
1043 )]}'
1044 {
1045 "kind": "gerritcodereview#dashboard",
1046 "id": "main:closed",
1047 "ref": "main",
1048 "path": "closed",
1049 "description": "Merged and abandoned changes in last 7 weeks",
1050 "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
1051 "default": true,
1052 "title": "Closed changes",
1053 "sections": [
1054 {
1055 "name": "Merged",
1056 "query": "status:merged age:7w"
1057 },
1058 {
1059 "name": "Abandoned",
1060 "query": "status:abandoned age:7w"
1061 }
1062 ]
1063 }
1064----
1065
1066[[delete-dashboard]]
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001067Delete Dashboard
1068~~~~~~~~~~~~~~~~
1069[verse]
1070'DELETE /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]'
1071
Edwin Kempin67e923c2013-02-14 13:57:12 +01001072Deletes a project dashboard.
1073
1074Currently only supported for the `default` dashboard.
1075
Edwin Kempinefec4492013-02-22 10:09:23 +01001076The request body does not need to include a link:#dashboard-input[
John Spurlockd25fad12013-03-09 11:48:49 -05001077DashboardInput] entity if no commit message is specified.
Edwin Kempin67e923c2013-02-14 13:57:12 +01001078
1079Please note that some proxies prohibit request bodies for DELETE
1080requests.
1081
1082.Request
1083----
1084 DELETE /projects/work%2Fmy-project/dashboards/default HTTP/1.0
1085----
1086
1087.Response
1088----
1089 HTTP/1.1 204 No Content
1090----
1091
Edwin Kempin34d83352013-02-06 10:40:17 +01001092
1093[[ids]]
1094IDs
1095---
1096
Edwin Kempin196e1732013-05-09 15:12:34 +02001097[[branch-id]]
1098\{branch-id\}
1099~~~~~~~~~~~~~
1100The name of a branch or `HEAD`. The prefix `refs/heads/` can be
1101omitted.
1102
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001103[[dashboard-id]]
Edwin Kempin67e923c2013-02-14 13:57:12 +01001104\{dashboard-id\}
1105~~~~~~~~~~~~~~~~
1106The ID of a dashboard in the format '<ref>:<path>'.
1107
1108A special dashboard ID is `default` which represents the default
1109dashboard of a project.
1110
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001111[[project-name]]
Edwin Kempin34d83352013-02-06 10:40:17 +01001112\{project-name\}
1113~~~~~~~~~~~~~~~~
1114The name of the project.
1115
1116
Edwin Kempin51a6dc92013-02-04 15:43:59 +01001117[[json-entities]]
1118JSON Entities
1119-------------
1120
Edwin Kempina686de92013-05-09 15:12:34 +02001121[[branch-info]]
1122BranchInfo
1123~~~~~~~~~~
1124The `BranchInfo` entity contains information about a branch.
1125
1126[options="header",width="50%",cols="1,^2,4"]
1127|=========================
1128|Field Name ||Description
1129|`ref` ||The ref of the branch.
1130|`revision` ||The revision to which the branch points.
1131|`can_delete`|`false` if not set|
1132Whether the calling user can delete this branch.
1133|=========================
1134
Edwin Kempin5c0d6b32013-05-09 19:54:37 +02001135[[branch-input]]
1136BranchInput
1137~~~~~~~~~~~
1138The `BranchInput` entity contains information for the creation of
1139a new branch.
1140
1141[options="header",width="50%",cols="1,^2,4"]
1142|=======================
1143|Field Name||Description
1144|`ref` |optional|
1145The name of the branch. The prefix `refs/heads/` can be
1146omitted. +
1147If set, must match the branch ID in the URL.
1148|`revision`|optional|
1149The base revision of the new branch. +
1150If not set, `HEAD` will be used as base revision.
1151|=======================
1152
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001153[[config-info]]
1154ConfigInfo
1155~~~~~~~~~~
1156The `ConfigInfo` entity contains information about the effective project
1157configuration.
1158
Edwin Kempin81e1d1f2013-07-15 10:13:46 +02001159[options="header",width="50%",cols="1,^2,4"]
Edwin Kempin3660c132013-07-16 08:03:11 +02001160|=========================================
1161|Field Name ||Description
Edwin Kempina23eb102013-07-17 09:10:54 +02001162|`description` |optional|
1163The description of the project.
Edwin Kempin3660c132013-07-16 08:03:11 +02001164|`use_contributor_agreements`|optional|
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001165link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether
1166authors must complete a contributor agreement on the site before
1167pushing any commits or changes to this project.
Edwin Kempin3660c132013-07-16 08:03:11 +02001168|`use_content_merge` |optional|
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001169link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether
1170Gerrit will try to perform a 3-way merge of text file content when a
1171file has been modified by both the destination branch and the change
1172being submitted. This option only takes effect if submit type is not
1173FAST_FORWARD_ONLY.
Edwin Kempin3660c132013-07-16 08:03:11 +02001174|`use_signed_off_by` |optional|
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001175link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether
1176each change must contain a Signed-off-by line from either the author or
1177the uploader in the commit message.
Edwin Kempin3660c132013-07-16 08:03:11 +02001178|`require_change_id` |optional|
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001179link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether a
1180valid link:user-changeid.html[Change-Id] footer in any commit uploaded
1181for review is required. This does not apply to commits pushed directly
1182to a branch or tag.
Edwin Kempin3c99f592013-07-15 10:12:27 +02001183|`max_object_size_limit` ||
1184The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size
1185limit] of this project as a link:#max-object-size-limit-info[
1186MaxObjectSizeLimitInfo] entity.
1187|`submit_type` ||
1188The default submit type of the project, can be `MERGE_IF_NECESSARY`,
1189`FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `MERGE_ALWAYS` or
1190`CHERRY_PICK`.
1191|`state` |optional|
1192The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. +
1193Not set if the project state is `ACTIVE`.
Edwin Kempin3660c132013-07-16 08:03:11 +02001194|`commentlinks` ||
Edwin Kempin8aa53af2013-07-15 10:43:15 +02001195Map with the comment link configurations of the project. The name of
1196the comment link configuration is mapped to the comment link
1197configuration, which has the same format as the
1198link:config-gerrit.html#_a_id_commentlink_a_section_commentlink[
1199commentlink section] of `gerrit.config`.
Edwin Kempin3660c132013-07-16 08:03:11 +02001200|`theme` |optional|
Edwin Kempin272402e2013-07-15 11:17:36 +02001201The theme that is configured for the project as a link:#theme-info[
1202ThemeInfo] entity.
David Ostrovsky9e8b2fb2013-08-30 08:09:53 +02001203|`actions` |optional|
1204Actions the caller might be able to perform on this project. The
1205information is a map of view names to
1206link:rest-api-changes.html#action-info[ActionInfo] entities.
Edwin Kempin3660c132013-07-16 08:03:11 +02001207|=========================================
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001208
Edwin Kempina23eb102013-07-17 09:10:54 +02001209[[config-input]]
1210ConfigInput
1211~~~~~~~~~~~
1212The `ConfigInput` entity describes a new project configuration.
1213
1214[options="header",width="50%",cols="1,^2,4"]
1215|=========================================
1216|Field Name ||Description
1217|`description` |optional|
1218The new description of the project. +
1219If not set, the description is removed.
1220|`use_contributor_agreements`|optional|
1221Whether authors must complete a contributor agreement on the site
1222before pushing any commits or changes to this project. +
1223Can be `TRUE`, `FALSE` or `INHERIT`. +
1224If not set, this setting is not updated.
1225|`use_content_merge` |optional|
1226Whether Gerrit will try to perform a 3-way merge of text file content
1227when a file has been modified by both the destination branch and the
1228change being submitted. This option only takes effect if submit type is
1229not FAST_FORWARD_ONLY. +
1230Can be `TRUE`, `FALSE` or `INHERIT`. +
1231If not set, this setting is not updated.
1232|`use_signed_off_by` |optional|
1233Whether each change must contain a Signed-off-by line from either the
1234author or the uploader in the commit message. +
1235Can be `TRUE`, `FALSE` or `INHERIT`. +
1236If not set, this setting is not updated.
1237|`require_change_id` |optional|
1238Whether a valid link:user-changeid.html[Change-Id] footer in any commit
1239uploaded for review is required. This does not apply to commits pushed
1240directly to a branch or tag. +
1241Can be `TRUE`, `FALSE` or `INHERIT`. +
1242If not set, this setting is not updated.
1243|`max_object_size_limit` |optional|
1244The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size
1245limit] of this project as a link:#max-object-size-limit-info[
1246MaxObjectSizeLimitInfo] entity. +
1247If set to `0`, the max object size limit is removed. +
1248If not set, this setting is not updated.
1249|`submit_type` |optional|
1250The default submit type of the project, can be `MERGE_IF_NECESSARY`,
1251`FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `MERGE_ALWAYS` or
1252`CHERRY_PICK`. +
1253If not set, the submit type is not updated.
1254|`state` |optional|
1255The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. +
1256Not set if the project state is `ACTIVE`. +
1257If not set, the project state is not updated.
1258|=========================================
1259
Edwin Kempin55367622013-02-05 09:09:23 +01001260[[dashboard-info]]
1261DashboardInfo
1262~~~~~~~~~~~~~
1263The `DashboardInfo` entity contains information about a project
1264dashboard.
1265
1266[options="header",width="50%",cols="1,^2,4"]
1267|===============================
1268|Field Name ||Description
1269|`kind` ||`gerritcodereview#dashboard`
1270|`id` ||
1271The ID of the dashboard. The ID has the format '<ref>:<path>',
1272where ref and path are URL encoded.
1273|`project` ||
1274The name of the project for which this dashboard is returned.
1275|`defining_project`||
1276The name of the project in which this dashboard is defined.
1277This is different from `project` if the dashboard is inherited from a
1278parent project.
1279|`ref` ||
1280The name of the ref in which the dashboard is defined, without the
1281`refs/meta/dashboards/` prefix, which is common for all dashboard refs.
1282|`path` ||
1283The path of the file in which the dashboard is defined.
1284|`description` |optional|The description of the dashboard.
1285|`foreach` |optional|
1286Subquery that applies to all sections in the dashboard. +
1287Tokens such as `${project}` are not resolved.
1288|`url` ||
1289The URL under which the dashboard can be opened in the Gerrit WebUI. +
1290The URL is relative to the canonical web URL. +
1291Tokens in the queries such as `${project}` are resolved.
1292|`default` |not set if `false`|
1293Whether this is the default dashboard of the project.
1294|`title` |optional|The title of the dashboard.
1295|`sections` ||
1296The list of link:#dashboard-section-info[sections] in the dashboard.
1297|===============================
1298
Edwin Kempin67e923c2013-02-14 13:57:12 +01001299[[dashboard-input]]
1300DashboardInput
1301~~~~~~~~~~~~~~
1302The `DashboardInput` entity contains information to create/update a
1303project dashboard.
1304
1305[options="header",width="50%",cols="1,^2,4"]
1306|=============================
1307|Field Name ||Description
1308|`id` |optional|
Edwin Kempinc95c5082013-03-12 16:56:25 +01001309URL encoded ID of a dashboard to which this dashboard should link to.
Edwin Kempin67e923c2013-02-14 13:57:12 +01001310|`commit_message`|optional|
1311Message that should be used to commit the change of the dashboard.
1312|=============================
1313
Edwin Kempin55367622013-02-05 09:09:23 +01001314[[dashboard-section-info]]
1315DashboardSectionInfo
1316~~~~~~~~~~~~~~~~~~~~
1317The `DashboardSectionInfo` entity contains information about a section
1318in a dashboard.
1319
1320[options="header",width="50%",cols="1,6"]
1321|===========================
1322|Field Name |Description
1323|`name` |The title of the section.
1324|`query` |The query of the section. +
1325Tokens such as `${project}` are not resolved.
1326|===========================
1327
Edwin Kempin4bdc72d2013-11-13 13:30:49 +01001328[[gc-input]]
1329GCInput
1330~~~~~~~
1331The `GCInput` entity contains information to run the Git garbage
1332collection.
1333
1334[options="header",width="50%",cols="1,^2,4"]
1335|=============================
1336|Field Name ||Description
1337|`show_progress` |`false` if not set|
1338Whether progress information should be shown.
1339|=============================
1340
Edwin Kempin6b813372013-03-13 17:07:33 +01001341[[head-input]]
1342HeadInput
1343~~~~~~~~~
1344The `HeadInput` entity contains information for setting `HEAD` for a
1345project.
1346
1347[options="header",width="50%",cols="1,6"]
1348|============================
1349|Field Name |Description
1350|`ref` |
1351The ref to which `HEAD` should be set, the `refs/heads` prefix can be
1352omitted.
1353|============================
1354
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001355[[inherited-boolean-info]]
1356InheritedBooleanInfo
1357~~~~~~~~~~~~~~~~~~~~
1358A boolean value that can also be inherited.
1359
1360[options="header",width="50%",cols="1,^2,4"]
1361|================================
1362|Field Name ||Description
1363|`value` ||
1364The effective boolean value.
1365|`configured_value` ||
1366The configured value, can be `TRUE`, `FALSE` or `INHERITED`.
1367|`inherited_value` |optional|
1368The boolean value inherited from the parent. +
1369Not set if there is no parent.
1370|================================
1371
Edwin Kempin3c99f592013-07-15 10:12:27 +02001372[[max-object-size-limit-info]]
1373MaxObjectSizeLimitInfo
1374~~~~~~~~~~~~~~~~~~~~~~
1375The `MaxObjectSizeLimitInfo` entity contains information about the
1376link:config-gerrit.html#receive.maxObjectSizeLimit[max object size
1377limit] of a project.
1378
1379[options="header",width="50%",cols="1,^2,4"]
1380|===============================
1381|Field Name ||Description
1382|`value` |optional|
1383The effective value of the max object size limit as a formatted string. +
1384Not set if there is no limit for the object size.
1385|`configured_value`|optional|
1386The max object size limit that is configured on the project as a
1387formatted string. +
1388Not set if there is no limit for the object size configured on project
1389level.
1390|`inherited_value` |optional|
1391The max object size limit that is inherited as a formatted string. +
1392Not set if there is no global limit for the object size.
1393|===============================
1394
Edwin Kempin57f303c2013-02-13 15:52:22 +01001395[[project-description-input]]
1396ProjectDescriptionInput
1397~~~~~~~~~~~~~~~~~~~~~~~
1398The `ProjectDescriptionInput` entity contains information for setting a
1399project description.
1400
1401[options="header",width="50%",cols="1,^2,4"]
1402|=============================
1403|Field Name ||Description
1404|`description` |optional|The project description. +
1405The project description will be deleted if not set.
1406|`commit_message`|optional|
1407Message that should be used to commit the change of the project
1408description in the `project.config` file to the `refs/meta/config`
1409branch.
1410|=============================
1411
Edwin Kempin51a6dc92013-02-04 15:43:59 +01001412[[project-info]]
1413ProjectInfo
1414~~~~~~~~~~~
1415The `ProjectInfo` entity contains information about a project.
1416
1417[options="header",width="50%",cols="1,^2,4"]
1418|===========================
1419|Field Name ||Description
1420|`kind` ||`gerritcodereview#project`
1421|`id` ||The URL encoded project name.
1422|`name` |
1423not set if returned in a map where the project name is used as map key|
1424The name of the project.
Edwin Kempinf3611822013-03-19 08:23:09 +01001425|`parent` |optional|
Edwin Kempin51a6dc92013-02-04 15:43:59 +01001426The name of the parent project. +
1427`?-<n>` if the parent project is not visible (`<n>` is a number which
1428is increased for each non-visible project).
1429|`description` |optional|The description of the project.
1430|`branches` |optional|Map of branch names to HEAD revisions.
1431|===========================
1432
Bruce Zu798ea122013-02-18 16:55:43 +08001433[[project-input]]
1434ProjectInput
1435~~~~~~~~~~~~
1436The `ProjectInput` entity contains information for the creation of
1437a new project.
1438
1439[options="header",width="50%",cols="1,^2,4"]
1440|=========================================
1441|Field Name ||Description
1442|`name` |optional|
1443The name of the project (not encoded). +
1444If set, must match the project name in the URL.
1445|`parent` |optional|
1446The name of the parent project. +
1447If not set, the `All-Projects` project will be the parent project.
1448|`description` |optional|The description of the project.
1449|`permissions_only` |`false` if not set|
1450Whether a permission-only project should be created.
1451|`create_empty_commit` |`false` if not set|
1452Whether an empty initial commit should be created.
1453|`submit_type` |optional|
1454The submit type that should be set for the project
1455(`MERGE_IF_NECESSARY`, `REBASE_IF_NECESSARY`, `FAST_FORWARD_ONLY`,
1456`MERGE_ALWAYS`, `CHERRY_PICK`). +
1457If not set, `MERGE_IF_NECESSARY` is set as submit type.
1458|`branches` |optional|
1459A list of branches that should be initially created. +
1460For the branch names the `refs/heads/` prefix can be omitted.
1461|`owners` |optional|
1462A list of groups that should be assigned as project owner. +
1463Each group in the list must be specified as
1464link:rest-api-groups.html#group-id[group-id]. +
1465If not set, the link:config-gerrit.html#repository.name.ownerGroup[
1466groups that are configured as default owners] are set as project
1467owners.
1468|`use_contributor_agreements`|`INHERIT` if not set|
1469Whether contributor agreements should be used for the project (`TRUE`,
1470`FALSE`, `INHERIT`).
1471|`use_signed_off_by` |`INHERIT` if not set|
1472Whether the usage of 'Signed-Off-By' footers is required for the
1473project (`TRUE`, `FALSE`, `INHERIT`).
1474|`use_content_merge` |`INHERIT` if not set|
1475Whether content merge should be enabled for the project (`TRUE`,
1476`FALSE`, `INHERIT`). +
1477`FALSE`, if the `submit_type` is `FAST_FORWARD_ONLY`.
1478|`require_change_id` |`INHERIT` if not set|
1479Whether the usage of Change-Ids is required for the project (`TRUE`,
1480`FALSE`, `INHERIT`).
Sasa Zivkov6b40cb42013-07-01 15:28:22 +02001481|`max_object_size_limit` |optional|
1482Max allowed Git object size for this project.
1483Common unit suffixes of 'k', 'm', or 'g' are supported.
Bruce Zu798ea122013-02-18 16:55:43 +08001484|=========================================
1485
Edwin Kempinecad88c2013-02-14 12:09:44 +01001486[[project-parent-input]]
1487ProjectParentInput
1488~~~~~~~~~~~~~~~~~~
1489The `ProjectParentInput` entity contains information for setting a
1490project parent.
1491
1492[options="header",width="50%",cols="1,^2,4"]
1493|=============================
1494|Field Name ||Description
1495|`parent` ||The name of the parent project.
1496|`commit_message`|optional|
1497Message that should be used to commit the change of the project parent
1498in the `project.config` file to the `refs/meta/config` branch.
1499|=============================
1500
Edwin Kempin19ea9b92013-03-20 13:20:26 +01001501[[repository-statistics-info]]
1502RepositoryStatisticsInfo
1503~~~~~~~~~~~~~~~~~~~~~~~~
1504The `RepositoryStatisticsInfo` entity contains information about
1505statistics of a Git repository.
1506
1507[options="header",width="50%",cols="1,6"]
1508|======================================
1509|Field Name |Description
1510|`number_of_loose_objects` |Number of loose objects.
1511|`number_of_loose_refs` |Number of loose refs.
1512|`number_of_pack_files` |Number of pack files.
1513|`number_of_packed_objects`|Number of packed objects.
1514|`number_of_packed_refs` |Number of packed refs.
1515|`size_of_loose_objects` |Size of loose objects in bytes.
1516|`size_of_packed_objects` |Size of packed objects in bytes.
1517|======================================
1518
Edwin Kempin272402e2013-07-15 11:17:36 +02001519[[theme-info]]
1520ThemeInfo
1521~~~~~~~~~
1522The `ThemeInfo` entity describes a theme.
1523
1524[options="header",width="50%",cols="1,^2,4"]
1525|=============================
1526|Field Name ||Description
1527|`css` |optional|
1528The path to the `GerritSite.css` file.
1529|`header` |optional|
1530The path to the `GerritSiteHeader.html` file.
1531|`footer` |optional|
1532The path to the `GerritSiteFooter.html` file.
1533|=============================
1534
Edwin Kempind0a63922013-01-23 16:32:59 +01001535
1536GERRIT
1537------
1538Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -07001539
1540SEARCHBOX
1541---------