summaryrefslogtreecommitdiffstats
path: root/Documentation/rest-api-projects.txt
blob: 9aba0e9133f0d596bec6b6fa6e0e888996281c3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
Gerrit Code Review - /projects/ REST API
========================================

This page describes the project related REST endpoints.
Please also take note of the general information on the
link:rest-api.html[REST API].

Endpoints
---------

[[project-endpoints]]
Project Endpoints
-----------------

[[list-projects]]
List Projects
~~~~~~~~~~~~~
[verse]
'GET /projects/'

Lists the projects accessible by the caller. This is the same as
using the link:cmd-ls-projects.html[ls-projects] command over SSH,
and accepts the same options as query parameters.

As result a map is returned that maps the project names to
link:#project-info[ProjectInfo] entries. The entries in the map are sorted
by project name.

.Request
----
  GET /projects/?d HTTP/1.0
----

.Response
----
  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "external/bison": {
      "kind": "gerritcodereview#project",
      "id": "external%2Fbison",
      "description": "GNU parser generator"
    },
    "external/gcc": {
      "kind": "gerritcodereview#project",
      "id": "external%2Fgcc",
    },
    "external/openssl": {
      "kind": "gerritcodereview#project",
      "id": "external%2Fopenssl",
      "description": "encryption\ncrypto routines"
    },
    "test": {
      "kind": "gerritcodereview#project",
      "id": "test",
      "description": "\u003chtml\u003e is escaped"
    }
  }
----

.Get all projects with their description
****
get::/projects/?d
****

[[suggest-projects]]
The `/projects/` URL also accepts a prefix string in the `p` parameter.
This limits the results to those projects that start with the specified
prefix.
List all projects that start with `platform/`:

.Request
----
  GET /projects/?p=platform%2F HTTP/1.0
----

.Response
----
  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "platform/drivers": {
      "kind": "gerritcodereview#project",
      "id": "platform%2Fdrivers",
    },
    "platform/tools": {
      "kind": "gerritcodereview#project",
      "id": "platform%2Ftools",
    }
  }
----
E.g. this feature can be used by suggestion client UI's to limit results.

[[get-project]]
Get Project
~~~~~~~~~~~
[verse]
'GET /projects/link:#project-name[\{project-name\}]'

Retrieves a project.

.Request
----
  GET /projects/plugins%2Freplication HTTP/1.0
----

As response a link:#project-info[ProjectInfo] entity is returned that
describes the project.

.Response
----
  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "kind": "gerritcodereview#project",
    "id": "plugins%2Freplication",
    "name": "plugins/replication",
    "parent": "Public-Plugins",
    "description": "Copies to other servers using the Git protocol"
  }
----

[[create-project]]
Create Project
~~~~~~~~~~~~~~
[verse]
'PUT /projects/link:#project-name[\{project-name\}]'

Creates a new project.

In the request body additional data for the project can be provided as
link:#project-input[ProjectInput].

.Request
----
  PUT /projects/MyProject HTTP/1.0
  Content-Type: application/json;charset=UTF-8

  {
    "description": "This is a demo project.",
    "submit_type": "CHERRY_PICK",
    "owners": [
      "MyProject-Owners"
    ]
  }
----

As response the link:#project-info[ProjectInfo] entity is returned that
describes the created project.

.Response
----
  HTTP/1.1 201 Created
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "kind": "gerritcodereview#project",
    "id": "MyProject",
    "name": "MyProject",
    "parent": "All-Projects",
    "description": "This is a demo project."
  }
----

[[get-project-description]]
Get Project Description
~~~~~~~~~~~~~~~~~~~~~~~
[verse]
'GET /projects/link:#project-name[\{project-name\}]/description'

Retrieves the description of a project.

.Request
----
  GET /projects/plugins%2Freplication/description HTTP/1.0
----

.Response
----
  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  "Copies to other servers using the Git protocol"
----

If the project does not have a description an empty string is returned.

[[set-project-description]]
Set Project Description
~~~~~~~~~~~~~~~~~~~~~~~
[verse]
'PUT /projects/link:#project-name[\{project-name\}]/description'

Sets the description of a project.

The new project description must be provided in the request body inside
a link:#project-description-input[ProjectDescriptionInput] entity.

