summaryrefslogtreecommitdiffstats
path: root/Documentation/rest-api-config.txt
blob: 3ec989ee1e5a7dcb3a74dfccf9e15fe70878f9a1 (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
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
= Gerrit Code Review - /config/ REST API

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

[[config-endpoints]]
Config Endpoints
---------------

[[get-version]]
=== Get Version
--
'GET /config/server/version'
--

Returns the version of the Gerrit server.

.Request
----
  GET /config/server/version HTTP/1.0
----

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

  )]}'
  "2.7"
----

[[get-info]]
=== Get Server Info
--
'GET /config/server/info'
--

Returns the information about the Gerrit server configuration.

.Request
----
  GET /config/server/info HTTP/1.0
----

As result a link:#server-info[ServerInfo] entity is returned.

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

  )]}'
  {
    "accounts": {
      "visibility": "ALL"
    },
    "auth": {
      "auth_type": "LDAP",
      "use_contributor_agreements": true,
      "contributor_agreements": [
        {
          "name": "Individual",
          "description": "If you are going to be contributing code on your own, this is the one you want. You can sign this one online.",
          "url": "static/cla_individual.html"
        }
      ],
      "editable_account_fields": [
        "FULL_NAME",
        "REGISTER_NEW_EMAIL"
      ]
    },
    "download": {
      "schemes": {
        "anonymous http": {
          "url": "http://gerrithost:8080/${project}",
          "commands": {
            "Checkout": "git fetch http://gerrithost:8080/${project} ${ref} \u0026\u0026 git checkout FETCH_HEAD",
            "Format Patch": "git fetch http://gerrithost:8080/${project} ${ref} \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD",
            "Pull": "git pull http://gerrithost:8080/${project} ${ref}",
            "Cherry Pick": "git fetch http://gerrithost:8080/${project} ${ref} \u0026\u0026 git cherry-pick FETCH_HEAD"
          },
          "clone_commands": {
            "Clone": "git clone http://gerrithost:8080/${project}",
            "Clone with commit-msg hook": "git clone http://gerrithost:8080/${project} \u0026\u0026 scp -p -P 29418 jdoe@gerrithost:hooks/commit-msg ${project}/.git/hooks/"
          }
        },
        "http": {
          "url": "http://jdoe@gerrithost:8080/${project}",
          "is_auth_required": true,
          "is_auth_supported": true,
          "commands": {
            "Checkout": "git fetch http://jdoe@gerrithost:8080/${project} ${ref} \u0026\u0026 git checkout FETCH_HEAD",
            "Format Patch": "git fetch http://jdoe@gerrithost:8080/${project} ${ref} \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD",
            "Pull": "git pull http://jdoe@gerrithost:8080/${project} ${ref}",
            "Cherry Pick": "git fetch http://jdoe@gerrithost:8080/${project} ${ref} \u0026\u0026 git cherry-pick FETCH_HEAD"
          },
          "clone_commands": {
            "Clone": "git clone http://jdoe@gerrithost:8080/${project}",
            "Clone with commit-msg hook": "git clone http://jdoe@gerrithost:8080/${project} \u0026\u0026 scp -p -P 29418 jdoe@gerrithost:hooks/commit-msg ${project}/.git/hooks/"
          }
        },
        "ssh": {
          "url": "ssh://jdoe@gerrithost:29418/${project}",
          "is_auth_required": true,
          "is_auth_supported": true,
          "commands": {
            "Checkout": "git fetch ssh://jdoe@gerrithost:29418/${project} ${ref} \u0026\u0026 git checkout FETCH_HEAD",
            "Format Patch": "git fetch ssh://jdoe@gerrithost:29418/${project} ${ref} \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD",
            "Pull": "git pull ssh://jdoe@gerrithost:29418/${project} ${ref}",
            "Cherry Pick": "git fetch ssh://jdoe@gerrithost:29418/${project} ${ref} \u0026\u0026 git cherry-pick FETCH_HEAD"
          },
          "clone_commands": {
            "Clone": "git clone ssh://jdoe@gerrithost:29418/${project}",
            "Clone with commit-msg hook": "git clone ssh://jdoe@gerrithost:29418/${project} \u0026\u0026 scp -p -P 29418 jdoe@gerrithost:hooks/commit-msg ${project}/.git/hooks/"
          }
        }
      },
      "archives": [
        "tgz",
        "tar",
        "tbz2",
        "txz"
      ]
    },
    "gerrit": {
      "all_projects": "All-Projects",
      "all_users": "All-Users"
      "doc_search": true,
      "web_uis": [
        "gwt"
      ]
    },
    "sshd": {},
    "suggest": {
      "from": 0
    },
    "user": {
      "anonymous_coward_name": "Name of user not set"
    }
  }
----

[[check-consistency]]
=== Check Consistency
--
'POST /config/server/check.consistency'
--

Runs consistency checks and returns detected problems.

Input for the consistency checks that should be run must be provided in
the request body inside a
link:#consistency-check-input[ConsistencyCheckInput] entity.

.Request
----
  POST /config/server/check.consistency HTTP/1.0
  Content-Type: application/json; charset=UTF-8

  {
    "check_accounts": {},
    "check_account_external_ids": {}
  }
----

As result a link:#consistency-check-info[ConsistencyCheckInfo] entity
is returned that contains detected consistency problems.

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

  )]}'
  {
    "check_accounts_result": {
      "problems": [
        {
          "status": "ERROR",
          "message": "Account \u00271000024\u0027 has no external ID for its preferred email \u0027foo.bar@example.com\u0027"
        }
      ]
    }
    "check_account_external_ids_result": {
      "problems": [
        {
          "status": "ERROR",
          "message": "External ID \u0027uuid:ccb8d323-1361-45aa-8874-41987a660c46\u0027 belongs to account that doesn\u0027t exist: 1000012"
        }
      ]
    }
  }
----


[[reload-config]]
=== Reload Config
--
'POST /config/server/reload'
--

Reloads the gerrit.config configuration.

Not all configuration value can be picked up by this command. Which config
sections and values that are supported is documented here:
link:config-gerrit.html[Configuration]

_The output shows only modified config values that are picked up by Gerrit
and applied._

If a config entry is added or removed from gerrit.config, but still brings
no effect due to a matching default value, no output for this entry is shown.

.Request
----
  POST /config/server/reload HTTP/1.0
----

As result a link:#config-update-info[ConfigUpdateInfo] entity is returned that
contains information about how the updated config entries were handled.

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

  )]}'
  {
    "rejected": [],
    "applied": [
      {
        "config_key": "addreviewer.maxAllowed",
        "old_value": "20",
        "new_value": "15"
      }
    ]
  }
----


[[confirm-email]]
=== Confirm Email
--
'PUT /config/server/email.confirm'
--

Confirms that the user owns an email address.

