blob: ce2adbec588aefce211c1f4b9d11ca7898270066 [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= Gerrit Code Review - /projects/ REST API
Edwin Kempind0a63922013-01-23 16:32:59 +01002
3This page describes the project related REST endpoints.
4Please also take note of the general information on the
5link:rest-api.html[REST API].
6
Edwin Kempinc3fe3cb2013-02-13 15:09:23 +01007[[project-endpoints]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08008== Project Endpoints
Edwin Kempinc3fe3cb2013-02-13 15:09:23 +01009
Edwin Kempin76202742013-02-15 13:51:50 +010010[[list-projects]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080011=== List Projects
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080012--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +010013'GET /projects/'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080014--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +010015
Edwin Kempind0a63922013-01-23 16:32:59 +010016Lists the projects accessible by the caller. This is the same as
17using the link:cmd-ls-projects.html[ls-projects] command over SSH,
18and accepts the same options as query parameters.
19
Edwin Kempin51a6dc92013-02-04 15:43:59 +010020As result a map is returned that maps the project names to
21link:#project-info[ProjectInfo] entries. The entries in the map are sorted
22by project name.
23
Edwin Kempin37440832013-02-06 11:36:00 +010024.Request
Edwin Kempind0a63922013-01-23 16:32:59 +010025----
26 GET /projects/?d HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +010027----
Edwin Kempind0a63922013-01-23 16:32:59 +010028
Edwin Kempin37440832013-02-06 11:36:00 +010029.Response
30----
Edwin Kempind0a63922013-01-23 16:32:59 +010031 HTTP/1.1 200 OK
32 Content-Disposition: attachment
33 Content-Type: application/json;charset=UTF-8
34
35 )]}'
36 {
37 "external/bison": {
Edwin Kempind0a63922013-01-23 16:32:59 +010038 "id": "external%2Fbison",
39 "description": "GNU parser generator"
40 },
41 "external/gcc": {
Edwin Kempind0a63922013-01-23 16:32:59 +010042 "id": "external%2Fgcc",
43 },
44 "external/openssl": {
Edwin Kempind0a63922013-01-23 16:32:59 +010045 "id": "external%2Fopenssl",
46 "description": "encryption\ncrypto routines"
47 },
48 "test": {
Edwin Kempind0a63922013-01-23 16:32:59 +010049 "id": "test",
50 "description": "\u003chtml\u003e is escaped"
51 }
52 }
53----
54
Hugo Arèsbdd7f682014-07-08 10:57:52 -040055[[project-options]]
56==== Project Options
57
58Branch(b)::
59Limit the results to the projects having the specified branch and
60include the sha1 of the branch in the results.
61+
62Get projects that have a 'master' branch:
63+
64.Request
65----
66GET /projects/?b=master HTTP/1.0
67----
68+
69.Response
70----
71 HTTP/1.1 200 OK
72 Content-Disposition: attachment
73 Content-Type: application/json;charset=UTF-8
74
75 )]}'
76 {
77 "some-project": {
78 "id": "some-project",
79 "branches": {
80 "master": "c5ed9dfcbf002ca0e432d788dab6ca2387829ca7"
81 }
82 },
83 "some-other-project": {
84 "id": "some-other-project",
85 "branches": {
86 "master": "ef1c270142f9581ecf768f4193fc8f8a81102ec2"
87 }
88 },
89 }
90----
91
92Description(d)::
93Include project description in the results.
94+
95Get all the projects with their description:
96+
97.Request
98----
99GET /projects/?d HTTP/1.0
100----
101+
102.Response
103----
104 HTTP/1.1 200 OK
105 Content-Disposition: attachment
106 Content-Type: application/json;charset=UTF-8
107
108 )]}'
109 {
110 "some-project": {
111 "id": "some-project",
112 "description": "Description of some project."
113 },
114 "some-other-project": {
115 "id": "some-other-project",
116 "description": "Description of some other project."
117 }
118 },
119 }
120----
121
122Limit(n)::
123Limit the number of projects to be included in the results.
124+
125Query the first project in the project list:
126+
127.Request
128----
129 GET /projects/?n=1 HTTP/1.0
130----
131+
132.Response
133----
134 HTTP/1.1 200 OK
135 Content-Disposition: attachment
136 Content-Type: application/json;charset=UTF-8
137
138 )]}'
139 {
140 "some-project": {
141 "id": "some-project"
142 }
143 }
144----
145
Edwin Kempina64c4b92013-01-23 11:30:40 +0100146
Edwin Kempind0a63922013-01-23 16:32:59 +0100147[[suggest-projects]]
Hugo Arèsbdd7f682014-07-08 10:57:52 -0400148Prefix(p)::
149Limit the results to those projects that start with the specified
Edwin Kempind0a63922013-01-23 16:32:59 +0100150prefix.
Hugo Arèsbdd7f682014-07-08 10:57:52 -0400151+
Edwin Kempind0a63922013-01-23 16:32:59 +0100152List all projects that start with `platform/`:
Hugo Arèsbdd7f682014-07-08 10:57:52 -0400153+
Edwin Kempin37440832013-02-06 11:36:00 +0100154.Request
Edwin Kempind0a63922013-01-23 16:32:59 +0100155----
156 GET /projects/?p=platform%2F HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +0100157----
Hugo Arèsbdd7f682014-07-08 10:57:52 -0400158+
Edwin Kempin37440832013-02-06 11:36:00 +0100159.Response
160----
Edwin Kempind0a63922013-01-23 16:32:59 +0100161 HTTP/1.1 200 OK
162 Content-Disposition: attachment
163 Content-Type: application/json;charset=UTF-8
164
165 )]}'
166 {
167 "platform/drivers": {
Edwin Kempind0a63922013-01-23 16:32:59 +0100168 "id": "platform%2Fdrivers",
169 },
170 "platform/tools": {
Edwin Kempind0a63922013-01-23 16:32:59 +0100171 "id": "platform%2Ftools",
172 }
173 }
174----
Hugo Arèsbdd7f682014-07-08 10:57:52 -0400175+
Edwin Kempind0a63922013-01-23 16:32:59 +0100176E.g. this feature can be used by suggestion client UI's to limit results.
177
Hugo Arèsb8aae412014-07-08 11:04:43 -0400178Regex(r)::
179Limit the results to those projects that match the specified regex.
180+
181Boundary matchers '^' and '$' are implicit. For example: the regex 'test.*' will
182match any projects that start with 'test' and regex '.*test' will match any
183project that end with 'test'.
184+
185List all projects that match regex `test.*project`:
186+
187.Request
188----
189 GET /projects/?r=test.*project HTTP/1.0
190----
191+
192.Response
193----
194 HTTP/1.1 200 OK
195 Content-Disposition: attachment
196 Content-Type: application/json;charset=UTF-8
197
198 )]}'
199 {
200 "test/some-project": {
201 "id": "test%2Fsome-project",
202 },
203 "test/some-other-project": {
204 "id": "test%2Fsome-other-project",
205 }
206 }
207
208----
209
Hugo Arèsbdd7f682014-07-08 10:57:52 -0400210Skip(S)::
211Skip the given number of projects from the beginning of the list.
212+
213Query the second project in the project list:
214+
215.Request
Anthony Chin5f44cc52014-03-12 10:37:10 -0400216----
Hugo Arèsbdd7f682014-07-08 10:57:52 -0400217 GET /projects/?n=1&S=1 HTTP/1.0
218----
219+
220.Response
221----
222 HTTP/1.1 200 OK
223 Content-Disposition: attachment
224 Content-Type: application/json;charset=UTF-8
225
226 )]}'
227 {
228 "some-other-project": {
229 "id": "some-other-project"
230 }
231 }
Anthony Chin5f44cc52014-03-12 10:37:10 -0400232----
233
Hugo Arèsbdd7f682014-07-08 10:57:52 -0400234Substring(m)::
235Limit the results to those projects that match the specified substring.
236+
237List all projects that match substring `test/`:
238+
239.Request
Anthony Chin5f44cc52014-03-12 10:37:10 -0400240----
Hugo Arèsbdd7f682014-07-08 10:57:52 -0400241 GET /projects/?m=test%2F HTTP/1.0
242----
243+
244.Response
245----
246 HTTP/1.1 200 OK
247 Content-Disposition: attachment
248 Content-Type: application/json;charset=UTF-8
249
250 )]}'
251 {
252 "test/some-project": {
253 "id": "test%2Fsome-project",
254 },
255 "some-path/test/some-other-project": {
256 "id": "some-path%2Ftest%2Fsome-other-project",
257 }
258 }
259----
260
261Tree(t)::
262Get projects inheritance in a tree-like format. This option does
263not work together with the branch option.
264+
265Get all the projects with tree option:
266+
267.Request
268----
269GET /projects/?t HTTP/1.0
270----
271+
272.Response
273----
274 HTTP/1.1 200 OK
275 Content-Disposition: attachment
276 Content-Type: application/json;charset=UTF-8
277
278 )]}'
279 {
280 "All-Projects" {
281 "id": "All-Projects"
282 },
283 "child-project": {
284 "id": "child-project",
285 "parent":"parent-project"
286 },
287 "parent-project": {
288 "id": "parent-project",
289 "parent":"All-Projects"
290 }
291 }
292----
293
294Type(type)::
295Get projects with specified type: ALL, CODE, PERMISSIONS.
296+
297Get all the projects of type 'PERMISSIONS':
298+
299.Request
300----
301GET /projects/?type=PERMISSIONS HTTP/1.0
302----
303+
304.Response
305----
306 HTTP/1.1 200 OK
307 Content-Disposition: attachment
308 Content-Type: application/json;charset=UTF-8
309
310 )]}'
311 {
312 "All-Projects" {
313 "id": "All-Projects"
314 },
315 "some-parent-project": {
316 "id": "some-parent-project"
317 }
318 }
Anthony Chin5f44cc52014-03-12 10:37:10 -0400319----
320
Edwin Kempin5c544e22013-03-06 13:35:45 +0100321[[get-project]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800322=== Get Project
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800323--
Edwin Kempin5c544e22013-03-06 13:35:45 +0100324'GET /projects/link:#project-name[\{project-name\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800325--
Edwin Kempin5c544e22013-03-06 13:35:45 +0100326
327Retrieves a project.
328
329.Request
330----
331 GET /projects/plugins%2Freplication HTTP/1.0
332----
333
334As response a link:#project-info[ProjectInfo] entity is returned that
335describes the project.
336
337.Response
338----
339 HTTP/1.1 200 OK
340 Content-Disposition: attachment
341 Content-Type: application/json;charset=UTF-8
342
343 )]}'
344 {
Edwin Kempin5c544e22013-03-06 13:35:45 +0100345 "id": "plugins%2Freplication",
346 "name": "plugins/replication",
347 "parent": "Public-Plugins",
Shawn Pearce21a6c212014-04-23 12:35:10 -0700348 "description": "Copies to other servers using the Git protocol",
349 "state": "ACTIVE"
Edwin Kempin5c544e22013-03-06 13:35:45 +0100350 }
351----
352
Bruce Zu798ea122013-02-18 16:55:43 +0800353[[create-project]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800354=== Create Project
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800355--
Bruce Zu798ea122013-02-18 16:55:43 +0800356'PUT /projects/link:#project-name[\{project-name\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800357--
Bruce Zu798ea122013-02-18 16:55:43 +0800358
359Creates a new project.
360
361In the request body additional data for the project can be provided as
362link:#project-input[ProjectInput].
363
364.Request
365----
366 PUT /projects/MyProject HTTP/1.0
367 Content-Type: application/json;charset=UTF-8
368
369 {
370 "description": "This is a demo project.",
371 "submit_type": "CHERRY_PICK",
372 "owners": [
373 "MyProject-Owners"
374 ]
375 }
376----
377
378As response the link:#project-info[ProjectInfo] entity is returned that
379describes the created project.
380
381.Response
382----
383 HTTP/1.1 201 Created
384 Content-Disposition: attachment
385 Content-Type: application/json;charset=UTF-8
386
387 )]}'
388 {
Bruce Zu798ea122013-02-18 16:55:43 +0800389 "id": "MyProject",
390 "name": "MyProject",
391 "parent": "All-Projects",
392 "description": "This is a demo project."
393 }
394----
395
Edwin Kempin57f303c2013-02-13 15:52:22 +0100396[[get-project-description]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800397=== Get Project Description
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800398--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100399'GET /projects/link:#project-name[\{project-name\}]/description'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800400--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100401
Edwin Kempin57f303c2013-02-13 15:52:22 +0100402Retrieves the description of a project.
403
404.Request
405----
406 GET /projects/plugins%2Freplication/description HTTP/1.0
407----
408
409.Response
410----
411 HTTP/1.1 200 OK
412 Content-Disposition: attachment
413 Content-Type: application/json;charset=UTF-8
414
415 )]}'
416 "Copies to other servers using the Git protocol"
417----
418
Edwin Kempinefec4492013-02-22 10:09:23 +0100419If the project does not have a description an empty string is returned.
420
Edwin Kempin57f303c2013-02-13 15:52:22 +0100421[[set-project-description]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800422=== Set Project Description
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800423--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100424'PUT /projects/link:#project-name[\{project-name\}]/description'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800425--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100426
Edwin Kempin57f303c2013-02-13 15:52:22 +0100427Sets the description of a project.
428
429The new project description must be provided in the request body inside
430a link:#project-description-input[ProjectDescriptionInput] entity.
431
432.Request
433----
434 PUT /projects/plugins%2Freplication/description HTTP/1.0
435 Content-Type: application/json;charset=UTF-8
436
437 {
438 "description": "Plugin for Gerrit that handles the replication.",
439 "commit_message": "Update the project description"
440 }
441----
442
443As response the new project description is returned.
444
445.Response
446----
447 HTTP/1.1 200 OK
448 Content-Disposition: attachment
449 Content-Type: application/json;charset=UTF-8
450
451 )]}'
452 "Plugin for Gerrit that handles the replication."
453----
454
Edwin Kempin114ab162013-02-28 09:25:37 +0100455If the description was deleted the response is "`204 No Content`".
456
Edwin Kempin57f303c2013-02-13 15:52:22 +0100457[[delete-project-description]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800458=== Delete Project Description
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800459--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100460'DELETE /projects/link:#project-name[\{project-name\}]/description'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800461--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100462
Edwin Kempin57f303c2013-02-13 15:52:22 +0100463Deletes the description of a project.
464
Edwin Kempinefec4492013-02-22 10:09:23 +0100465The request body does not need to include a
466link:#project-description-input[ProjectDescriptionInput] entity if no
467commit message is specified.
Edwin Kempin57f303c2013-02-13 15:52:22 +0100468
Edwin Kempinefec4492013-02-22 10:09:23 +0100469Please note that some proxies prohibit request bodies for DELETE
Edwin Kempin57f303c2013-02-13 15:52:22 +0100470requests. In this case, if you want to specify a commit message, use
471link:#set-project-description[PUT] to delete the description.
472
473.Request
474----
475 DELETE /projects/plugins%2Freplication/description HTTP/1.0
476----
477
478.Response
479----
480 HTTP/1.1 204 No Content
481----
482
Edwin Kempinecad88c2013-02-14 12:09:44 +0100483[[get-project-parent]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800484=== Get Project Parent
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800485--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100486'GET /projects/link:#project-name[\{project-name\}]/parent'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800487--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100488
Edwin Kempinecad88c2013-02-14 12:09:44 +0100489Retrieves the name of a project's parent project. For the
490`All-Projects` root project an empty string is returned.
491
492.Request
493----
494 GET /projects/plugins%2Freplication/parent HTTP/1.0
495----
496
497.Response
498----
499 HTTP/1.1 200 OK
500 Content-Disposition: attachment
501 Content-Type: application/json;charset=UTF-8
502
503 )]}'
504 "All-Projects"
505----
506
507[[set-project-parent]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800508=== Set Project Parent
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800509--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100510'PUT /projects/link:#project-name[\{project-name\}]/parent'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800511--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100512
Edwin Kempinecad88c2013-02-14 12:09:44 +0100513Sets the parent project for a project.
514
515The new name of the parent project must be provided in the request body
516inside a link:#project-parent-input[ProjectParentInput] entity.
517
518.Request
519----
520 PUT /projects/plugins%2Freplication/parent HTTP/1.0
521 Content-Type: application/json;charset=UTF-8
522
523 {
524 "parent": "Public-Plugins",
525 "commit_message": "Update the project parent"
526 }
527----
528
529As response the new parent project name is returned.
530
531.Response
532----
533 HTTP/1.1 200 OK
534 Content-Disposition: attachment
535 Content-Type: application/json;charset=UTF-8
536
537 )]}'
538 "Public-Plugins"
539----
540
Edwin Kempin6b813372013-03-13 17:07:33 +0100541[[get-head]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800542=== Get HEAD
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800543--
Edwin Kempin6b813372013-03-13 17:07:33 +0100544'GET /projects/link:#project-name[\{project-name\}]/HEAD'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800545--
Edwin Kempin6b813372013-03-13 17:07:33 +0100546
547Retrieves for a project the name of the branch to which `HEAD` points.
548
549.Request
550----
551 GET /projects/plugins%2Freplication/HEAD HTTP/1.0
552----
553
554.Response
555----
556 HTTP/1.1 200 OK
557 Content-Disposition: attachment
558 Content-Type: application/json;charset=UTF-8
559
560 )]}'
561 "refs/heads/master"
562----
563
564[[set-head]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800565=== Set HEAD
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800566--
Edwin Kempin6b813372013-03-13 17:07:33 +0100567'PUT /projects/link:#project-name[\{project-name\}]/HEAD'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800568--
Edwin Kempin6b813372013-03-13 17:07:33 +0100569
570Sets `HEAD` for a project.
571
572The new ref to which `HEAD` should point must be provided in the
573request body inside a link:#head-input[HeadInput] entity.
574
575.Request
576----
577 PUT /projects/plugins%2Freplication/HEAD HTTP/1.0
578 Content-Type: application/json;charset=UTF-8
579
580 {
581 "ref": "refs/heads/stable"
582 }
583----
584
585As response the new ref to which `HEAD` points is returned.
586
587.Response
588----
589 HTTP/1.1 200 OK
590 Content-Disposition: attachment
591 Content-Type: application/json;charset=UTF-8
592
593 )]}'
594 "refs/heads/stable"
595----
596
Edwin Kempin19ea9b92013-03-20 13:20:26 +0100597[[get-repository-statistics]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800598=== Get Repository Statistics
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800599--
Edwin Kempin19ea9b92013-03-20 13:20:26 +0100600'GET /projects/link:#project-name[\{project-name\}]/statistics.git'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800601--
Edwin Kempin19ea9b92013-03-20 13:20:26 +0100602
603Return statistics for the repository of a project.
604
605.Request
606----
607 GET /projects/plugins%2Freplication/statistics.git HTTP/1.0
608----
609
610The repository statistics are returned as a
611link:#repository-statistics-info[RepositoryStatisticsInfo] entity.
612
613.Response
614----
615 HTTP/1.1 200 OK
616 Content-Disposition: attachment
617 Content-Type: application/json;charset=UTF-8
618
619 )]}'
620 {
621 "number_of_loose_objects": 127,
622 "number_of_loose_refs": 15,
623 "number_of_pack_files": 15,
624 "number_of_packed_objects": 67,
625 "number_of_packed_refs": 0,
626 "size_of_loose_objects": 29466,
627 "size_of_packed_objects": 9646
628 }
629----
630
Dave Borowitz237073a2013-04-04 16:52:27 -0700631[[get-config]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800632=== Get Config
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800633--
Dave Borowitz237073a2013-04-04 16:52:27 -0700634'GET /projects/link:#project-name[\{project-name\}]/config'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800635--
Dave Borowitz237073a2013-04-04 16:52:27 -0700636
637Gets some configuration information about a project. Note that this
638config info is not simply the contents of `project.config`; it generally
639contains fields that may have been inherited from parent projects.
640
641.Request
642----
643 GET /projects/myproject/config
644----
645
646A link:#config-info[ConfigInfo] entity is returned that describes the
647project configuration. Some fields are only visible to users that have
648read access to `refs/meta/config`.
649
650.Response
651----
652 HTTP/1.1 200 OK
653 Content-Disposition: attachment
654 Content-Type: application/json;charset=UTF-8
655
656 )]}'
657 {
Edwin Kempina23eb102013-07-17 09:10:54 +0200658 "description": "demo project",
Edwin Kempin0cb5a562013-07-12 15:41:04 +0200659 "use_contributor_agreements": {
660 "value": true,
661 "configured_value": "TRUE",
662 "inherited_value": false
663 },
664 "use_content_merge": {
665 "value": true,
666 "configured_value": "INHERIT",
667 "inherited_value": true
668 },
669 "use_signed_off_by": {
670 "value": false,
671 "configured_value": "INHERIT",
672 "inherited_value": false
673 },
Deniz Türkoglu52777272014-09-08 17:02:48 +0200674 "create_new_change_for_all_not_in_target": {
675 "value": false,
676 "configured_value": "INHERIT",
677 "inherited_value": false
678 },
Edwin Kempin0cb5a562013-07-12 15:41:04 +0200679 "require_change_id": {
680 "value": false,
681 "configured_value": "FALSE",
682 "inherited_value": true
Edwin Kempin3c99f592013-07-15 10:12:27 +0200683 },
684 "max_object_size_limit": {
685 "value": "15m",
686 "configured_value": "15m",
687 "inherited_value": "20m"
688 },
689 "submit_type": "MERGE_IF_NECESSARY",
690 "state": "ACTIVE",
David Ostrovsky9e8b2fb2013-08-30 08:09:53 +0200691 "commentlinks": {},
Edwin Kempin9ce4f552013-11-15 16:00:00 +0100692 "plugin_config": {
693 "helloworld": {
694 "language": {
695 "display_name": "Preferred Language",
696 "type": "STRING",
697 "value": "en"
698 }
699 }
700 },
David Ostrovsky9e8b2fb2013-08-30 08:09:53 +0200701 "actions": {
702 "cookbook~hello-project": {
703 "method": "POST",
704 "label": "Say hello",
705 "title": "Say hello in different languages",
706 "enabled": true
707 }
708 }
Dave Borowitz237073a2013-04-04 16:52:27 -0700709 }
710----
711
Edwin Kempina23eb102013-07-17 09:10:54 +0200712[[set-config]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800713=== Set Config
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800714--
Edwin Kempina23eb102013-07-17 09:10:54 +0200715'PUT /projects/link:#project-name[\{project-name\}]/config'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800716--
Edwin Kempina23eb102013-07-17 09:10:54 +0200717
718Sets the configuration of a project.
719
720The new configuration must be provided in the request body as a
721link:#config-input[ConfigInput] entity.
722
723.Request
724----
725 PUT /projects/myproject/config HTTP/1.0
726 Content-Type: application/json;charset=UTF-8
727
728 {
729 "description": "demo project",
730 "use_contributor_agreements": "FALSE",
731 "use_content_merge": "INHERIT",
732 "use_signed_off_by": "INHERIT",
Deniz Türkoglu52777272014-09-08 17:02:48 +0200733 "create_new_change_for_all_not_in_target": "INHERIT",
Edwin Kempina23eb102013-07-17 09:10:54 +0200734 "require_change_id": "TRUE",
735 "max_object_size_limit": "10m",
736 "submit_type": "REBASE_IF_NECESSARY",
737 "state": "ACTIVE"
738 }
739----
740
741As response the new configuration is returned as a link:#config-info[
742ConfigInfo] entity.
743
744.Response
745----
746 HTTP/1.1 200 OK
747 Content-Disposition: attachment
748 Content-Type: application/json;charset=UTF-8
749
750 )]}'
751 {
Edwin Kempina23eb102013-07-17 09:10:54 +0200752 "use_contributor_agreements": {
753 "value": false,
754 "configured_value": "FALSE",
755 "inherited_value": false
756 },
757 "use_content_merge": {
758 "value": true,
759 "configured_value": "INHERIT",
760 "inherited_value": true
761 },
762 "use_signed_off_by": {
763 "value": false,
764 "configured_value": "INHERIT",
765 "inherited_value": false
766 },
Deniz Türkoglu52777272014-09-08 17:02:48 +0200767 "create_new_change_for_all_not_in_target": {
768 "value": true,
769 "configured_value": "INHERIT",
770 "inherited_value": false
771 },
Edwin Kempina23eb102013-07-17 09:10:54 +0200772 "require_change_id": {
773 "value": true,
774 "configured_value": "TRUE",
775 "inherited_value": true
776 },
777 "max_object_size_limit": {
778 "value": "10m",
779 "configured_value": "10m",
780 "inherited_value": "20m"
781 },
782 "submit_type": "REBASE_IF_NECESSARY",
783 "state": "ACTIVE",
784 "commentlinks": {}
785 }
786----
787
Edwin Kempinef3542f2013-03-19 13:31:49 +0100788[[run-gc]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800789=== Run GC
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800790--
Edwin Kempinef3542f2013-03-19 13:31:49 +0100791'POST /projects/link:#project-name[\{project-name\}]/gc'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800792--
Edwin Kempinef3542f2013-03-19 13:31:49 +0100793
794Run the Git garbage collection for the repository of a project.
795
Edwin Kempin4bdc72d2013-11-13 13:30:49 +0100796Options for the Git garbage collection can be specified in the
797request body as a link:#gc-input[GCInput] entity.
798
Edwin Kempinef3542f2013-03-19 13:31:49 +0100799.Request
800----
801 POST /projects/plugins%2Freplication/gc HTTP/1.0
Edwin Kempin4bdc72d2013-11-13 13:30:49 +0100802 Content-Type: application/json;charset=UTF-8
803
804 {
805 "show_progress": true
806 }
Edwin Kempinef3542f2013-03-19 13:31:49 +0100807----
808
809The response is the streamed output of the garbage collection.
810
811.Response
812----
813 HTTP/1.1 200 OK
814 Content-Disposition: attachment
815 Content-Type: text/plain;charset=UTF-8
816
817 collecting garbage for "plugins/replication":
818 Pack refs: 100% (21/21)
819 Counting objects: 20
820 Finding sources: 100% (20/20)
821 Getting sizes: 100% (13/13)
822 Compressing objects: 83% (5/6)
823 Writing objects: 100% (20/20)
824 Selecting commits: 100% (7/7)
825 Building bitmaps: 100% (7/7)
826 Finding sources: 100% (41/41)
827 Getting sizes: 100% (25/25)
828 Compressing objects: 52% (12/23)
829 Writing objects: 100% (41/41)
830 Prune loose objects also found in pack files: 100% (36/36)
831 Prune loose, unreferenced objects: 100% (36/36)
832 done.
833----
834
Edwin Kempin62946742014-07-09 11:17:58 +0200835[[ban-commit]]
836=== Ban Commit
837--
838'PUT /projects/link:#project-name[\{project-name\}]/ban'
839--
840
841Marks commits as banned for the project. If a commit is banned Gerrit
842rejects every push that includes this commit with
843link:error-contains-banned-commit.html[contains banned commit ...].
844
845[NOTE]
846This REST endpoint only marks the commits as banned, but it does not
847remove the commits from the history of any central branch. This needs
848to be done manually.
849
850The commits to be banned must be specified in the request body as a
851link:#ban-input[BanInput] entity.
852
853The caller must be project owner.
854
855.Request
856----
857 PUT /projects/plugins%2Freplication/ban HTTP/1.0
858 Content-Type: application/json;charset=UTF-8
859
860 {
861 "commits": [
862 "a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96",
863 "cf5b56541f84b8b57e16810b18daca9c3adc377b"
864 ],
865 "reason": "Violates IP"
866 }
867----
868
869As response a link:#ban-result-info[BanResultInfo] entity is returned.
870
871.Response
872----
873 HTTP/1.1 200 OK
874 Content-Disposition: attachment
875 Content-Type: application/json;charset=UTF-8
876
877 )]}'
878 {
879 "newly_banned": [
880 "a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96",
881 "cf5b56541f84b8b57e16810b18daca9c3adc377b"
882 ]
883 }
884----
885
Edwin Kempina686de92013-05-09 15:12:34 +0200886[[branch-endpoints]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800887== Branch Endpoints
Edwin Kempina686de92013-05-09 15:12:34 +0200888
889[[list-branches]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800890=== List Branches
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800891--
Edwin Kempina686de92013-05-09 15:12:34 +0200892'GET /projects/link:#project-name[\{project-name\}]/branches/'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800893--
Edwin Kempina686de92013-05-09 15:12:34 +0200894
895List the branches of a project.
896
897As result a list of link:#branch-info[BranchInfo] entries is
898returned.
899
900.Request
901----
902 GET /projects/work%2Fmy-project/branches/ HTTP/1.0
903----
904
905.Response
906----
907 HTTP/1.1 200 OK
908 Content-Disposition: attachment
909 Content-Type: application/json;charset=UTF-8
910
911 )]}'
912 [
913 {
914 "ref": "HEAD",
915 "revision": "master"
916 },
917 {
918 "ref": "refs/meta/config",
919 "revision": "76016386a0d8ecc7b6be212424978bb45959d668"
920 },
921 {
922 "ref": "refs/heads/master",
923 "revision": "67ebf73496383c6777035e374d2d664009e2aa5c"
924 },
925 {
926 "ref": "refs/heads/stable",
927 "revision": "64ca533bd0eb5252d2fee83f63da67caae9b4674",
928 "can_delete": true
929 }
930 ]
931----
932
Hugo Arès3133b4b2014-10-14 14:05:10 -0400933[[branch-options]]
934==== Branch Options
935
Hugo Arès15856622014-10-14 14:19:01 -0400936Limit(n)::
937Limit the number of branches to be included in the results.
938+
939.Request
940----
941 GET /projects/testproject/branches?n=1 HTTP/1.0
942----
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 {
953 "ref": "HEAD",
954 "revision": "master",
955 "can_delete": false
956 }
957 ]
958----
959
960Skip(s)::
961Skip the given number of branches from the beginning of the list.
962+
963.Request
964----
965 GET /projects/testproject/branches?n=1&s=0 HTTP/1.0
966----
967+
968.Response
969----
970 HTTP/1.1 200 OK
971 Content-Disposition: attachment
972 Content-Type: application/json;charset=UTF-8
973
974 )]}'
975 [
976 {
977 "ref": "HEAD",
978 "revision": "master",
979 "can_delete": false
980 }
981 ]
982----
983
Hugo Arès3133b4b2014-10-14 14:05:10 -0400984Substring(m)::
985Limit the results to those projects that match the specified substring.
986+
987List all projects that match substring `test`:
988+
989.Request
990----
991 GET /projects/testproject/branches?m=test HTTP/1.0
992----
993+
994.Response
995----
996 HTTP/1.1 200 OK
997 Content-Disposition: attachment
998 Content-Type: application/json;charset=UTF-8
999
1000 )]}'
1001 [
1002 {
1003 "ref": "refs/heads/test1",
1004 "revision": "9c9d08a438e55e52f33b608415e6dddd9b18550d",
1005 "can_delete": true
1006 }
1007 ]
1008----
1009
1010Regex(r)::
1011Limit the results to those branches that match the specified regex.
1012Boundary matchers '^' and '$' are implicit. For example: the regex 't*' will
1013match any branches that start with 'test' and regex '*t' will match any
1014branches that end with 'test'.
1015+
1016List all branches that match regex `t.*1`:
1017+
1018.Request
1019----
1020 GET /projects/testproject/branches?r=t.*1 HTTP/1.0
1021----
1022+
1023.Response
1024----
1025 HTTP/1.1 200 OK
1026 Content-Disposition: attachment
1027 Content-Type: application/json;charset=UTF-8
1028
1029 )]}'
1030 [
1031 {
1032 "ref": "refs/heads/test1",
1033 "revision": "9c9d08a438e55e52f33b608415e6dddd9b18550d",
1034 "can_delete": true
1035 }
1036 ]
1037----
1038
Edwin Kempin196e1732013-05-09 15:12:34 +02001039[[get-branch]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001040=== Get Branch
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001041--
Edwin Kempin196e1732013-05-09 15:12:34 +02001042'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001043--
Edwin Kempin196e1732013-05-09 15:12:34 +02001044
1045Retrieves a branch of a project.
1046
1047.Request
1048----
1049 GET /projects/work%2Fmy-project/branches/master HTTP/1.0
1050----
1051
1052As response a link:#branch-info[BranchInfo] entity is returned that
1053describes the branch.
1054
1055.Response
1056----
1057 HTTP/1.1 200 OK
1058 Content-Disposition: attachment
1059 Content-Type: application/json;charset=UTF-8
1060
1061 )]}'
1062 {
1063 "ref": "refs/heads/master",
1064 "revision": "67ebf73496383c6777035e374d2d664009e2aa5c"
1065 }
1066----
1067
Edwin Kempin5c0d6b32013-05-09 19:54:37 +02001068[[create-branch]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001069=== Create Branch
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001070--
Edwin Kempin5c0d6b32013-05-09 19:54:37 +02001071'PUT /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001072--
Edwin Kempin5c0d6b32013-05-09 19:54:37 +02001073
1074Creates a new branch.
1075
1076In the request body additional data for the branch can be provided as
1077link:#branch-input[BranchInput].
1078
1079.Request
1080----
1081 PUT /projects/MyProject/branches/stable HTTP/1.0
1082 Content-Type: application/json;charset=UTF-8
1083
1084 {
1085 "revision": "76016386a0d8ecc7b6be212424978bb45959d668"
1086 }
1087----
1088
1089As response a link:#branch-info[BranchInfo] entity is returned that
1090describes the created branch.
1091
1092.Response
1093----
1094 HTTP/1.1 201 Created
1095 Content-Disposition: attachment
1096 Content-Type: application/json;charset=UTF-8
1097
1098 )]}'
1099 {
1100 "ref": "refs/heads/stable",
1101 "revision": "76016386a0d8ecc7b6be212424978bb45959d668",
1102 "can_delete": true
1103 }
1104----
1105
Edwin Kempin6ce96a12013-06-06 13:20:01 +02001106[[delete-branch]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001107=== Delete Branch
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001108--
Edwin Kempin6ce96a12013-06-06 13:20:01 +02001109'DELETE /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001110--
Edwin Kempin6ce96a12013-06-06 13:20:01 +02001111
1112Deletes a branch.
1113
1114.Request
1115----
1116 DELETE /projects/MyProject/branches/stable HTTP/1.0
1117----
1118
1119.Response
1120----
1121 HTTP/1.1 204 No Content
1122----
1123
Edwin Kempind31e5582013-11-30 12:07:08 +01001124[[get-content]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001125=== Get Content
Edwin Kempind31e5582013-11-30 12:07:08 +01001126--
1127'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]/files/link:rest-api-changes.html#file-id[\{file-id\}]/content'
1128--
1129
1130Gets the content of a file from the HEAD revision of a certain branch.
1131
1132.Request
1133----
1134 GET /projects/gerrit/branches/master/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/content HTTP/1.0
1135----
1136
1137The content is returned as base64 encoded string.
1138
1139.Response
1140----
1141 HTTP/1.1 200 OK
1142 Content-Disposition: attachment
1143 Content-Type: text/plain;charset=UTF-8
1144
1145 Ly8gQ29weXJpZ2h0IChDKSAyMDEwIFRoZSBBbmRyb2lkIE9wZW4gU291cmNlIFByb2plY...
1146----
1147
Edwin Kempin87504d92014-07-04 12:59:19 +02001148[[get-reflog]]
1149=== Get Reflog
1150--
1151'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]/reflog'
1152--
1153
1154Gets the reflog of a certain branch.
1155
1156The caller must be project owner.
1157
1158.Request
1159----
1160 GET /projects/gerrit/branches/master/reflog HTTP/1.0
1161----
1162
1163As response a list of link:#reflog-entry-info[ReflogEntryInfo] entities
1164is returned that describe the reflog entries. The reflog entries are
1165returned in reverse order.
1166
1167.Response
1168----
1169 HTTP/1.1 200 OK
1170 Content-Disposition: attachment
1171 Content-Type: application/json;charset=UTF-8
1172
1173 )]}'
1174 [
1175 {
1176 "old_id": "976ced8f4fc0909d7e1584d18455299545881d60",
1177 "new_id": "2eaa94bac536654eb592c941e33b91f925698d16",
1178 "who": {
1179 "name": "Jane Roe",
1180 "email": "jane.roe@example.com",
1181 "date": "2014-06-30 11:53:43.000000000",
1182 "tz": 120
1183 },
1184 "comment": "merged: fast forward"
1185 },
1186 {
1187 "old_id": "c271c6a7161b74f85560c5899c8c73ee89ca5e29",
1188 "new_id": "976ced8f4fc0909d7e1584d18455299545881d60",
1189 "who": {
1190 "name": "John Doe",
1191 "email": "john.doe@example.com",
1192 "date": "2013-10-02 10:45:26.000000000",
1193 "tz": 120
1194 },
1195 "comment": "merged: fast forward"
1196 },
1197 {
1198 "old_id": "0000000000000000000000000000000000000000",
1199 "new_id": "c271c6a7161b74f85560c5899c8c73ee89ca5e29",
1200 "who": {
1201 "name": "John Doe",
1202 "email": "john.doe@example.com",
1203 "date": "2013-09-30 19:08:44.000000000",
1204 "tz": 120
1205 },
1206 "comment": ""
1207 }
1208 ]
1209----
1210
1211The get reflog endpoint also accepts a limit integer in the `n`
1212parameter. This limits the results to show the last `n` reflog entries.
1213
1214Query the last 25 reflog entries.
1215----
1216 GET /projects/gerrit/branches/master/reflog?n=25 HTTP/1.0
1217----
1218
Edwin Kempin2a581fd2014-07-04 14:04:54 +02001219The reflog can also be filtered by timestamp by specifying the `from`
1220and `to` parameters. The timestamp for `from` and `to` must be given as
1221UTC in the following format: `yyyyMMdd_HHmm`.
1222
1223----
1224 GET /projects/gerrit/branches/master/reflog?from=20130101_0000&to=20140101_0000=25 HTTP/1.0
1225----
1226
Edwin Kempin4425c742013-03-18 13:23:00 +01001227[[child-project-endpoints]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001228== Child Project Endpoints
Edwin Kempin4425c742013-03-18 13:23:00 +01001229
1230[[list-child-projects]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001231=== List Child Projects
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001232--
Edwin Kempin4425c742013-03-18 13:23:00 +01001233'GET /projects/link:#project-name[\{project-name\}]/children/'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001234--
Edwin Kempin4425c742013-03-18 13:23:00 +01001235
1236List the direct child projects of a project.
1237
1238.Request
1239----
1240 GET /projects/Public-Plugins/children/ HTTP/1.0
1241----
1242
1243As result a list of link:#project-info[ProjectInfo] entries is
1244returned that describe the child projects.
1245
1246.Response
1247----
1248 HTTP/1.1 200 OK
1249 Content-Disposition: attachment
1250 Content-Type: application/json;charset=UTF-8
1251
1252 )]}'
1253 [
1254 {
Edwin Kempin4425c742013-03-18 13:23:00 +01001255 "id": "plugins%2Freplication",
1256 "name": "plugins/replication",
1257 "parent": "Public-Plugins",
1258 "description": "Copies to other servers using the Git protocol"
1259 },
1260 {
Edwin Kempin4425c742013-03-18 13:23:00 +01001261 "id": "plugins%2Freviewnotes",
1262 "name": "plugins/reviewnotes",
1263 "parent": "Public-Plugins",
1264 "description": "Annotates merged commits using notes on refs/notes/review."
1265 },
1266 {
Edwin Kempin4425c742013-03-18 13:23:00 +01001267 "id": "plugins%2Fsingleusergroup",
1268 "name": "plugins/singleusergroup",
1269 "parent": "Public-Plugins",
1270 "description": "GroupBackend enabling users to be directly added to access rules"
1271 }
1272 ]
1273----
1274
Edwin Kempinf95bd172013-03-19 11:10:57 +01001275To resolve the child projects of a project recursively the parameter
1276`recursive` can be set.
1277
1278Child projects that are not visible to the calling user are ignored and
1279are not resolved further.
1280
1281.Request
1282----
1283 GET /projects/Public-Projects/children/?recursive HTTP/1.0
1284----
1285
1286.Response
1287----
1288 HTTP/1.1 200 OK
1289 Content-Disposition: attachment
1290 Content-Type: application/json;charset=UTF-8
1291
1292 )]}'
1293 [
1294 {
Edwin Kempinf95bd172013-03-19 11:10:57 +01001295 "id": "gerrit",
1296 "name": "gerrit",
1297 "parent": "Public-Projects",
1298 "description": "Gerrit Code Review"
1299 },
1300 {
Edwin Kempinf95bd172013-03-19 11:10:57 +01001301 "id": "plugins%2Freplication",
1302 "name": "plugins/replication",
1303 "parent": "Public-Plugins",
1304 "description": "Copies to other servers using the Git protocol"
1305 },
1306 {
Edwin Kempinf95bd172013-03-19 11:10:57 +01001307 "id": "plugins%2Freviewnotes",
1308 "name": "plugins/reviewnotes",
1309 "parent": "Public-Plugins",
1310 "description": "Annotates merged commits using notes on refs/notes/review."
1311 },
1312 {
Edwin Kempinf95bd172013-03-19 11:10:57 +01001313 "id": "plugins%2Fsingleusergroup",
1314 "name": "plugins/singleusergroup",
1315 "parent": "Public-Plugins",
1316 "description": "GroupBackend enabling users to be directly added to access rules"
1317 },
1318 {
Edwin Kempinf95bd172013-03-19 11:10:57 +01001319 "id": "Public-Plugins",
1320 "name": "Public-Plugins",
1321 "parent": "Public-Projects",
1322 "description": "Parent project for plugins/*"
1323 }
1324 ]
1325----
1326
Edwin Kempin5b6c4062013-03-19 09:26:03 +01001327[[get-child-project]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001328=== Get Child Project
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001329--
Edwin Kempin5b6c4062013-03-19 09:26:03 +01001330'GET /projects/link:#project-name[\{project-name\}]/children/link:#project-name[\{project-name\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001331--
Edwin Kempin5b6c4062013-03-19 09:26:03 +01001332
Edwin Kempin8a3fb5b2013-03-21 15:02:22 +01001333Retrieves a child project. If a non-direct child project should be
1334retrieved the parameter `recursive` must be set.
Edwin Kempin5b6c4062013-03-19 09:26:03 +01001335
1336.Request
1337----
1338 GET /projects/Public-Plugins/children/plugins%2Freplication HTTP/1.0
1339----
1340
1341As response a link:#project-info[ProjectInfo] entity is returned that
1342describes the child project.
1343
1344.Response
1345----
1346 HTTP/1.1 200 OK
1347 Content-Disposition: attachment
1348 Content-Type: application/json;charset=UTF-8
1349
1350 )]}'
1351 {
Edwin Kempin5b6c4062013-03-19 09:26:03 +01001352 "id": "plugins%2Freplication",
1353 "name": "plugins/replication",
1354 "parent": "Public-Plugins",
1355 "description": "Copies to other servers using the Git protocol"
1356 }
1357----
1358
David Pursehouse8cc68902014-10-06 18:17:16 +09001359[[tag-endpoints]]
1360== Tag Endpoints
1361
1362[[list-tags]]
1363=== List Tags
1364--
1365'GET /projects/link:#project-name[\{project-name\}]/tags/'
1366--
1367
1368List the tags of a project.
1369
1370As result a list of link:#tag-info[TagInfo] entries is returned.
1371
1372Only includes tags under the `refs/tags/` namespace.
1373
1374.Request
1375----
1376 GET /projects/work%2Fmy-project/tags/ HTTP/1.0
1377----
1378
1379.Response
1380----
1381 HTTP/1.1 200 OK
1382 Content-Disposition: attachment
1383 Content-Type: application/json;charset=UTF-8
1384
1385 )]}'
1386 [
1387 {
1388 "ref": "refs/tags/v1.0",
1389 "revision": "49ce77fdcfd3398dc0dedbe016d1a425fd52d666",
1390 "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30",
1391 "message": "Annotated tag",
1392 "tagger": {
1393 "name": "David Pursehouse",
1394 "email": "david.pursehouse@sonymobile.com",
1395 "date": "2014-10-06 07:35:03.000000000",
1396 "tz": 540
1397 }
1398 },
1399 {
1400 "ref": "refs/tags/v2.0",
1401 "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30"
1402 },
1403 {
1404 "ref": "refs/tags/v3.0",
1405 "revision": "c628685b3c5a3614571ecb5c8fceb85db9112313",
1406 "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30",
1407 "message": "Signed tag\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.11 (GNU/Linux)\n\niQEcBAABAgAGBQJUMlqYAAoJEPI2qVPgglptp7MH/j+KFcittFbxfSnZjUl8n5IZ\nveZo7wE+syjD9sUbMH4EGv0WYeVjphNTyViBof+stGTNkB0VQzLWI8+uWmOeiJ4a\nzj0LsbDOxodOEMI5tifo02L7r4Lzj++EbqtKv8IUq2kzYoQ2xjhKfFiGjeYOn008\n9PGnhNblEHZgCHguGR6GsfN8bfA2XNl9B5Ysl5ybX1kAVs/TuLZR4oDMZ/pW2S75\nhuyNnSgcgq7vl2gLGefuPs9lxkg5Fj3GZr7XPZk4pt/x1oiH7yXxV4UzrUwg2CC1\nfHrBlNbQ4uJNY8TFcwof52Z0cagM5Qb/ZSLglHbqEDGA68HPqbwf5z2hQyU2/U4\u003d\n\u003dZtUX\n-----END PGP SIGNATURE-----",
1408 "tagger": {
1409 "name": "David Pursehouse",
1410 "email": "david.pursehouse@sonymobile.com",
1411 "date": "2014-10-06 09:02:16.000000000",
1412 "tz": 540
1413 }
1414 }
1415 ]
1416----
1417
1418[[get-tag]]
1419=== Get Tag
1420--
1421'GET /projects/link:#project-name[\{project-name\}]/tags/link:#tag-id[\{tag-id\}]'
1422--
1423
1424Retrieves a tag of a project.
1425
1426.Request
1427----
1428 GET /projects/work%2Fmy-project/tags/v1.0 HTTP/1.0
1429----
1430
1431As response a link:#tag-info[TagInfo] entity is returned that describes the tag.
1432
1433.Response
1434----
1435 HTTP/1.1 200 OK
1436 Content-Disposition: attachment
1437 Content-Type: application/json;charset=UTF-8
1438
1439 )]}'
1440 {
1441 "ref": "refs/tags/v1.0",
1442 "revision": "49ce77fdcfd3398dc0dedbe016d1a425fd52d666",
1443 "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30",
1444 "message": "Annotated tag",
1445 "tagger": {
1446 "name": "David Pursehouse",
1447 "email": "david.pursehouse@sonymobile.com",
1448 "date": "2014-10-06 07:35:03.000000000",
1449 "tz": 540
1450 }
1451 }
1452----
1453
1454
Edwin Kempin1b993602014-07-08 16:18:45 +02001455[[commit-endpoints]]
1456== Commit Endpoints
1457
1458[[get-commit]]
1459=== Get Commit
1460--
1461'GET /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]'
1462--
1463
1464Retrieves a commit of a project.
1465
1466The commit must be visible to the caller.
1467
1468.Request
1469----
1470 GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96 HTTP/1.0
1471----
1472
1473As response a link:rest-api-changes.html#commit-info[CommitInfo] entity
1474is returned that describes the commit.
1475
1476.Response
1477----
1478 HTTP/1.1 200 OK
1479 Content-Disposition: attachment
1480 Content-Type: application/json;charset=UTF-8
1481
1482 )]}'
1483 {
1484 "commit": "184ebe53805e102605d11f6b143486d15c23a09c",
1485 "parents": [
1486 {
1487 "commit": "1eee2c9d8f352483781e772f35dc586a69ff5646",
1488 "subject": "Migrate contributor agreements to All-Projects."
1489 }
1490 ],
1491 "author": {
1492 "name": "Shawn O. Pearce",
1493 "email": "sop@google.com",
1494 "date": "2012-04-24 18:08:08.000000000",
1495 "tz": -420
1496 },
1497 "committer": {
1498 "name": "Shawn O. Pearce",
1499 "email": "sop@google.com",
1500 "date": "2012-04-24 18:08:08.000000000",
1501 "tz": -420
1502 },
1503 "subject": "Use an EventBus to manage star icons",
1504 "message": "Use an EventBus to manage star icons\n\nImage widgets that need to ..."
1505 }
1506----
1507
Edwin Kempin6f7410a2014-07-09 15:46:22 +02001508[[get-content]]
1509=== Get Content
1510--
1511'GET /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]/files/link:rest-api-changes.html#file-id[\{file-id\}]/content'
1512--
1513
1514Gets the content of a file from a certain commit.
1515
1516.Request
1517----
1518 GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/content HTTP/1.0
1519----
1520
1521The content is returned as base64 encoded string.
1522
1523.Response
1524----
1525 HTTP/1.1 200 OK
1526 Content-Disposition: attachment
1527 Content-Type: text/plain;charset=UTF-8
1528
1529 Ly8gQ29weXJpZ2h0IChDKSAyMDEwIFRoZSBBbmRyb2lkIE9wZW4gU291cmNlIFByb2plY...
1530----
1531
Edwin Kempinc3fe3cb2013-02-13 15:09:23 +01001532[[dashboard-endpoints]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001533== Dashboard Endpoints
Edwin Kempinc3fe3cb2013-02-13 15:09:23 +01001534
Edwin Kempin76202742013-02-15 13:51:50 +01001535[[list-dashboards]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001536=== List Dashboards
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001537--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001538'GET /projects/link:#project-name[\{project-name\}]/dashboards/'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001539--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001540
Edwin Kempind0a63922013-01-23 16:32:59 +01001541List custom dashboards for a project.
1542
Edwin Kempin55367622013-02-05 09:09:23 +01001543As result a list of link:#dashboard-info[DashboardInfo] entries is
1544returned.
1545
Edwin Kempind0a63922013-01-23 16:32:59 +01001546List all dashboards for the `work/my-project` project:
Edwin Kempin37440832013-02-06 11:36:00 +01001547
1548.Request
Edwin Kempind0a63922013-01-23 16:32:59 +01001549----
1550 GET /projects/work%2Fmy-project/dashboards/ HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +01001551----
Edwin Kempind0a63922013-01-23 16:32:59 +01001552
Edwin Kempin37440832013-02-06 11:36:00 +01001553.Response
1554----
Edwin Kempind0a63922013-01-23 16:32:59 +01001555 HTTP/1.1 200 OK
1556 Content-Disposition: attachment
1557 Content-Type: application/json;charset=UTF-8
1558
1559 )]}'
1560 [
1561 {
Edwin Kempind0a63922013-01-23 16:32:59 +01001562 "id": "main:closed",
1563 "ref": "main",
1564 "path": "closed",
1565 "description": "Merged and abandoned changes in last 7 weeks",
1566 "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
1567 "default": true,
1568 "title": "Closed changes",
1569 "sections": [
1570 {
1571 "name": "Merged",
1572 "query": "status:merged age:7w"
1573 },
1574 {
1575 "name": "Abandoned",
1576 "query": "status:abandoned age:7w"
1577 }
1578 ]
1579 }
1580 ]
1581----
1582
Edwin Kempina64c4b92013-01-23 11:30:40 +01001583.Get all dashboards of the 'All-Projects' project
1584****
1585get::/projects/All-Projects/dashboards/
1586****
1587
Edwin Kempin67e923c2013-02-14 13:57:12 +01001588[[get-dashboard]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001589=== Get Dashboard
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001590--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001591'GET /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001592--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001593
Edwin Kempin67e923c2013-02-14 13:57:12 +01001594Retrieves a project dashboard. The dashboard can be defined on that
1595project or be inherited from a parent project.
1596
1597.Request
1598----
1599 GET /projects/work%2Fmy-project/dashboards/main:closed HTTP/1.0
1600----
1601
1602As response a link:#dashboard-info[DashboardInfo] entity is returned
1603that describes the dashboard.
1604
1605.Response
1606----
1607 HTTP/1.1 200 OK
1608 Content-Disposition: attachment
1609 Content-Type: application/json;charset=UTF-8
1610
1611 )]}'
1612 {
Edwin Kempin67e923c2013-02-14 13:57:12 +01001613 "id": "main:closed",
1614 "ref": "main",
1615 "path": "closed",
1616 "description": "Merged and abandoned changes in last 7 weeks",
1617 "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
1618 "default": true,
1619 "title": "Closed changes",
1620 "sections": [
1621 {
1622 "name": "Merged",
1623 "query": "status:merged age:7w"
1624 },
1625 {
1626 "name": "Abandoned",
1627 "query": "status:abandoned age:7w"
1628 }
1629 ]
1630 }
1631----
1632
1633To retrieve the default dashboard of a project use `default` as
1634dashboard-id.
Edwin Kempin37440832013-02-06 11:36:00 +01001635
1636.Request
Edwin Kempind0a63922013-01-23 16:32:59 +01001637----
1638 GET /projects/work%2Fmy-project/dashboards/default HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +01001639----
Edwin Kempind0a63922013-01-23 16:32:59 +01001640
Edwin Kempin37440832013-02-06 11:36:00 +01001641.Response
1642----
Edwin Kempind0a63922013-01-23 16:32:59 +01001643 HTTP/1.1 200 OK
1644 Content-Disposition: attachment
1645 Content-Type: application/json;charset=UTF-8
1646
1647 )]}'
1648 {
Edwin Kempind0a63922013-01-23 16:32:59 +01001649 "id": "main:closed",
1650 "ref": "main",
1651 "path": "closed",
Edwin Kempin67e923c2013-02-14 13:57:12 +01001652 "description": "Merged and abandoned changes in last 7 weeks",
1653 "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
Edwin Kempind0a63922013-01-23 16:32:59 +01001654 "default": true,
Edwin Kempin67e923c2013-02-14 13:57:12 +01001655 "title": "Closed changes",
1656 "sections": [
1657 {
1658 "name": "Merged",
1659 "query": "status:merged age:7w"
1660 },
1661 {
1662 "name": "Abandoned",
1663 "query": "status:abandoned age:7w"
1664 }
1665 ]
Edwin Kempind0a63922013-01-23 16:32:59 +01001666 }
1667----
1668
Edwin Kempin67e923c2013-02-14 13:57:12 +01001669[[set-dashboard]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001670=== Set Dashboard
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001671--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001672'PUT /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001673--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001674
Edwin Kempin67e923c2013-02-14 13:57:12 +01001675Updates/Creates a project dashboard.
1676
1677Currently only supported for the `default` dashboard.
1678
1679The creation/update information for the dashboard must be provided in
1680the request body as a link:#dashboard-input[DashboardInput] entity.
1681
1682.Request
1683----
1684 PUT /projects/work%2Fmy-project/dashboards/default HTTP/1.0
1685 Content-Type: application/json;charset=UTF-8
1686
1687 {
1688 "id": "main:closed",
1689 "commit_message": "Define the default dashboard"
1690 }
1691----
1692
1693As response the new/updated dashboard is returned as a
1694link:#dashboard-info[DashboardInfo] entity.
1695
1696.Response
1697----
1698 HTTP/1.1 200 OK
1699 Content-Disposition: attachment
1700 Content-Type: application/json;charset=UTF-8
1701
1702 )]}'
1703 {
Edwin Kempin67e923c2013-02-14 13:57:12 +01001704 "id": "main:closed",
1705 "ref": "main",
1706 "path": "closed",
1707 "description": "Merged and abandoned changes in last 7 weeks",
1708 "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w",
1709 "default": true,
1710 "title": "Closed changes",
1711 "sections": [
1712 {
1713 "name": "Merged",
1714 "query": "status:merged age:7w"
1715 },
1716 {
1717 "name": "Abandoned",
1718 "query": "status:abandoned age:7w"
1719 }
1720 ]
1721 }
1722----
1723
1724[[delete-dashboard]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001725=== Delete Dashboard
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001726--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001727'DELETE /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001728--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001729
Edwin Kempin67e923c2013-02-14 13:57:12 +01001730Deletes a project dashboard.
1731
1732Currently only supported for the `default` dashboard.
1733
Edwin Kempinefec4492013-02-22 10:09:23 +01001734The request body does not need to include a link:#dashboard-input[
John Spurlockd25fad12013-03-09 11:48:49 -05001735DashboardInput] entity if no commit message is specified.
Edwin Kempin67e923c2013-02-14 13:57:12 +01001736
1737Please note that some proxies prohibit request bodies for DELETE
1738requests.
1739
1740.Request
1741----
1742 DELETE /projects/work%2Fmy-project/dashboards/default HTTP/1.0
1743----
1744
1745.Response
1746----
1747 HTTP/1.1 204 No Content
1748----
1749
Edwin Kempin34d83352013-02-06 10:40:17 +01001750
1751[[ids]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001752== IDs
Edwin Kempin34d83352013-02-06 10:40:17 +01001753
Edwin Kempin196e1732013-05-09 15:12:34 +02001754[[branch-id]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001755=== \{branch-id\}
Edwin Kempin196e1732013-05-09 15:12:34 +02001756The name of a branch or `HEAD`. The prefix `refs/heads/` can be
1757omitted.
1758
Edwin Kempin1b993602014-07-08 16:18:45 +02001759[[commit-id]]
1760=== \{commit-id\}
1761Commit ID.
1762
David Pursehouse8cc68902014-10-06 18:17:16 +09001763[[tag-id]]
1764=== \{tag-id\}
1765The name of a tag. The prefix `refs/tags/` can be omitted.
1766
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001767[[dashboard-id]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001768=== \{dashboard-id\}
Edwin Kempin67e923c2013-02-14 13:57:12 +01001769The ID of a dashboard in the format '<ref>:<path>'.
1770
1771A special dashboard ID is `default` which represents the default
1772dashboard of a project.
1773
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001774[[project-name]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001775=== \{project-name\}
Edwin Kempin34d83352013-02-06 10:40:17 +01001776The name of the project.
1777
1778
Edwin Kempin51a6dc92013-02-04 15:43:59 +01001779[[json-entities]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001780== JSON Entities
Edwin Kempin51a6dc92013-02-04 15:43:59 +01001781
Edwin Kempina686de92013-05-09 15:12:34 +02001782[[branch-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001783=== BranchInfo
Edwin Kempina686de92013-05-09 15:12:34 +02001784The `BranchInfo` entity contains information about a branch.
1785
David Pursehouseae367192014-11-25 17:24:47 +09001786[options="header",cols="1,^2,4"]
Edwin Kempina686de92013-05-09 15:12:34 +02001787|=========================
1788|Field Name ||Description
1789|`ref` ||The ref of the branch.
1790|`revision` ||The revision to which the branch points.
1791|`can_delete`|`false` if not set|
1792Whether the calling user can delete this branch.
Edwin Kempin0f697bd2014-09-10 18:23:29 +02001793|'web_links' |optional|
1794Links to the branch in external sites as a list of
1795link:rest-api-changes.html#web-link-info[WebLinkInfo] entries.
Edwin Kempina686de92013-05-09 15:12:34 +02001796|=========================
1797
Edwin Kempin62946742014-07-09 11:17:58 +02001798[[ban-input]]
1799=== BanInput
1800The `BanInput` entity contains information for banning commits in a
1801project.
1802
David Pursehouseae367192014-11-25 17:24:47 +09001803[options="header",cols="1,^2,4"]
Edwin Kempin62946742014-07-09 11:17:58 +02001804|=======================
1805|Field Name||Description
1806|`commits` ||List of commits to be banned.
1807|`reason` |optional|Reason for banning the commits.
1808|=======================
1809
1810[[ban-result-info]]
1811=== BanResultInfo
1812The `BanResultInfo` entity describes the result of banning commits.
1813
David Pursehouseae367192014-11-25 17:24:47 +09001814[options="header",cols="1,^2,4"]
Edwin Kempin62946742014-07-09 11:17:58 +02001815|=============================
1816|Field Name ||Description
1817|`newly_banned` |optional|List of newly banned commits.
1818|`already_banned`|optional|List of commits that were already banned.
1819|`ignored` |optional|List of object IDs that were ignored.
1820|=============================
1821
Edwin Kempin5c0d6b32013-05-09 19:54:37 +02001822[[branch-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001823=== BranchInput
Edwin Kempin5c0d6b32013-05-09 19:54:37 +02001824The `BranchInput` entity contains information for the creation of
1825a new branch.
1826
David Pursehouseae367192014-11-25 17:24:47 +09001827[options="header",cols="1,^2,4"]
Edwin Kempin5c0d6b32013-05-09 19:54:37 +02001828|=======================
1829|Field Name||Description
1830|`ref` |optional|
1831The name of the branch. The prefix `refs/heads/` can be
1832omitted. +
1833If set, must match the branch ID in the URL.
1834|`revision`|optional|
1835The base revision of the new branch. +
1836If not set, `HEAD` will be used as base revision.
1837|=======================
1838
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001839[[config-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001840=== ConfigInfo
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001841The `ConfigInfo` entity contains information about the effective project
1842configuration.
1843
David Pursehouseae367192014-11-25 17:24:47 +09001844[options="header",cols="1,^2,4"]
Deniz Türkoglu52777272014-09-08 17:02:48 +02001845|=======================================================
1846|Field Name ||Description
1847|`description` |optional|
Edwin Kempina23eb102013-07-17 09:10:54 +02001848The description of the project.
Deniz Türkoglu52777272014-09-08 17:02:48 +02001849|`use_contributor_agreements` |optional|
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001850link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether
1851authors must complete a contributor agreement on the site before
1852pushing any commits or changes to this project.
Deniz Türkoglu52777272014-09-08 17:02:48 +02001853|`use_content_merge` |optional|
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001854link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether
1855Gerrit will try to perform a 3-way merge of text file content when a
1856file has been modified by both the destination branch and the change
1857being submitted. This option only takes effect if submit type is not
1858FAST_FORWARD_ONLY.
Deniz Türkoglu52777272014-09-08 17:02:48 +02001859|`use_signed_off_by` |optional|
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001860link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether
1861each change must contain a Signed-off-by line from either the author or
1862the uploader in the commit message.
Deniz Türkoglu52777272014-09-08 17:02:48 +02001863|`create_new_change_for_all_not_in_target` |optional|
1864link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether
1865a new change is created for every commit not in target branch.
1866|`require_change_id` |optional|
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001867link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether a
1868valid link:user-changeid.html[Change-Id] footer in any commit uploaded
1869for review is required. This does not apply to commits pushed directly
1870to a branch or tag.
Edwin Kempin3c99f592013-07-15 10:12:27 +02001871|`max_object_size_limit` ||
1872The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size
1873limit] of this project as a link:#max-object-size-limit-info[
1874MaxObjectSizeLimitInfo] entity.
1875|`submit_type` ||
1876The default submit type of the project, can be `MERGE_IF_NECESSARY`,
1877`FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `MERGE_ALWAYS` or
1878`CHERRY_PICK`.
1879|`state` |optional|
1880The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. +
1881Not set if the project state is `ACTIVE`.
Edwin Kempin3660c132013-07-16 08:03:11 +02001882|`commentlinks` ||
Edwin Kempin8aa53af2013-07-15 10:43:15 +02001883Map with the comment link configurations of the project. The name of
1884the comment link configuration is mapped to the comment link
1885configuration, which has the same format as the
1886link:config-gerrit.html#_a_id_commentlink_a_section_commentlink[
1887commentlink section] of `gerrit.config`.
Deniz Türkoglu52777272014-09-08 17:02:48 +02001888|`theme` |optional|
Edwin Kempin272402e2013-07-15 11:17:36 +02001889The theme that is configured for the project as a link:#theme-info[
1890ThemeInfo] entity.
Deniz Türkoglu52777272014-09-08 17:02:48 +02001891|`plugin_config` |optional|
Edwin Kempin9ce4f552013-11-15 16:00:00 +01001892Plugin configuration as map which maps the plugin name to a map of
1893parameter names to link:#config-parameter-info[ConfigParameterInfo]
1894entities.
Deniz Türkoglu52777272014-09-08 17:02:48 +02001895|`actions` |optional|
David Ostrovsky9e8b2fb2013-08-30 08:09:53 +02001896Actions the caller might be able to perform on this project. The
1897information is a map of view names to
1898link:rest-api-changes.html#action-info[ActionInfo] entities.
David Pursehouse510b87d2014-11-25 16:46:28 +09001899|=======================================================
Edwin Kempin0cb5a562013-07-12 15:41:04 +02001900
Edwin Kempina23eb102013-07-17 09:10:54 +02001901[[config-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001902=== ConfigInput
Edwin Kempina23eb102013-07-17 09:10:54 +02001903The `ConfigInput` entity describes a new project configuration.
1904
David Pursehouseae367192014-11-25 17:24:47 +09001905[options="header",cols="1,^2,4"]
Deniz Türkoglu52777272014-09-08 17:02:48 +02001906|======================================================
1907|Field Name ||Description
1908|`description` |optional|
Edwin Kempina23eb102013-07-17 09:10:54 +02001909The new description of the project. +
1910If not set, the description is removed.
Deniz Türkoglu52777272014-09-08 17:02:48 +02001911|`use_contributor_agreements` |optional|
Edwin Kempina23eb102013-07-17 09:10:54 +02001912Whether authors must complete a contributor agreement on the site
1913before pushing any commits or changes to this project. +
1914Can be `TRUE`, `FALSE` or `INHERIT`. +
1915If not set, this setting is not updated.
Deniz Türkoglu52777272014-09-08 17:02:48 +02001916|`use_content_merge` |optional|
Edwin Kempina23eb102013-07-17 09:10:54 +02001917Whether Gerrit will try to perform a 3-way merge of text file content
1918when a file has been modified by both the destination branch and the
1919change being submitted. This option only takes effect if submit type is
1920not FAST_FORWARD_ONLY. +
1921Can be `TRUE`, `FALSE` or `INHERIT`. +
1922If not set, this setting is not updated.
Deniz Türkoglu52777272014-09-08 17:02:48 +02001923|`use_signed_off_by` |optional|
Edwin Kempina23eb102013-07-17 09:10:54 +02001924Whether each change must contain a Signed-off-by line from either the
1925author or the uploader in the commit message. +
1926Can be `TRUE`, `FALSE` or `INHERIT`. +
1927If not set, this setting is not updated.
Deniz Türkoglu52777272014-09-08 17:02:48 +02001928|`create_new_change_for_all_not_in_target` |optional|
1929Whether a new change will be created for every commit not in target
1930branch. +
1931Can be `TRUE`, `FALSE` or `INHERIT`. +
1932If not set, this setting is not updated.
1933|`require_change_id` |optional|
Edwin Kempina23eb102013-07-17 09:10:54 +02001934Whether a valid link:user-changeid.html[Change-Id] footer in any commit
1935uploaded for review is required. This does not apply to commits pushed
1936directly to a branch or tag. +
1937Can be `TRUE`, `FALSE` or `INHERIT`. +
1938If not set, this setting is not updated.
Deniz Türkoglu52777272014-09-08 17:02:48 +02001939|`max_object_size_limit` |optional|
Edwin Kempina23eb102013-07-17 09:10:54 +02001940The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size
1941limit] of this project as a link:#max-object-size-limit-info[
1942MaxObjectSizeLimitInfo] entity. +
1943If set to `0`, the max object size limit is removed. +
1944If not set, this setting is not updated.
Deniz Türkoglu52777272014-09-08 17:02:48 +02001945|`submit_type` |optional|
Edwin Kempina23eb102013-07-17 09:10:54 +02001946The default submit type of the project, can be `MERGE_IF_NECESSARY`,
1947`FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `MERGE_ALWAYS` or
1948`CHERRY_PICK`. +
1949If not set, the submit type is not updated.
Deniz Türkoglu52777272014-09-08 17:02:48 +02001950|`state` |optional|
Edwin Kempina23eb102013-07-17 09:10:54 +02001951The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. +
1952Not set if the project state is `ACTIVE`. +
1953If not set, the project state is not updated.
Deniz Türkoglu52777272014-09-08 17:02:48 +02001954|`plugin_config_values` |optional|
Edwin Kempin9ce4f552013-11-15 16:00:00 +01001955Plugin configuration values as map which maps the plugin name to a map
1956of parameter names to values.
David Pursehouse510b87d2014-11-25 16:46:28 +09001957|======================================================
Edwin Kempina23eb102013-07-17 09:10:54 +02001958
Edwin Kempin9ce4f552013-11-15 16:00:00 +01001959[[config-parameter-info]]
1960ConfigParameterInfo
1961~~~~~~~~~~~~~~~~~~~
1962The `ConfigParameterInfo` entity describes a project configuration
1963parameter.
1964
David Pursehouseae367192014-11-25 17:24:47 +09001965[options="header",cols="1,^2,4"]
Edwin Kempin9ce4f552013-11-15 16:00:00 +01001966|===============================
1967|Field Name ||Description
1968|`display_name` |optional|
1969The display name of the configuration parameter.
Edwin Kempind92196d2014-01-27 21:55:46 +01001970|`description` |optional|
1971The description of the configuration parameter.
Edwin Kempinaec61322014-01-28 12:59:22 +01001972|`warning` |optional|
1973Warning message for the configuration parameter.
Edwin Kempin9ce4f552013-11-15 16:00:00 +01001974|`type` ||
David Ostrovskyc6dd2172014-02-01 19:13:27 +01001975The type of the configuration parameter. Can be `STRING`, `INT`,
1976`LONG`, `BOOLEAN`, `LIST` or `ARRAY`.
Edwin Kempin9ce4f552013-11-15 16:00:00 +01001977|`value` |optional|
Edwin Kempind32beef2013-11-28 20:36:33 +01001978The value of the configuration parameter as string. If the parameter
1979is inheritable this is the effective value which is deduced from
1980`configured_value` and `inherited_value`.
David Ostrovskyc6dd2172014-02-01 19:13:27 +01001981|`values` |optional|
1982The list of values. Only set if the `type` is `ARRAY`.
Edwin Kempin0d485232013-11-17 18:55:48 +01001983`editable` |`false` if not set|
1984Whether the value is editable.
Edwin Kempin20f256fb2013-11-28 19:56:15 +01001985|`permitted_values`|optional|
David Ostrovskyc6dd2172014-02-01 19:13:27 +01001986The list of permitted values. Only set if the `type` is `LIST`.
Edwin Kempind32beef2013-11-28 20:36:33 +01001987|`inheritable` |`false` if not set|
1988Whether the configuration parameter can be inherited.
1989|`configured_value`|optional|
1990The value of the configuration parameter that is configured on this
1991project, only set if `inheritable` is true.
1992|`inherited_value` |optional|
1993The inherited value of the configuration parameter, only set if
1994`inheritable` is true.
1995|`permitted_values` |optional|
1996The list of permitted values, only set if the `type` is `LIST`.
Edwin Kempin9ce4f552013-11-15 16:00:00 +01001997|===============================
1998
Edwin Kempin55367622013-02-05 09:09:23 +01001999[[dashboard-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002000=== DashboardInfo
Edwin Kempin55367622013-02-05 09:09:23 +01002001The `DashboardInfo` entity contains information about a project
2002dashboard.
2003
David Pursehouseae367192014-11-25 17:24:47 +09002004[options="header",cols="1,^2,4"]
Edwin Kempin55367622013-02-05 09:09:23 +01002005|===============================
2006|Field Name ||Description
Edwin Kempin55367622013-02-05 09:09:23 +01002007|`id` ||
2008The ID of the dashboard. The ID has the format '<ref>:<path>',
2009where ref and path are URL encoded.
2010|`project` ||
2011The name of the project for which this dashboard is returned.
2012|`defining_project`||
2013The name of the project in which this dashboard is defined.
2014This is different from `project` if the dashboard is inherited from a
2015parent project.
2016|`ref` ||
2017The name of the ref in which the dashboard is defined, without the
2018`refs/meta/dashboards/` prefix, which is common for all dashboard refs.
2019|`path` ||
2020The path of the file in which the dashboard is defined.
2021|`description` |optional|The description of the dashboard.
2022|`foreach` |optional|
2023Subquery that applies to all sections in the dashboard. +
2024Tokens such as `${project}` are not resolved.
2025|`url` ||
David Pursehousea1d633b2014-05-02 17:21:02 +09002026The URL under which the dashboard can be opened in the Gerrit Web UI. +
Edwin Kempin55367622013-02-05 09:09:23 +01002027The URL is relative to the canonical web URL. +
2028Tokens in the queries such as `${project}` are resolved.
2029|`default` |not set if `false`|
2030Whether this is the default dashboard of the project.
2031|`title` |optional|The title of the dashboard.
2032|`sections` ||
2033The list of link:#dashboard-section-info[sections] in the dashboard.
2034|===============================
2035
Edwin Kempin67e923c2013-02-14 13:57:12 +01002036[[dashboard-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002037=== DashboardInput
Edwin Kempin67e923c2013-02-14 13:57:12 +01002038The `DashboardInput` entity contains information to create/update a
2039project dashboard.
2040
David Pursehouseae367192014-11-25 17:24:47 +09002041[options="header",cols="1,^2,4"]
Edwin Kempin67e923c2013-02-14 13:57:12 +01002042|=============================
2043|Field Name ||Description
2044|`id` |optional|
Edwin Kempinc95c5082013-03-12 16:56:25 +01002045URL encoded ID of a dashboard to which this dashboard should link to.
Edwin Kempin67e923c2013-02-14 13:57:12 +01002046|`commit_message`|optional|
2047Message that should be used to commit the change of the dashboard.
2048|=============================
2049
Edwin Kempin55367622013-02-05 09:09:23 +01002050[[dashboard-section-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002051=== DashboardSectionInfo
Edwin Kempin55367622013-02-05 09:09:23 +01002052The `DashboardSectionInfo` entity contains information about a section
2053in a dashboard.
2054
David Pursehouseae367192014-11-25 17:24:47 +09002055[options="header",cols="1,6"]
Edwin Kempin55367622013-02-05 09:09:23 +01002056|===========================
2057|Field Name |Description
2058|`name` |The title of the section.
2059|`query` |The query of the section. +
2060Tokens such as `${project}` are not resolved.
2061|===========================
2062
Edwin Kempin4bdc72d2013-11-13 13:30:49 +01002063[[gc-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002064=== GCInput
Edwin Kempin4bdc72d2013-11-13 13:30:49 +01002065The `GCInput` entity contains information to run the Git garbage
2066collection.
2067
David Pursehouseae367192014-11-25 17:24:47 +09002068[options="header",cols="1,^2,4"]
Edwin Kempin4bdc72d2013-11-13 13:30:49 +01002069|=============================
2070|Field Name ||Description
2071|`show_progress` |`false` if not set|
2072Whether progress information should be shown.
2073|=============================
2074
Edwin Kempin6b813372013-03-13 17:07:33 +01002075[[head-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002076=== HeadInput
Edwin Kempin6b813372013-03-13 17:07:33 +01002077The `HeadInput` entity contains information for setting `HEAD` for a
2078project.
2079
David Pursehouseae367192014-11-25 17:24:47 +09002080[options="header",cols="1,6"]
Edwin Kempin6b813372013-03-13 17:07:33 +01002081|============================
2082|Field Name |Description
2083|`ref` |
2084The ref to which `HEAD` should be set, the `refs/heads` prefix can be
2085omitted.
2086|============================
2087
Edwin Kempin0cb5a562013-07-12 15:41:04 +02002088[[inherited-boolean-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002089=== InheritedBooleanInfo
Edwin Kempin0cb5a562013-07-12 15:41:04 +02002090A boolean value that can also be inherited.
2091
David Pursehouseae367192014-11-25 17:24:47 +09002092[options="header",cols="1,^2,4"]
Edwin Kempin0cb5a562013-07-12 15:41:04 +02002093|================================
2094|Field Name ||Description
2095|`value` ||
2096The effective boolean value.
2097|`configured_value` ||
2098The configured value, can be `TRUE`, `FALSE` or `INHERITED`.
2099|`inherited_value` |optional|
2100The boolean value inherited from the parent. +
2101Not set if there is no parent.
2102|================================
2103
Edwin Kempin3c99f592013-07-15 10:12:27 +02002104[[max-object-size-limit-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002105=== MaxObjectSizeLimitInfo
Edwin Kempin3c99f592013-07-15 10:12:27 +02002106The `MaxObjectSizeLimitInfo` entity contains information about the
2107link:config-gerrit.html#receive.maxObjectSizeLimit[max object size
2108limit] of a project.
2109
David Pursehouseae367192014-11-25 17:24:47 +09002110[options="header",cols="1,^2,4"]
Edwin Kempin3c99f592013-07-15 10:12:27 +02002111|===============================
2112|Field Name ||Description
2113|`value` |optional|
2114The effective value of the max object size limit as a formatted string. +
2115Not set if there is no limit for the object size.
2116|`configured_value`|optional|
2117The max object size limit that is configured on the project as a
2118formatted string. +
2119Not set if there is no limit for the object size configured on project
2120level.
2121|`inherited_value` |optional|
2122The max object size limit that is inherited as a formatted string. +
2123Not set if there is no global limit for the object size.
2124|===============================
2125
Edwin Kempin57f303c2013-02-13 15:52:22 +01002126[[project-description-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002127=== ProjectDescriptionInput
Edwin Kempin57f303c2013-02-13 15:52:22 +01002128The `ProjectDescriptionInput` entity contains information for setting a
2129project description.
2130
David Pursehouseae367192014-11-25 17:24:47 +09002131[options="header",cols="1,^2,4"]
Edwin Kempin57f303c2013-02-13 15:52:22 +01002132|=============================
2133|Field Name ||Description
2134|`description` |optional|The project description. +
2135The project description will be deleted if not set.
2136|`commit_message`|optional|
2137Message that should be used to commit the change of the project
2138description in the `project.config` file to the `refs/meta/config`
2139branch.
2140|=============================
2141
Edwin Kempin51a6dc92013-02-04 15:43:59 +01002142[[project-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002143=== ProjectInfo
Edwin Kempin51a6dc92013-02-04 15:43:59 +01002144The `ProjectInfo` entity contains information about a project.
2145
David Pursehouseae367192014-11-25 17:24:47 +09002146[options="header",cols="1,^2,4"]
Edwin Kempin51a6dc92013-02-04 15:43:59 +01002147|===========================
2148|Field Name ||Description
Edwin Kempin51a6dc92013-02-04 15:43:59 +01002149|`id` ||The URL encoded project name.
2150|`name` |
2151not set if returned in a map where the project name is used as map key|
2152The name of the project.
Edwin Kempinf3611822013-03-19 08:23:09 +01002153|`parent` |optional|
Edwin Kempin51a6dc92013-02-04 15:43:59 +01002154The name of the parent project. +
2155`?-<n>` if the parent project is not visible (`<n>` is a number which
2156is increased for each non-visible project).
2157|`description` |optional|The description of the project.
Shawn Pearce21a6c212014-04-23 12:35:10 -07002158|`state` |optional|`ACTIVE`, `READ_ONLY` or `HIDDEN`.
Edwin Kempin51a6dc92013-02-04 15:43:59 +01002159|`branches` |optional|Map of branch names to HEAD revisions.
Edwin Kempinea004752014-04-11 15:56:02 +02002160|'web_links' |optional|
2161Links to the project in external sites as a list of
2162link:rest-api-changes.html#web-link-info[WebLinkInfo] entries.
Edwin Kempin51a6dc92013-02-04 15:43:59 +01002163|===========================
2164
Bruce Zu798ea122013-02-18 16:55:43 +08002165[[project-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002166=== ProjectInput
Bruce Zu798ea122013-02-18 16:55:43 +08002167The `ProjectInput` entity contains information for the creation of
2168a new project.
2169
David Pursehouseae367192014-11-25 17:24:47 +09002170[options="header",cols="1,^2,4"]
Bruce Zu798ea122013-02-18 16:55:43 +08002171|=========================================
2172|Field Name ||Description
2173|`name` |optional|
2174The name of the project (not encoded). +
2175If set, must match the project name in the URL.
2176|`parent` |optional|
2177The name of the parent project. +
2178If not set, the `All-Projects` project will be the parent project.
2179|`description` |optional|The description of the project.
2180|`permissions_only` |`false` if not set|
2181Whether a permission-only project should be created.
2182|`create_empty_commit` |`false` if not set|
2183Whether an empty initial commit should be created.
2184|`submit_type` |optional|
2185The submit type that should be set for the project
2186(`MERGE_IF_NECESSARY`, `REBASE_IF_NECESSARY`, `FAST_FORWARD_ONLY`,
2187`MERGE_ALWAYS`, `CHERRY_PICK`). +
Edwin Kempina79ea552013-11-19 11:24:37 +01002188If not set, `MERGE_IF_NECESSARY` is set as submit type unless
2189link:config-gerrit.html#repository.name.defaultSubmitType[
2190repository.<name>.defaultSubmitType] is set to a different value.
Bruce Zu798ea122013-02-18 16:55:43 +08002191|`branches` |optional|
2192A list of branches that should be initially created. +
2193For the branch names the `refs/heads/` prefix can be omitted.
2194|`owners` |optional|
2195A list of groups that should be assigned as project owner. +
2196Each group in the list must be specified as
2197link:rest-api-groups.html#group-id[group-id]. +
2198If not set, the link:config-gerrit.html#repository.name.ownerGroup[
2199groups that are configured as default owners] are set as project
2200owners.
Deniz Türkoglu52777272014-09-08 17:02:48 +02002201|`use_contributor_agreements` |`INHERIT` if not set|
Bruce Zu798ea122013-02-18 16:55:43 +08002202Whether contributor agreements should be used for the project (`TRUE`,
2203`FALSE`, `INHERIT`).
Deniz Türkoglu52777272014-09-08 17:02:48 +02002204|`use_signed_off_by` |`INHERIT` if not set|
Bruce Zu798ea122013-02-18 16:55:43 +08002205Whether the usage of 'Signed-Off-By' footers is required for the
2206project (`TRUE`, `FALSE`, `INHERIT`).
Deniz Türkoglu52777272014-09-08 17:02:48 +02002207|`create_new_change_for_all_not_in_target` |`INHERIT` if not set|
2208Whether a new change is created for every commit not in target branch
2209for the project (`TRUE`, `FALSE`, `INHERIT`).
2210|`use_content_merge` |`INHERIT` if not set|
Bruce Zu798ea122013-02-18 16:55:43 +08002211Whether content merge should be enabled for the project (`TRUE`,
2212`FALSE`, `INHERIT`). +
2213`FALSE`, if the `submit_type` is `FAST_FORWARD_ONLY`.
Deniz Türkoglu52777272014-09-08 17:02:48 +02002214|`require_change_id` |`INHERIT` if not set|
Bruce Zu798ea122013-02-18 16:55:43 +08002215Whether the usage of Change-Ids is required for the project (`TRUE`,
2216`FALSE`, `INHERIT`).
Sasa Zivkov6b40cb42013-07-01 15:28:22 +02002217|`max_object_size_limit` |optional|
2218Max allowed Git object size for this project.
2219Common unit suffixes of 'k', 'm', or 'g' are supported.
Edwin Kempinfb053c32013-12-04 20:32:41 +01002220|`plugin_config_values` |optional|
2221Plugin configuration values as map which maps the plugin name to a map
2222of parameter names to values.
Bruce Zu798ea122013-02-18 16:55:43 +08002223|=========================================
2224
Edwin Kempinecad88c2013-02-14 12:09:44 +01002225[[project-parent-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002226=== ProjectParentInput
Edwin Kempinecad88c2013-02-14 12:09:44 +01002227The `ProjectParentInput` entity contains information for setting a
2228project parent.
2229
David Pursehouseae367192014-11-25 17:24:47 +09002230[options="header",cols="1,^2,4"]
Edwin Kempinecad88c2013-02-14 12:09:44 +01002231|=============================
2232|Field Name ||Description
2233|`parent` ||The name of the parent project.
2234|`commit_message`|optional|
2235Message that should be used to commit the change of the project parent
2236in the `project.config` file to the `refs/meta/config` branch.
2237|=============================
2238
Edwin Kempin87504d92014-07-04 12:59:19 +02002239[[reflog-entry-info]]
2240=== ReflogEntryInfo
2241The `ReflogEntryInfo` entity describes an entry in a reflog.
2242
David Pursehouseae367192014-11-25 17:24:47 +09002243[options="header",cols="1,6"]
Edwin Kempin87504d92014-07-04 12:59:19 +02002244|============================
2245|Field Name |Description
2246|`old_id` |The old commit ID.
2247|`new_id` |The new commit ID.
2248|`who` |
2249The user performing the change as a
2250link:rest-api-changes.html#git-person-info[GitPersonInfo] entity.
2251|`comment` |Comment of the reflog entry.
2252|============================
2253
Edwin Kempin19ea9b92013-03-20 13:20:26 +01002254[[repository-statistics-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002255=== RepositoryStatisticsInfo
Edwin Kempin19ea9b92013-03-20 13:20:26 +01002256The `RepositoryStatisticsInfo` entity contains information about
2257statistics of a Git repository.
2258
David Pursehouseae367192014-11-25 17:24:47 +09002259[options="header",cols="1,6"]
Edwin Kempin19ea9b92013-03-20 13:20:26 +01002260|======================================
2261|Field Name |Description
2262|`number_of_loose_objects` |Number of loose objects.
2263|`number_of_loose_refs` |Number of loose refs.
2264|`number_of_pack_files` |Number of pack files.
2265|`number_of_packed_objects`|Number of packed objects.
2266|`number_of_packed_refs` |Number of packed refs.
2267|`size_of_loose_objects` |Size of loose objects in bytes.
2268|`size_of_packed_objects` |Size of packed objects in bytes.
2269|======================================
2270
David Pursehouse8cc68902014-10-06 18:17:16 +09002271[[tag-info]]
2272=== TagInfo
2273The `TagInfo` entity contains information about a tag.
2274
David Pursehouseae367192014-11-25 17:24:47 +09002275[options="header",cols="1,^2,4"]
David Pursehouse8cc68902014-10-06 18:17:16 +09002276|=========================
2277|Field Name ||Description
2278|`ref` ||The ref of the tag.
2279|`revision` ||For lightweight tags, the revision of the commit to which the tag
2280points. For annotated tags, the revision of the tag object.
2281|`object`|Only set for annotated tags.|The revision of the object to which the
2282tag points.
2283|`message`|Only set for annotated tags.|The tag message. For signed tags, includes
2284the signature.
2285|`tagger`|Only set for annotated tags.|The tagger as a
2286link:rest-api-changes.html#git-person-info[GitPersonInfo] entity.
2287|=========================
2288
Edwin Kempin272402e2013-07-15 11:17:36 +02002289[[theme-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002290=== ThemeInfo
Edwin Kempin272402e2013-07-15 11:17:36 +02002291The `ThemeInfo` entity describes a theme.
2292
David Pursehouseae367192014-11-25 17:24:47 +09002293[options="header",cols="1,^2,4"]
Edwin Kempin272402e2013-07-15 11:17:36 +02002294|=============================
2295|Field Name ||Description
2296|`css` |optional|
2297The path to the `GerritSite.css` file.
2298|`header` |optional|
2299The path to the `GerritSiteHeader.html` file.
2300|`footer` |optional|
2301The path to the `GerritSiteFooter.html` file.
2302|=============================
2303
Edwin Kempind0a63922013-01-23 16:32:59 +01002304
2305GERRIT
2306------
2307Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -07002308
2309SEARCHBOX
2310---------