.Request
----
  PUT /projects/plugins%2Freplication/description HTTP/1.0
  Content-Type: application/json;charset=UTF-8

  {
    "description": "Plugin for Gerrit that handles the replication.",
    "commit_message": "Update the project description"
  }
----

As response the new project description is returned.

.Response
----
  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  "Plugin for Gerrit that handles the replication."
----

If the description was deleted the response is "`204 No Content`".

[[delete-project-description]]
Delete Project Description
~~~~~~~~~~~~~~~~~~~~~~~~~~
[verse]
'DELETE /projects/link:#project-name[\{project-name\}]/description'

Deletes the description of a project.

The request body does not need to include a
link:#project-description-input[ProjectDescriptionInput] entity if no
commit message is specified.

Please note that some proxies prohibit request bodies for DELETE
requests. In this case, if you want to specify a commit message, use
link:#set-project-description[PUT] to delete the description.

.Request
----
  DELETE /projects/plugins%2Freplication/description HTTP/1.0
----

.Response
----
  HTTP/1.1 204 No Content
----

[[get-project-parent]]
Get Project Parent
~~~~~~~~~~~~~~~~~~
[verse]
'GET /projects/link:#project-name[\{project-name\}]/parent'

Retrieves the name of a project's parent project. For the
`All-Projects` root project an empty string is returned.

.Request
----
  GET /projects/plugins%2Freplication/parent HTTP/1.0
----

.Response
----
  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  "All-Projects"
----

[[set-project-parent]]
Set Project Parent
~~~~~~~~~~~~~~~~~~
[verse]
'PUT /projects/link:#project-name[\{project-name\}]/parent'

Sets the parent project for a project.

The new name of the parent project must be provided in the request body
inside a link:#project-parent-input[ProjectParentInput] entity.

.Request
----
  PUT /projects/plugins%2Freplication/parent HTTP/1.0
  Content-Type: application/json;charset=UTF-8

  {
    "parent": "Public-Plugins",
    "commit_message": "Update the project parent"
  }
----

As response the new parent project name is returned.

.Response
----
  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  "Public-Plugins"
----

[[get-head]]
Get HEAD
~~~~~~~~
[verse]
'GET /projects/link:#project-name[\{project-name\}]/HEAD'

Retrieves for a project the name of the branch to which `HEAD` points.

.Request
----
  GET /projects/plugins%2Freplication/HEAD HTTP/1.0
----

.Response
----
  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  "refs/heads/master"
----

[[set-head]]
Set HEAD
~~~~~~~~
[verse]
'PUT /projects/link:#project-name[\{project-name\}]/HEAD'

Sets `HEAD` for a project.

The new ref to which `HEAD` should point must be provided in the
request body inside a link:#head-input[HeadInput] entity.

.Request
----
  PUT /projects/plugins%2Freplication/HEAD HTTP/1.0
  Content-Type: application/json;charset=UTF-8

  {
    "ref": "refs/heads/stable"
  }
----

As response the new ref to which `HEAD` points is returned.

.Response
----
  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  "refs/heads/stable"
----

[[get-repository-statistics]]
Get Repository Statistics
~~~~~~~~~~~~~~~~~~~~~~~~~
[verse]
'GET /projects/link:#project-name[\{project-name\}]/statistics.git'

Return statistics for the repository of a project.

.Request
----
  GET /projects/plugins%2Freplication/statistics.git HTTP/1.0
----

The repository statistics are returned as a
link:#repository-statistics-info[RepositoryStatisticsInfo] entity.

.Response
----
  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "number_of_loose_objects": 127,
    "number_of_loose_refs": 15,
    "number_of_pack_files": 15,
    "number_of_packed_objects": 67,
    "number_of_packed_refs": 0,
    "size_of_loose_objects": 29466,
    "size_of_packed_objects": 9646
  }
----

[[run-gc]]
Run GC
~~~~~~
[verse]
'POST /projects/link:#project-name[\{project-name\}]/gc'

Run the Git garbage collection for the repository of a project.

.Request
----
  POST /projects/plugins%2Freplication/gc HTTP/1.0
----

The response is the streamed output of the garbage collection.