The email token must be provided in the request body inside
an link:#email-confirmation-input[EmailConfirmationInput] entity.

.Request
----
  PUT /config/server/email.confirm HTTP/1.0
  Content-Type: application/json; charset=UTF-8

  {
    "token": "Enim+QNbAo6TV8Hur8WwoUypI6apG7qBPvF+bw==$MTAwMDAwNDp0ZXN0QHRlc3QuZGU="
  }
----

The response is "`204 No Content`".

If the token is invalid or if it's the token of another user the
request fails and the response is "`422 Unprocessable Entity`".


[[list-caches]]
=== List Caches
--
'GET /config/server/caches/'
--

Lists the caches of the server. Caches defined by plugins are included.

The caller must be a member of a group that is granted one of the
following capabilities:

* link:access-control.html#capability_viewCaches[View Caches]
* link:access-control.html#capability_maintainServer[Maintain Server]
* link:access-control.html#capability_administrateServer[Administrate Server]

As result a map of link:#cache-info[CacheInfo] entities is returned.

The entries in the map are sorted by cache name.

.Request
----
  GET /config/server/caches/ HTTP/1.0
----

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

  )]}'
  {
    "accounts": {
      "type": "MEM",
      "entries": {
        "mem": 4
      },
      "average_get": "2.5ms",
      "hit_ratio": {
        "mem": 94
      }
    },
    "adv_bases": {
      "type": "MEM",
      "entries": {},
      "hit_ratio": {}
    },
    "change_kind": {
      "type": "DISK",
      "entries": {
        "space": "0.00k"
      },
      "hit_ratio": {}
    },
    "changes": {
      "type": "MEM",
      "entries": {},
      "hit_ratio": {}
    },
    "conflicts": {
      "type": "DISK",
      "entries": {
        "mem": 2,
        "disk": 3,
        "space": "2.75k"
      },
      "hit_ratio": {
        "mem": 0,
        "disk": 100
      }
    },
    "diff": {
      "type": "DISK",
      "entries": {
        "mem": 177,
        "disk": 253,
        "space": "170.97k"
      },
      "average_get": "1.1ms",
      "hit_ratio": {
        "mem": 67,
        "disk": 100
      }
    },
    "diff_intraline": {
      "type": "DISK",
      "entries": {
        "mem": 1,
        "disk": 1,
        "space": "0.37k"
      },
      "average_get": "6.8ms",
      "hit_ratio": {
        "mem": 0
      }
    },
    "git_tags": {
      "type": "DISK",
      "entries": {
        "space": "0.00k"
      },
      "hit_ratio": {}
    },
    groups": {
      "type": "MEM",
      "entries": {
        "mem": 27
      },
      "average_get": "183.2us",
      "hit_ratio": {
        "mem": 12
      }
    },
    "groups_bymember": {
      "type": "MEM",
      "entries": {},
      "hit_ratio": {}
    },
    "groups_byname": {
      "type": "MEM",
      "entries": {},
      "hit_ratio": {}
    },
    "groups_bysubgroup": {
      "type": "MEM",
      "entries": {},
      "hit_ratio": {}
    },
    "groups_byuuid": {
      "type": "MEM",
      "entries": {
        "mem": 25
      },
      "average_get": "173.4us",
      "hit_ratio": {
        "mem": 13
      }
    },
    "groups_external": {
      "type": "MEM",
      "entries": {},
      "hit_ratio": {}
    },
    "permission_sort": {
      "type": "MEM",
      "entries": {
        "mem": 16
      },
      "hit_ratio": {
        "mem": 96
      }
    },
    "plugin_resources": {
      "type": "MEM",
      "entries": {
        "mem": 2
      },
      "hit_ratio": {
        "mem": 83
      }
    },
    "project_list": {
      "type": "MEM",
      "entries": {
        "mem": 1
      },
      "average_get": "18.6ms",
      "hit_ratio": {
        "mem": 0
      }
    },
    "projects": {
      "type": "MEM",
      "entries": {
        "mem": 35
      },
      "average_get": "8.6ms",
      "hit_ratio": {
        "mem": 99
      }
    },
    "prolog_rules": {
      "type": "MEM",
      "entries": {
        "mem": 35
      },
      "average_get": "103.0ms",
      "hit_ratio": {
        "mem": 99
      }
    },
    "quota-repo_size": {
      "type": "DISK",
      "entries": {
        "space": "0.00k"
      },
      "hit_ratio": {}
    },
    "sshkeys": {
      "type": "MEM",
      "entries": {
        "mem": 1
      },
      "average_get": "3.2ms",
      "hit_ratio": {
        "mem": 50
      }
    },
    "web_sessions": {
      "type": "DISK",
      "entries": {
        "mem": 1,
        "disk": 2,
        "space": "0.78k"
      },
      "hit_ratio": {
        "mem": 82
      }
    }
  }
----

It is possible to get different output formats by specifying the
`format` option:

* `LIST`:
+
Returns the cache names as JSON list.
+
The cache names are lexicographically sorted.
+
.Request
----
  GET /config/server/caches/?format=LIST HTTP/1.0
----
+
.Response
----
  HTTP/1.1 200 OK
  Content-Type: application/json; charset=UTF-8

  )]}'
  [
    "accounts",
    "adv_bases",
    "change_kind",
    "changes",
    "conflicts",
    "diff",
    "diff_intraline",
    "git_tags",
    "groups",
    "groups_bymember",
    "groups_byname",
    "groups_bysubgroup",
    "groups_byuuid",
    "groups_external",
    "permission_sort",
    "plugin_resources",
    "project_list",
    "projects",
    "prolog_rules",
    "quota-repo_size",
    "sshkeys",
    "web_sessions"
  ]
----

* `TEXT_LIST`:
+
Returns the cache names as a UTF-8 list that is base64 encoded. The
cache names are delimited by '\n'.
+
The cache names are lexicographically sorted.
+
.Request
----
  GET /config/server/caches/?format=TEXT_LIST HTTP/1.0
----
+
.Response
----
  HTTP/1.1 200 OK
  Content-Type: text/plain; charset=UTF-8

  YWNjb3VudHMKYW...ViX3Nlc3Npb25z
----
+
E.g. this could be used to flush all caches:
+
----
  for c in $(curl --user jdoe:TNAuLkXsIV7w http://gerrit/a/config/server/caches/?format=TEXT_LIST | base64 -D)
  do
    curl --user jdoe:TNAuLkXsIV7w -X POST http://gerrit/a/config/server/caches/$c/flush
  done
----

[[cache-operations]]
=== Cache Operations
--
'POST /config/server/caches/'
--

Executes a cache operation that is specified in the request body in a
link:#cache-operation-input[CacheOperationInput] entity.

[[flush-all-caches]]
==== Flush All Caches

.Request
----
  POST /config/server/caches/ HTTP/1.0
  Content-Type: application/json; charset=UTF-8

  {
    "operation": "FLUSH_ALL"
  }
----

.Response
----
  HTTP/1.1 200 OK
----

[[flush-several-caches]]
==== Flush Several Caches At Once

.Request
----
  POST /config/server/caches/ HTTP/1.0
  Content-Type: application/json; charset=UTF-8

  {
    "operation": "FLUSH",
    "caches": [
      "projects",
      "project_list"
    ]
  }
----

.Response
----
  HTTP/1.1 200 OK
----

[[get-cache]]
=== Get Cache
--
'GET /config/server/caches/link:#cache-name[\{cache-name\}]'
--

Retrieves information about a cache.

The caller must be a member of a group that is granted one of the
following capabilities:

* link:access-control.html#capability_viewCaches[View Caches]
* link:access-control.html#capability_maintainServer[Maintain Server]
* link:access-control.html#capability_administrateServer[Administrate Server]

As result a link:#cache-info[CacheInfo] entity is returned.

.Request
----
  GET /config/server/caches/projects HTTP/1.0
----

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

  )]}'
  {
    "name": "projects",
    "type": "MEM",
    "entries": {
      "mem": 35
    },
    "average_get": " 8.6ms",
    "hit_ratio": {
      "mem": 99
    }
  }
----

[[flush-cache]]
=== Flush Cache
--
'POST /config/server/caches/link:#cache-name[\{cache-name\}]/flush'
--

Flushes a cache.

The caller must be a member of a group that is granted one of the
following capabilities:

* link:access-control.html#capability_flushCaches[Flush Caches] (any cache
  except "web_sessions")
* link:access-control.html#capability_maintainServer[Maintain Server] (any cache
  including "web_sessions")
* link:access-control.html#capability_administrateServer[Administrate Server]
  (any cache including "web_sessions")

.Request
----
  POST /config/server/caches/projects/flush HTTP/1.0
----

.Response
----
  HTTP/1.1 200 OK
----

[[get-summary]]
=== Get Summary
--
'GET /config/server/summary'
--

Retrieves a summary of the current server state.

The caller must be a member of a group that is granted the
link:access-control.html#capability_administrateServer[Administrate
Server] capability.

The following options are supported:

* `jvm`:
+
Includes a JVM summary.

* `gc`:
+
Requests a Java garbage collection before computing the information
about the Java memory heap.

.Request
----
  GET /config/server/summary?jvm HTTP/1.0
----

As result a link:#summary-info[SummaryInfo] entity is returned.

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

  )]}'
  {
    "task_summary": {
      "total": 2,
      "sleeping": 2
    },
    "mem_summary": {
      "total": "341.06m",
      "used": "57.16m",
      "free": "283.90m",
      "buffers": "0.00k",
      "max": "1.67g",
    }
    "thread_summary": {
      "cpus": 8,
      "threads": 44,
      "counts": {
        "HTTP": {
          "RUNNABLE": 3,
          "TIMED_WAITING": 2
        },
        "SSH-Interactive-Worker": {
          "WAITING": 1
        },
        "Other": {
          "WAITING": 10,
          "RUNNABLE": 2,
          "TIMED_WAITING": 25
        },
        "SshCommandStart": {
          "WAITING": 1
        }
      }
    },
    "jvm_summary": {
      "vm_vendor": "Oracle Corporation",
      "vm_name": "Java HotSpot(TM) 64-Bit Server VM",
      "vm_version": "23.25-b01",
      "os_name": "Mac OS X",
      "os_version": "10.8.5",
      "os_arch": "x86_64",
      "user": "gerrit",
      "host": "GERRIT",
      "current_working_directory": "/Users/gerrit/site",
      "site": "/Users/gerrit/site"
    }
  }
----

[[list-capabilities]]
=== List Capabilities
--
'GET /config/server/capabilities'
--

Lists the capabilities that are available in the system. There are two
kinds of capabilities: core and plugin-owned capabilities.

As result a map of link:#capability-info[CapabilityInfo] entities is
returned.

The entries in the map are sorted by capability ID.

.Request
----
  GET /config/server/capabilities/ HTTP/1.0
----

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

  )]}'
  {
    "accessDatabase": {
      "id": "accessDatabase",
      "name": "Access Database"
    },
    "administrateServer": {
      "id": "administrateServer",
      "name": "Administrate Server"
    },
    "createAccount": {
      "id": "createAccount",
      "name": "Create Account"
    },
    "createGroup": {
      "id": "createGroup",
      "name": "Create Group"
    },
    "createProject": {
      "id": "createProject",
      "name": "Create Project"
    },
    "emailReviewers": {
      "id": "emailReviewers",
      "name": "Email Reviewers"
    },
    "flushCaches": {
      "id": "flushCaches",
      "name": "Flush Caches"
    },
    "killTask": {
      "id": "killTask",
      "name": "Kill Task"
    },
    "priority": {
      "id": "priority",
      "name": "Priority"
    },
    "queryLimit": {
      "id": "queryLimit",
      "name": "Query Limit"
    },
    "runGC": {
      "id": "runGC",
      "name": "Run Garbage Collection"
    },
    "streamEvents": {
      "id": "streamEvents",
      "name": "Stream Events"
    },
    "viewCaches": {
      "id": "viewCaches",
      "name": "View Caches"
    },
    "viewConnections": {
      "id": "viewConnections",
      "name": "View Connections"
    },
    "viewPlugins": {
      "id": "viewPlugins",
      "name": "View Plugins"
    },
    "viewQueue": {
      "id": "viewQueue",
      "name": "View Queue"
    }
  }
----

[[list-tasks]]
=== List Tasks
--
'GET /config/server/tasks/'
--

Lists the tasks from the background work queues that the Gerrit daemon
is currently performing, or will perform in the near future.

Gerrit contains an internal scheduler, similar to cron, that it uses to
queue and dispatch both short and long term tasks.

Tasks that are completed or canceled exit the queue very quickly once
they enter this state, but it can be possible to observe tasks in these
states.

End-users may see a task only if they can also see the project the task
is associated with. Tasks operating on other projects, or that do not
have a specific project, are hidden.

The caller must be a member of a group that is granted one of the
following capabilities:

* link:access-control.html#capability_viewQueue[View Queue]
* link:access-control.html#capability_maintainServer[Maintain Server]
* link:access-control.html#capability_administrateServer[Administrate Server]

As result a list of link:#task-info[TaskInfo] entities is returned.

The entries in the list are sorted by task state, remaining delay and
command.

.Request
----
  GET /config/server/tasks/ HTTP/1.0
----

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

  )]}'
  [
    {
      "id": "1e688bea",
      "state": "SLEEPING",
      "start_time": "2014-06-11 12:58:51.991000000",
      "delay": 3453,
      "command": "Reload Submit Queue"
    },
    {
      "id": "3e6d4ffa",
      "state": "SLEEPING",
      "start_time": "2014-06-11 12:58:51.508000000",
      "delay": 3287966,
      "command": "Log File Compressor"
    }
  ]