.Response
----
  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: text/plain;charset=UTF-8

  collecting garbage for "plugins/replication":
  Pack refs:              100% (21/21)
  Counting objects:       20
  Finding sources:        100% (20/20)
  Getting sizes:          100% (13/13)
  Compressing objects:     83% (5/6)
  Writing objects:        100% (20/20)
  Selecting commits:      100% (7/7)
  Building bitmaps:       100% (7/7)
  Finding sources:        100% (41/41)
  Getting sizes:          100% (25/25)
  Compressing objects:     52% (12/23)
  Writing objects:        100% (41/41)
  Prune loose objects also found in pack files: 100% (36/36)
  Prune loose, unreferenced objects: 100% (36/36)
  done.
----

[[dashboard-endpoints]]
Dashboard Endpoints
-------------------

[[list-dashboards]]
List Dashboards
~~~~~~~~~~~~~~~
[verse]
'GET /projects/link:#project-name[\{project-name\}]/dashboards/'

List custom dashboards for a project.

As result a list of link:#dashboard-info[DashboardInfo] entries is
returned.

List all dashboards for the `work/my-project` project:

.Request
----
  GET /projects/work%2Fmy-project/dashboards/ HTTP/1.0
----

.Response
----
  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  [
    {
      "kind": "gerritcodereview#dashboard",
      "id": "main:closed",
      "ref": "main",
      "path": "closed",
      "description": "Merged and abandoned changes in last 7 weeks",
      "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
      "default": true,
      "title": "Closed changes",
      "sections": [
        {
          "name": "Merged",
          "query": "status:merged age:7w"
        },
        {
          "name": "Abandoned",
          "query": "status:abandoned age:7w"
        }
      ]
    }
  ]
----

.Get all dashboards of the 'All-Projects' project
****
get::/projects/All-Projects/dashboards/
****

[[get-dashboard]]
Get Dashboard
~~~~~~~~~~~~~
[verse]
'GET /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]'

Retrieves a project dashboard. The dashboard can be defined on that
project or be inherited from a parent project.

.Request
----
  GET /projects/work%2Fmy-project/dashboards/main:closed HTTP/1.0
----

As response a link:#dashboard-info[DashboardInfo] entity is returned
that describes the dashboard.

.Response
----
  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "kind": "gerritcodereview#dashboard",
    "id": "main:closed",
    "ref": "main",
    "path": "closed",
    "description": "Merged and abandoned changes in last 7 weeks",
    "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
    "default": true,
    "title": "Closed changes",
    "sections": [
      {
        "name": "Merged",
        "query": "status:merged age:7w"
      },
      {
        "name": "Abandoned",
        "query": "status:abandoned age:7w"
      }
    ]
  }
----

To retrieve the default dashboard of a project use `default` as
dashboard-id.

.Request
----
  GET /projects/work%2Fmy-project/dashboards/default HTTP/1.0
----

.Response
----
  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "kind": "gerritcodereview#dashboard",
    "id": "main:closed",
    "ref": "main",
    "path": "closed",
    "description": "Merged and abandoned changes in last 7 weeks",
    "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
    "default": true,
    "title": "Closed changes",
    "sections": [
      {
        "name": "Merged",
        "query": "status:merged age:7w"
      },
      {
        "name": "Abandoned",
        "query": "status:abandoned age:7w"
      }
    ]
  }
----

[[set-dashboard]]
Set Dashboard
~~~~~~~~~~~~~
[verse]
'PUT /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]'

Updates/Creates a project dashboard.

Currently only supported for the `default` dashboard.

The creation/update information for the dashboard must be provided in
the request body as a link:#dashboard-input[DashboardInput] entity.

.Request
----
  PUT /projects/work%2Fmy-project/dashboards/default HTTP/1.0
  Content-Type: application/json;charset=UTF-8

  {
    "id": "main:closed",
    "commit_message": "Define the default dashboard"
  }
----

As response the new/updated dashboard is returned as a
link:#dashboard-info[DashboardInfo] entity.