----

[[get-task]]
=== Get Task
--
'GET /config/server/tasks/link:#task-id[\{task-id\}]'
--

Retrieves a task from the background work queue that the Gerrit daemon
is currently performing, or will perform in the near future.

End-users may see a task only if they can also see the project the task
is associated with. Tasks operating on other projects, or that do not
have a specific project, are hidden.

The caller must be a member of a group that is granted one of the
following capabilities:

* link:access-control.html#capability_viewQueue[View Queue]
* link:access-control.html#capability_maintainServer[Maintain Server]
* link:access-control.html#capability_administrateServer[Administrate Server]

As result a link:#task-info[TaskInfo] entity is returned.

.Request
----
  GET /config/server/tasks/1e688bea HTTP/1.0
----

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

  )]}'
  {
    "id": "1e688bea",
    "state": "SLEEPING",
    "start_time": "2014-06-11 12:58:51.991000000",
    "delay": 3453,
    "command": "Reload Submit Queue"
  }
----

[[delete-task]]
=== Delete Task
--
'DELETE /config/server/tasks/link:#task-id[\{task-id\}]'
--

Kills a task from the background work queue that the Gerrit daemon
is currently performing, or will perform in the near future.

The caller must be a member of a group that is granted one of the
following capabilities:

* link:access-control.html#capability_kill[Kill Task]
* link:access-control.html#capability_maintainServer[Maintain Server]
* link:access-control.html#capability_administrateServer[Administrate Server]

End-users may see a task only if they can also see the project the task
is associated with. Tasks operating on other projects, or that do not
have a specific project, are hidden.

Members of a group granted one of the following capabilities may view
all tasks:

* link:access-control.html#capability_viewQueue[View Queue]
* link:access-control.html#capability_maintainServer[Maintain Server]
* link:access-control.html#capability_administrateServer[Administrate Server]

.Request
----
  DELETE /config/server/tasks/1e688bea HTTP/1.0
----

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

[[get-top-menus]]
=== Get Top Menus
--
'GET /config/server/top-menus'
--

Returns the list of additional top menu entries.

.Request
----
  GET /config/server/top-menus HTTP/1.0
----

As response a list of the additional top menu entries as
link:#top-menu-entry-info[TopMenuEntryInfo] entities is returned.

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

  )]}'
  [
    {
      "name": "Top Menu Entry",
      "items": [
        {
          "url": "http://gerrit.googlecode.com/",
          "name": "Gerrit",
          "target": "_blank"
        }
      ]
    }
  ]
----

[[get-user-preferences]]
=== Get Default User Preferences
--
'GET /config/server/preferences'
--

Returns the default user preferences for the server.

.Request
----
  GET /a/config/server/preferences HTTP/1.0
----

As response a link:rest-api-accounts.html#preferences-info[
PreferencesInfo] is returned.

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

  )]}'
  {
    "changes_per_page": 25,
    "show_site_header": true,
    "use_flash_clipboard": true,
    "download_command": "CHECKOUT",
    "date_format": "STD",
    "time_format": "HHMM_12",
    "diff_view": "SIDE_BY_SIDE",
    "size_bar_in_change_table": true,
    "review_category_strategy": "NONE",
    "mute_common_path_prefixes": true,
    "publish_comments_on_push": true,
    "my": [
      {
        "url": "#/dashboard/self",
        "name": "Changes"
      },
      {
        "url": "#/q/has:draft",
        "name": "Draft Comments"
      },
      {
        "url": "#/q/has:edit",
        "name": "Edits"
      },
      {
        "url": "#/q/is:watched+is:open",
        "name": "Watched Changes"
      },
      {
        "url": "#/q/is:starred",
        "name": "Starred Changes"
      },
      {
        "url": "#/groups/self",
        "name": "Groups"
      }
    ],
    "email_strategy": "ENABLED"
  }
----

[[set-user-preferences]]
=== Set Default User Preferences

--
'PUT /config/server/preferences'
--

Sets the default user preferences for the server.

The new user preferences must be provided in the request body as a
link:rest-api-accounts.html#preferences-input[PreferencesInput]
entity.

To be allowed to set default preferences, a user must be a member of
a group that is granted the
link:access-control.html#capability_administrateServer[
Administrate Server] capability.

.Request
----
  PUT /a/config/server/preferences HTTP/1.0
  Content-Type: application/json; charset=UTF-8

  {
    "changes_per_page": 50
  }
----

As response a link:rest-api-accounts.html#preferences-info[
PreferencesInfo] is returned.

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

  )]}'
  {
    "changes_per_page": 50,
    "show_site_header": true,
    "use_flash_clipboard": true,
    "download_command": "CHECKOUT",
    "date_format": "STD",
    "time_format": "HHMM_12",
    "diff_view": "SIDE_BY_SIDE",
    "size_bar_in_change_table": true,
    "review_category_strategy": "NONE",
    "mute_common_path_prefixes": true,
    "publish_comments_on_push": true,
    "my": [
      {
        "url": "#/dashboard/self",
        "name": "Changes"
      },
      {
        "url": "#/q/has:draft",
        "name": "Draft Comments"
      },
      {
        "url": "#/q/has:edit",
        "name": "Edits"
      },
      {
        "url": "#/q/is:watched+is:open",
        "name": "Watched Changes"
      },
      {
        "url": "#/q/is:starred",
        "name": "Starred Changes"
      },
      {
        "url": "#/groups/self",
        "name": "Groups"
      }
    ],
    "email_strategy": "ENABLED"
  }
----

[[get-diff-preferences]]
=== Get Default Diff Preferences

--
'GET /config/server/preferences.diff'
--

Returns the default diff preferences for the server.

.Request
----
  GET /a/config/server/preferences.diff HTTP/1.0
----

As response a link:rest-api-accounts.html#diff-preferences-info[
DiffPreferencesInfo] is returned.

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

  )]}'
  {
    "context": 10,
    "tab_size": 8,
    "line_length": 100,
    "cursor_blink_rate": 0,
    "intraline_difference": true,
    "show_line_endings": true,
    "show_tabs": true,
    "show_whitespace_errors": true,
    "syntax_highlighting": true,
    "auto_hide_diff_table_header": true,
    "theme": "DEFAULT",
    "ignore_whitespace": "IGNORE_NONE"
  }
----

[[set-diff-preferences]]
=== Set Default Diff Preferences

--
'PUT /config/server/preferences.diff'
--

Sets the default diff preferences for the server.

The new diff preferences must be provided in the request body as a
link:rest-api-accounts.html#diff-preferences-input[
DiffPreferencesInput] entity.

To be allowed to set default diff preferences, a user must be a member
of a group that is granted the
link:access-control.html#capability_administrateServer[
Administrate Server] capability.

.Request
----
  PUT /a/config/server/preferences.diff HTTP/1.0
  Content-Type: application/json; charset=UTF-8

  {
    "context": 10,
    "tab_size": 8,
    "line_length": 80,
    "cursor_blink_rate": 0,
    "intraline_difference": true,
    "show_line_endings": true,
    "show_tabs": true,
    "show_whitespace_errors": true,
    "syntax_highlighting": true,
    "auto_hide_diff_table_header": true,
    "theme": "DEFAULT",
    "ignore_whitespace": "IGNORE_NONE"
  }
----

As response a link:rest-api-accounts.html#diff-preferences-info[
DiffPreferencesInfo] is returned.

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

  )]}'
  {
    "context": 10,
    "tab_size": 8,
    "line_length": 80,
    "cursor_blink_rate": 0,
    "intraline_difference": true,
    "show_line_endings": true,
    "show_tabs": true,
    "show_whitespace_errors": true,
    "syntax_highlighting": true,
    "auto_hide_diff_table_header": true,
    "theme": "DEFAULT",
    "ignore_whitespace": "IGNORE_NONE"
  }
----

[[get-edit-preferences]]
=== Get Default Edit Preferences

--
'GET /config/server/preferences.edit'
--

Returns the default edit preferences for the server.

.Request
----
  GET /a/config/server/preferences.edit HTTP/1.0
----

As response a link:rest-api-accounts.html#edit-preferences-info[
EditPreferencesInfo] is returned.

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

  )]}'
  {
    "tab_size": 8,
    "line_length": 100,
    "indent_unit": 2,
    "cursor_blink_rate": 0,
    "show_tabs": true,
    "syntax_highlighting": true,
    "match_brackets": true,
    "auto_close_brackets": true,
    "theme": "DEFAULT",
    "key_map_type": "DEFAULT"
  }
----

[[set-edit-preferences]]
=== Set Default Edit Preferences

--
'PUT /config/server/preferences.edit'
--

Sets the default edit preferences for the server.

The new edit preferences must be provided in the request body as a
link:rest-api-accounts.html#edit-preferences-input[
EditPreferencesInput] entity.

To be allowed to set default edit preferences, a user must be a member
of a group that is granted the
link:access-control.html#capability_administrateServer[
Administrate Server] capability.

.Request
----
  PUT /a/config/server/preferences.edit HTTP/1.0
  Content-Type: application/json; charset=UTF-8

  {
    "tab_size": 8,
    "line_length": 80,
    "indent_unit": 2,
    "cursor_blink_rate": 0,
    "show_tabs": true,
    "syntax_highlighting": true,
    "match_brackets": true,
    "auto_close_brackets": true,
    "theme": "DEFAULT",
    "key_map_type": "DEFAULT"
  }
----

As response a link:rest-api-accounts.html#edit-preferences-info[
EditPreferencesInfo] is returned.

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

  )]}'
  {
    "tab_size": 8,
    "line_length": 80,
    "indent_unit": 2,
    "cursor_blink_rate": 0,
    "show_tabs": true,
    "syntax_highlighting": true,
    "match_brackets": true,
    "auto_close_brackets": true,
    "theme": "DEFAULT",
    "key_map_type": "DEFAULT"
  }
----


[[ids]]
== IDs

[[cache-name]]
=== \{cache-name\}
The name of the cache.

If the cache is defined by a plugin the cache name must include the
plugin name: "<plugin-name>-<cache-name>".

Gerrit core caches can optionally be prefixed with "gerrit":
"gerrit-<cache-name>".

[[task-id]]
=== \{task-id\}
The ID of the task (hex string).


[[json-entities]]
== JSON Entities

[[accounts-config-info]]
=== AccountsConfigInfo
The `AccountsConfigInfo` entity contains information about Gerrit
configuration from the link:config-gerrit.html#accounts[accounts]
section.

[options="header",cols="1,6"]
|=============================
|Field Name           |Description
|`visibility`         |
link:config-gerrit.html#accounts.visibility[Visibility setting for
accounts].
|=============================

[[auth-info]]
=== AuthInfo
The `AuthInfo` entity contains information about the authentication
configuration of the Gerrit server.