.Response
----
  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "kind": "gerritcodereview#dashboard",
    "id": "main:closed",
    "ref": "main",
    "path": "closed",
    "description": "Merged and abandoned changes in last 7 weeks",
    "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
    "default": true,
    "title": "Closed changes",
    "sections": [
      {
        "name": "Merged",
        "query": "status:merged age:7w"
      },
      {
        "name": "Abandoned",
        "query": "status:abandoned age:7w"
      }
    ]
  }
----

[[delete-dashboard]]
Delete Dashboard
~~~~~~~~~~~~~~~~
[verse]
'DELETE /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]'

Deletes a project dashboard.

Currently only supported for the `default` dashboard.

The request body does not need to include a link:#dashboard-input[
DashboardInput] entity if no commit message is specified.

Please note that some proxies prohibit request bodies for DELETE
requests.

.Request
----
  DELETE /projects/work%2Fmy-project/dashboards/default HTTP/1.0
----

.Response
----
  HTTP/1.1 204 No Content
----


[[ids]]
IDs
---

[[dashboard-id]]
\{dashboard-id\}
~~~~~~~~~~~~~~~~
The ID of a dashboard in the format '<ref>:<path>'.

A special dashboard ID is `default` which represents the default
dashboard of a project.

[[project-name]]
\{project-name\}
~~~~~~~~~~~~~~~~
The name of the project.


[[json-entities]]
JSON Entities
-------------

[[dashboard-info]]
DashboardInfo
~~~~~~~~~~~~~
The `DashboardInfo` entity contains information about a project
dashboard.

[options="header",width="50%",cols="1,^2,4"]
|===============================
|Field Name        ||Description
|`kind`            ||`gerritcodereview#dashboard`
|`id`              ||
The ID of the dashboard. The ID has the format '<ref>:<path>',
where ref and path are URL encoded.
|`project`         ||
The name of the project for which this dashboard is returned.
|`defining_project`||
The name of the project in which this dashboard is defined.
This is different from `project` if the dashboard is inherited from a
parent project.
|`ref`             ||
The name of the ref in which the dashboard is defined, without the
`refs/meta/dashboards/` prefix, which is common for all dashboard refs.
|`path`            ||
The path of the file in which the dashboard is defined.
|`description`     |optional|The description of the dashboard.
|`foreach`         |optional|
Subquery that applies to all sections in the dashboard. +
Tokens such as `${project}` are not resolved.
|`url`             ||
The URL under which the dashboard can be opened in the Gerrit WebUI. +
The URL is relative to the canonical web URL. +
Tokens in the queries such as `${project}` are resolved.
|`default`         |not set if `false`|
Whether this is the default dashboard of the project.
|`title`           |optional|The title of the dashboard.
|`sections`        ||
The list of link:#dashboard-section-info[sections] in the dashboard.
|===============================

[[dashboard-input]]
DashboardInput
~~~~~~~~~~~~~~
The `DashboardInput` entity contains information to create/update a
project dashboard.

[options="header",width="50%",cols="1,^2,4"]
|=============================
|Field Name      ||Description
|`id`            |optional|
URL encoded ID of a dashboard to which this dashboard should link to.
|`commit_message`|optional|
Message that should be used to commit the change of the dashboard.
|=============================

[[dashboard-section-info]]
DashboardSectionInfo
~~~~~~~~~~~~~~~~~~~~
The `DashboardSectionInfo` entity contains information about a section
in a dashboard.

[options="header",width="50%",cols="1,6"]
|===========================
|Field Name    |Description
|`name`        |The title of the section.
|`query`       |The query of the section. +
Tokens such as `${project}` are not resolved.
|===========================

[[head-input]]
HeadInput
~~~~~~~~~
The `HeadInput` entity contains information for setting `HEAD` for a
project.

[options="header",width="50%",cols="1,6"]
|============================
|Field Name      |Description
|`ref`           |
The ref to which `HEAD` should be set, the `refs/heads` prefix can be
omitted.
|============================

[[project-description-input]]
ProjectDescriptionInput
~~~~~~~~~~~~~~~~~~~~~~~
The `ProjectDescriptionInput` entity contains information for setting a
project description.

[options="header",width="50%",cols="1,^2,4"]
|=============================
|Field Name      ||Description
|`description`   |optional|The project description. +
The project description will be deleted if not set.
|`commit_message`|optional|
Message that should be used to commit the change of the project
description in the `project.config` file to the `refs/meta/config`
branch.
|=============================