[options="header",cols="1,^1,5"]
|==========================================
|Field Name                   ||Description
|`type`                       ||
The link:config-gerrit.html#auth.type[authentication type] that is
configured on the server. Can be `OPENID`, `OPENID_SSO`, `OAUTH`,
`HTTP`, `HTTP_LDAP`, `CLIENT_SSL_CERT_LDAP`, `LDAP`, `LDAP_BIND`,
`CUSTOM_EXTENSION` or `DEVELOPMENT_BECOME_ANY_ACCOUNT`.
|`use_contributor_agreements` |not set if `false`|
Whether link:config-gerrit.html#auth.contributorAgreements[contributor
agreements] are required.
|`contributor_agreements`     |not set if `use_contributor_agreements` is `false`|
List of contributor agreements as link:rest-api-accounts.html#contributor-agreement-info[
ContributorAgreementInfo] entities.
|`editable_account_fields`    ||
List of account fields that are editable. Possible values are
`FULL_NAME`, `USER_NAME` and `REGISTER_NEW_EMAIL`.
|`login_url`                  |optional|
The link:config-gerrit.html#auth.loginUrl[login URL]. Only set if
link:config-gerrit.html#auth.type[authentication type] is `HTTP` or
`HTTP_LDAP`.
|`login_text`                 |optional|
The link:config-gerrit.html#auth.loginText[login text]. Only set if
link:config-gerrit.html#auth.type[authentication type] is `HTTP` or
`HTTP_LDAP`.
|`switch_account_url`         |optional|
The link:config-gerrit.html#auth.switchAccountUrl[URL to switch
accounts].
|`register_url`               |optional|
The link:config-gerrit.html#auth.registerUrl[register URL]. Only set if
link:config-gerrit.html#auth.type[authentication type] is `LDAP`,
`LDAP_BIND` or `CUSTOM_EXTENSION`.
|`register_text`              |optional|
The link:config-gerrit.html#auth.registerText[register text]. Only set
if link:config-gerrit.html#auth.type[authentication type] is `LDAP`,
`LDAP_BIND` or `CUSTOM_EXTENSION`.
|`edit_full_name_url`         |optional|
The link:config-gerrit.html#auth.editFullNameUrl[URL to edit the full
name]. Only set if link:config-gerrit.html#auth.type[authentication
type] is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`.
|`http_password_url`          |optional|
The link:config-gerrit.html#auth.httpPasswordUrl[URL to obtain an HTTP
password]. Only set if link:config-gerrit.html#auth.type[authentication
type] is `CUSTOM_EXTENSION`.
|`git_basic_auth_policy`      |optional|
The link:config-gerrit.html#auth.gitBasicAuthPolicy[policy] to authenticate
Git over HTTP and REST API requests when
link:config-gerrit.html#auth.type[authentication type] is `LDAP`.
Can be `HTTP`, `LDAP` or `HTTP_LDAP`.
|==========================================

[[cache-info]]
=== CacheInfo
The `CacheInfo` entity contains information about a cache.

[options="header",cols="1,^1,5"]
|==================================
|Field Name           ||Description
|`name`               |
not set if returned in a map where the cache name is used as map key|
The cache name. If the cache is defined by a plugin the cache name
includes the plugin name: "<plugin-name>-<cache-name>".
|`type`               ||
The type of the cache (`MEM`: in memory cache, `DISK`: disk cache).
|`entries`            ||
Information about the entries in the cache as a
link:#entries-info[EntriesInfo] entity.
|`average_get`        |optional|
The average duration of getting one entry from the cache. The value is
returned with a standard time unit abbreviation (`ns`: nanoseconds,
`us`: microseconds, `ms`: milliseconds, `s`: seconds).
|`hit_ratio`          ||
Information about the hit ratio as a link:#hit-ration-info[
HitRatioInfo] entity.
|==================================

[[cache-operation-input]]
=== CacheOperationInput
The `CacheOperationInput` entity contains information about an
operation that should be executed on caches.

[options="header",cols="1,^1,5"]
|==================================
|Field Name           ||Description
|`operation`          ||
The cache operation that should be executed:

`FLUSH_ALL`: Flushes all caches, except the `web_sessions` cache.

`FLUSH`: Flushes the specified caches.
|`caches`             |optional|
A list of cache names. This list defines the caches on which the
specified operation should be executed. Whether this list must be
specified depends on the operation being executed.
|==================================

[[capability-info]]
=== CapabilityInfo
The `CapabilityInfo` entity contains information about a capability.

[options="header",cols="1,6"]
|=================================
|Field Name           |Description
|`id`                 |capability ID
|`name`               |capability name
|=================================

[[change-config-info]]
=== ChangeConfigInfo
The `ChangeConfigInfo` entity contains information about Gerrit
configuration from the link:config-gerrit.html#change[change]
section.

[options="header",cols="1,^1,5"]
|=============================
|Field Name           ||Description
|`allow_blame`        |not set if `false`|
link:config-gerrit.html#change.allowBlame[Whether blame on side by side diff is
allowed].
|`large_change`       ||
link:config-gerrit.html#change.largeChange[Number of changed lines from
which on a change is considered as a large change].
|`reply_label`        ||
link:config-gerrit.html#change.replyTooltip[Label name for the reply
button].
|`reply_tooltip`      ||
link:config-gerrit.html#change.replyTooltip[Tooltip for the reply
button].
|`update_delay`       ||
link:config-gerrit.html#change.updateDelay[How often in seconds the web
interface should poll for updates to the currently open change].
|`submit_whole_topic` ||
link:config-gerrit.html#change.submitWholeTopic[A configuration if
the whole topic is submitted].
|`disable_private_changes` |not set if `false`|
Returns true if private changes are disabled.
|=============================

[[check-account-external-ids-input]]
=== CheckAccountExternalIdsInput
The `CheckAccountExternalIdsInput` entity contains input for the
account external ID consistency check.

Currently this entity contains no fields.

[[check-account-external-ids-result-info]]
=== CheckAccountExternalIdsResultInfo
The `CheckAccountExternalIdsResultInfo` entity contains the result of
running the account external ID consistency check.

[options="header",cols="1,6"]
|======================
|Field Name|Description
|`problems`|A list of link:#consistency-problem-info[
ConsistencyProblemInfo] entities.
|======================

[[check-accounts-input]]
=== CheckAccountsInput
The `CheckAccountsInput` entity contains input for the account consistency
check.

Currently this entity contains no fields.

[[check-accounts-result-info]]
=== CheckAccountsResultInfo
The `CheckAccountsResultInfo` entity contains the result of running the
account consistency check.

[options="header",cols="1,6"]
|======================
|Field Name|Description
|`problems`|A list of link:#consistency-problem-info[
ConsistencyProblemInfo] entities.
|======================

[[check-groups-input]]
=== CheckGroupsInput
The `CheckGroupsInput` entity contains input for the group consistency
check.

Currently this entity contains no fields.

[[check-groups-result-info]]
=== CheckGroupsResultInfo
The `CheckGroupsResultInfo` entity contains the result of running the
group consistency check.

[options="header",cols="1,6"]
|======================
|Field Name|Description
|`problems`|A list of link:#consistency-problem-info[
ConsistencyProblemInfo] entities.
|======================

[[consistency-check-info]]
=== ConsistencyCheckInfo
The `ConsistencyCheckInfo` entity contains the results of running
consistency checks.

[options="header",cols="1,^1,5"]
|================================================
|Field Name                         ||Description
|`check_accounts_result`            |optional|
The result of running the account consistency check as a
link:#check-accounts-result-info[CheckAccountsResultInfo] entity.
|`check_account_external_ids_result`|optional|
The result of running the account external ID consistency check as a
link:#check-account-external-ids-result-info[
CheckAccountExternalIdsResultInfo] entity.
|`check_groups_result`              |optional|
The result of running the group consistency check as a
link:#check-groups-result-info[CheckGroupsResultInfo] entity.
|================================================

[[consistency-check-input]]
=== ConsistencyCheckInput
The `ConsistencyCheckInput` entity contains information about which
consistency checks should be run.

[options="header",cols="1,^1,5"]
|=========================================
|Field Name                  ||Description
|`check_accounts`            |optional|
Input for the account consistency check as
link:#check-accounts-input[CheckAccountsInput] entity.
|`check_account_external_ids`|optional|
Input for the account external ID consistency check as
link:#check-account-external-ids-input[CheckAccountExternalIdsInput]
entity.
|`check_groups`              |optional|
Input for the group consistency check as link:#check-groups-input[
CheckGroupsInput] entity.
|=========================================

[[consistency-problem-info]]
=== ConsistencyProblemInfo
The `ConsistencyProblemInfo` entity contains information about a
consistency problem.

[options="header",cols="1,6"]
|======================
|Field Name|Description
|`status`  |The status of the consistency problem. +
Possible values are `ERROR` and `WARNING`.
|`message` |Message describing the consistency problem.
|======================

[[config-update-info]]
=== ConfigUpdateInfo
The entity describes the result of a reload of gerrit.config.

If a changed config value is missing from the `applied` and the `rejected`
lists there are no guarantees to whether they have or have not taken effect.

[options="header",cols="1,6"]
|======================
|Field Name|Description
|`applied` |A list of link:#config-update-entry-info[ConfigUpdateEntryInfos]
describing the applied configuration changes. +
Every config value change representation present in this list is guaranteed to
have taken effect.
|`rejected` |A list of link:#config-update-entry-info[ConfigUpdateEntryInfos]
describing the rejected configuration changes.  +
Every config value change representation present in this list is guaranteed not
to have taken effect.
|======================

[[config-update-entry-info]]
=== ConfigUpdateEntryInfo
The entity describes an updated config value.

[options="header",cols="1,6"]
|======================
|Field Name|Description
|`config_key` |The config key that contains the value.
|`old_value`  |The old config value. +
Missing if value was not previously configured.
|`new_value`  |The new config value, picked up after reload.
|======================

[[download-info]]
=== DownloadInfo
The `DownloadInfo` entity contains information about supported download
options.

[options="header",cols="1,6"]
|=======================
|Field Name |Description
|`schemes`  |
The supported download schemes as a map which maps the scheme name to a
of link:#download-scheme-info[DownloadSchemeInfo] entity.
|`archives` |
List of supported archive formats. Possible values are `tgz`, `tar`,
`tbz2` and `txz`.
|=======================

[[download-scheme-info]]
=== DownloadSchemeInfo
The `DownloadSchemeInfo` entity contains information about a supported
download scheme and its commands.

[options="header",cols="1,^1,5"]
|=================================
|Field Name          ||Description
|`url`               ||
The URL of the download scheme, where '${project}' is used as
placeholder for the project name.
|`is_auth_required`  |not set if `false`|
Whether this download scheme requires authentication.
|`is_auth_supported` |not set if `false`|
Whether this download scheme supports authentication.
|`commands`          ||
Download commands as a map which maps the command name to the download
command. In the download command '${project}' is used as
placeholder for the project name, and '${ref}' is used as
placeholder for the (change) ref.

Empty, if accessed anonymously and the download scheme requires
authentication.
|`clone_commands`    ||
Clone commands as a map which maps the command name to the clone
command. In the clone command '${project}' is used as
placeholder for the project name and '${project-base-name}' as name
for the project base name (e.g. for a project 'foo/bar' '${project}'
is a placeholder for 'foo/bar' and '${project-base-name}' is a
placeholder for 'bar').

Empty, if accessed anonymously and the download scheme requires
authentication.
|=================================

[[email-confirmation-input]]
=== EmailConfirmationInput
The `EmailConfirmationInput` entity contains information for confirming
an email address.

[options="header",cols="1,6"]
|=======================
|Field Name |Description
|`token`    |
The token that was sent by mail to a newly registered email address.
|=======================

[[entries-info]]
=== EntriesInfo
The `EntriesInfo` entity contains information about the entries in a
cache.

[options="header",cols="1,^1,5"]
|==================================
|Field Name ||Description
|`mem`      |optional|Number of cache entries that are held in memory.
|`disk`     |optional|Number of cache entries on the disk. For non-disk
caches this value is not set; for disk caches it is only set if there
are entries in the cache.
|`space`    |optional|
The space that is consumed by the cache on disk. The value is returned
with a unit abbreviation (`k`: kilobytes, `m`: megabytes,
`g`: gigabytes). Only set for disk caches.
|==================================

[[gerrit-info]]
=== GerritInfo
The `GerritInfo` entity contains information about Gerrit
configuration from the link:config-gerrit.html#gerrit[gerrit] section.

[options="header",cols="1,^1,5"]
|=================================
|Field Name          ||Description
|`all_projects_name` ||
Name of the link:config-gerrit.html#gerrit.allProjects[root project].
|`all_users_name`    ||
Name of the link:config-gerrit.html#gerrit.allUsers[project in which
meta data of all users is stored].
|`doc_search`        ||
Whether documentation search is available.
|`doc_url`           |optional|
Custom base URL where Gerrit server documentation is located.
(Documentation may still be available at /Documentation relative to the
Gerrit base path even if this value is unset.)
|`edit_gpg_keys`     |not set if `false`|
Whether to enable the web UI for editing GPG keys.
|`report_bug_url`    |optional|
link:config-gerrit.html#gerrit.reportBugUrl[URL to report bugs].
|`report_bug_text`   |optional, not set if default|
link:config-gerrit.html#gerrit.reportBugText[Display text for report
bugs link].
|`web_uis`           ||
List of web UIs supported by the HTTP server. Possible values are `GWT`
and `POLYGERRIT`.
|=================================

[[hit-ration-info]]
=== HitRatioInfo
The `HitRatioInfo` entity contains information about the hit ratio of a
cache.

[options="header",cols="1,^1,5"]
|==================================
|Field Name ||Description
|`mem`      ||
Hit ratio for cache entries that are held in memory (0 \<= value \<= 100).
|`disk`     |optional|
Hit ratio for cache entries that are held on disk (0 \<= value \<= 100).
Only set for disk caches.
|==================================

[[jvm-summary-info]]
=== JvmSummaryInfo
The `JvmSummaryInfo` entity contains information about the JVM.

[options="header",cols="1,^1,5"]
|========================================
|Field Name                 ||Description
|`vm_vendor`                ||The vendor of the virtual machine.
|`vm_name`                  ||The name of the virtual machine.
|`vm_version`               ||The version of the virtual machine.
|`os_name`                  ||The name of the operating system.
|`os_version`               ||The version of the operating system.
|`os_arch`                  ||The architecture of the operating system.
|`user`                     ||The user that is running Gerrit.
|`host`                     |optional|
The host on which Gerrit is running.
|`current_working_directory`||The current working directory.
|`site`                     ||The path to the review site.
|========================================

[[mem-summary-info]]
=== MemSummaryInfo
The `MemSummaryInfo` entity contains information about the current
memory usage.

[options="header",cols="1,^1,5"]
|============================
|Field Name     ||Description
|`total`        ||
The total size of the memory. The value is returned with a unit
abbreviation (`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
|`used`         ||
The size of used memory. The value is returned with a unit abbreviation
(`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
|`free`         ||
The size of free memory. The value is returned with a unit abbreviation
(`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
|`buffers`      ||
The size of memory used for JGit buffers. The value is returned with a
unit abbreviation (`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
|`max`          ||
The maximal memory size. The value is returned with a unit abbreviation
(`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
|`open_files`   |optional|
The number of open files.
|============================

[[plugin-config-info]]
=== PluginConfigInfo
The `PluginConfigInfo` entity contains information about Gerrit
extensions by plugins.

[options="header",cols="1,^1,5"]
|===========================
|Field Name    ||Description
|`has_avatars` |not set if `false`|
Whether an avatar provider is registered.
|===========================

[[receive-info]]
=== ReceiveInfo
The `ReceiveInfo` entity contains information about the configuration
of git-receive-pack behavior on the server.

[options="header",cols="1,^1,5"]
|=======================================
|Field Name        ||Description
|`enableSignedPush`|optional|
Whether signed push validation support is enabled on the server; see the
link:config-gerrit.html#receive.certNonceSeed[global configuration] for
details.
|=======================================

[[server-info]]
=== ServerInfo
The `ServerInfo` entity contains information about the configuration of
the Gerrit server.

[options="header",cols="1,^1,5"]
|=======================================
|Field Name                ||Description
|`accounts`                ||
Information about the configuration from the
link:config-gerrit.html#accounts[accounts] section as
link:#accounts-config-info[AccountsConfigInfo] entity.
|`auth`                    ||
Information about the authentication configuration as
link:#auth-info[AuthInfo] entity.
|`change`                  ||
Information about the configuration from the
link:config-gerrit.html#change[change] section as
link:#change-config-info[ChangeConfigInfo] entity.
|`download`                ||
Information about the configured download options as
link:#download-info[DownloadInfo] entity.
information about Gerrit
|`gerrit`                  ||
Information about the configuration from the
link:config-gerrit.html#gerrit[gerrit] section as link:#gerrit-info[
GerritInfo] entity.
|`note_db_enabled`         |not set if `false`|
Whether the NoteDb storage backend is fully enabled.
|`plugin`                  ||
Information about Gerrit extensions by plugins as
link:#plugin-config-info[PluginConfigInfo] entity.
|`receive`                 |optional|
Information about the receive-pack configuration as a
link:#receive-info[ReceiveInfo] entity.
|`sshd`                    |optional|
Information about the configuration from the
link:config-gerrit.html#sshd[sshd] section as link:#sshd-info[SshdInfo]
entity. Not set if SSHD is disabled.
|`suggest`                 ||
Information about the configuration from the
link:config-gerrit.html#suggest[suggest] section as link:#suggest-info[
SuggestInfo] entity.
|`url_aliases`             |optional|
A map of URL aliases, where a regular expression for an URL token is
mapped to a target URL token. The target URL token can contain
placeholders for the groups matched by the regular expression: `$1` for
the first matched group, `$2` for the second matched group, etc.
|`user`                    ||
Information about the configuration from the
link:config-gerrit.html#user[user] section as link:#user-config-info[
UserConfigInfo] entity.
|`default_theme`           |optional|
URL to a default PolyGerrit UI theme plugin, if available.
Located in `/static/gerrit-theme.html` by default.
|=======================================

[[sshd-info]]
=== SshdInfo
The `SshdInfo` entity contains information about Gerrit
configuration from the link:config-gerrit.html#sshd[sshd]
section.

This entity doesn't contain any data, but the presence of this (empty)
entity in the link:#server-info[ServerInfo] entity means that SSHD is
enabled on the server.

[[suggest-info]]
=== SuggestInfo
The `SuggestInfo` entity contains information about Gerrit
configuration from the link:config-gerrit.html#suggest[suggest]
section.

[options="header",cols="1,6"]
|=======================
|Field Name |Description
|`from`     |
The link:config-gerrit.html#suggest.from[number of characters] that a
user must have typed before suggestions are provided.
|=======================

[[summary-info]]
=== SummaryInfo
The `SummaryInfo` entity contains information about the current state
of the server.

[options="header",cols="1,^1,5"]
|============================
|Field Name     ||Description
|`task_summary` ||
Summary about current tasks as a link:#task-summary-info[
TaskSummaryInfo] entity.
|`mem_summary`  ||
Summary about current memory usage as a link:#mem-summary-info[
MemSummaryInfo] entity.
|`thread_summary`  ||
Summary about current threads as a link:#thread-summary-info[
ThreadSummaryInfo] entity.
|`jvm_summary`  |optional|
Summary about the JVM link:#jvm-summary-info[JvmSummaryInfo] entity.
Only set if the `jvm` option was set.
|============================