[[project-info]]
ProjectInfo
~~~~~~~~~~~
The `ProjectInfo` entity contains information about a project.

[options="header",width="50%",cols="1,^2,4"]
|===========================
|Field Name    ||Description
|`kind`        ||`gerritcodereview#project`
|`id`          ||The URL encoded project name.
|`name`        |
not set if returned in a map where the project name is used as map key|
The name of the project.
|`parent`      |optional|
The name of the parent project. +
`?-<n>` if the parent project is not visible (`<n>` is a number which
is increased for each non-visible project).
|`description` |optional|The description of the project.
|`branches`    |optional|Map of branch names to HEAD revisions.
|===========================

[[project-input]]
ProjectInput
~~~~~~~~~~~~
The `ProjectInput` entity contains information for the creation of
a new project.

[options="header",width="50%",cols="1,^2,4"]
|=========================================
|Field Name                  ||Description
|`name`                      |optional|
The name of the project (not encoded). +
If set, must match the project name in the URL.
|`parent`                    |optional|
The name of the parent project. +
If not set, the `All-Projects` project will be the parent project.
|`description`               |optional|The description of the project.
|`permissions_only`          |`false` if not set|
Whether a permission-only project should be created.
|`create_empty_commit`       |`false` if not set|
Whether an empty initial commit should be created.
|`submit_type`               |optional|
The submit type that should be set for the project
(`MERGE_IF_NECESSARY`, `REBASE_IF_NECESSARY`, `FAST_FORWARD_ONLY`,
`MERGE_ALWAYS`, `CHERRY_PICK`). +
If not set, `MERGE_IF_NECESSARY` is set as submit type.
|`branches`                  |optional|
A list of branches that should be initially created. +
For the branch names the `refs/heads/` prefix can be omitted.
|`owners`                    |optional|
A list of groups that should be assigned as project owner. +
Each group in the list must be specified as
link:rest-api-groups.html#group-id[group-id]. +
If not set, the link:config-gerrit.html#repository.name.ownerGroup[
groups that are configured as default owners] are set as project
owners.
|`use_contributor_agreements`|`INHERIT` if not set|
Whether contributor agreements should be used for the project  (`TRUE`,
`FALSE`, `INHERIT`).
|`use_signed_off_by`         |`INHERIT` if not set|
Whether the usage of 'Signed-Off-By' footers is required for the
project (`TRUE`, `FALSE`, `INHERIT`).
|`use_content_merge`         |`INHERIT` if not set|
Whether content merge should be enabled for the project (`TRUE`,
`FALSE`, `INHERIT`). +
`FALSE`, if the `submit_type` is `FAST_FORWARD_ONLY`.
|`require_change_id`         |`INHERIT` if not set|
Whether the usage of Change-Ids is required for the project (`TRUE`,
`FALSE`, `INHERIT`).
|=========================================

[[project-parent-input]]
ProjectParentInput
~~~~~~~~~~~~~~~~~~
The `ProjectParentInput` entity contains information for setting a
project parent.

[options="header",width="50%",cols="1,^2,4"]
|=============================
|Field Name      ||Description
|`parent`        ||The name of the parent project.
|`commit_message`|optional|
Message that should be used to commit the change of the project parent
in the `project.config` file to the `refs/meta/config` branch.
|=============================

[[repository-statistics-info]]
RepositoryStatisticsInfo
~~~~~~~~~~~~~~~~~~~~~~~~
The `RepositoryStatisticsInfo` entity contains information about
statistics of a Git repository.

[options="header",width="50%",cols="1,6"]
|======================================
|Field Name                |Description
|`number_of_loose_objects` |Number of loose objects.
|`number_of_loose_refs`    |Number of loose refs.
|`number_of_pack_files`    |Number of pack files.
|`number_of_packed_objects`|Number of packed objects.
|`number_of_packed_refs`   |Number of packed refs.
|`size_of_loose_objects`   |Size of loose objects in bytes.
|`size_of_packed_objects`  |Size of packed objects in bytes.
|======================================


GERRIT
------
Part of link:index.html[Gerrit Code Review]