[[task-info]]
=== TaskInfo
The `TaskInfo` entity contains information about a task in a background
work queue.

[options="header",cols="1,^1,5"]
|====================================
|Field Name   ||Description
|`id`         ||The ID of the task.
|`state`      ||
The state of the task, can be `DONE`, `CANCELLED`, `RUNNING`, `READY`,
`SLEEPING` and `OTHER`.
|`start_time` ||The start time of the task.
|`delay`      ||The remaining delay of the task.
|`command`    ||The command of the task.
|`remote_name`|optional|
The remote name. May only be set for tasks that are associated with a
project.
|`project`    |optional|The project the task is associated with.
|====================================

[[task-summary-info]]
=== TaskSummaryInfo
The `TaskSummaryInfo` entity contains information about the current
tasks.

[options="header",cols="1,^1,5"]
|============================
|Field Name     ||Description
|`total`        |optional|
Total number of current tasks.
|`running`      |optional|
Number of currently running tasks.
|`ready`        |optional|
Number of currently ready tasks.
|`sleeping`     |optional|
Number of currently sleeping tasks.
|============================

[[thread-summary-info]]
=== ThreadSummaryInfo
The `ThreadSummaryInfo` entity contains information about the current
threads.

[options="header",cols="1,6"]
|===========================
|Field Name     |Description
|`cpus`         |
The number of available processors.
|`threads`      |
The total number of current threads.
|`counts`       |
Detailed thread counts as a map that maps a thread kind to a map that
maps a thread state to the thread count. The thread kinds group the
counts by threads that have the same name prefix (`H2`, `HTTP`,
`IntraLineDiff`, `ReceiveCommits`, `SSH git-receive-pack`,
`SSH git-upload-pack`, `SSH-Interactive-Worker`, `SSH-Stream-Worker`,
`SshCommandStart`, `sshd-SshServer`). The counts for other threads are
available under the thread kind `Other`. Counts for the following thread
states can be included: `NEW`, `RUNNABLE`, `BLOCKED`, `WAITING`,
`TIMED_WAITING` and `TERMINATED`.
|===========================

[[top-menu-entry-info]]
=== TopMenuEntryInfo
The `TopMenuEntryInfo` entity contains information about a top menu
entry.

[options="header",cols="1,6"]
|=================================
|Field Name           |Description
|`name`               |Name of the top menu entry.
|`items`              |List of link:#top-menu-item-info[menu items].
|=================================

[[top-menu-item-info]]
=== TopMenuItemInfo
The `TopMenuItemInfo` entity contains information about a menu item in
a top menu entry.

[options="header",cols="1,^1,5"]
|========================
|Field Name ||Description
|`url`      ||The URL of the menu item link.
|`name`     ||The name of the menu item.
|`target`   ||Target attribute of the menu item link.
|`id`       |optional|The `id` attribute of the menu item link.
|========================

[[user-config-info]]
=== UserConfigInfo
The `UserConfigInfo` entity contains information about Gerrit
configuration from the link:config-gerrit.html#user[user] section.

[options="header",cols="1,6"]
|====================================
|Field Name              |Description
|`anonymous_coward_name` |
link:config-gerrit.html#user.anonymousCoward[Username] that is
displayed in the Gerrit Web UI and in e-mail notifications if the full
name of the user is not set.
|====================================


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

SEARCHBOX
---------