blob: 505def078755acfae81f0f3861113bc4a7c4d779 [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= Gerrit Code Review - /config/ REST API
David Ostrovsky28b8ea62013-06-09 02:16:57 +02002
3This page describes the config related REST endpoints.
4Please also take note of the general information on the
5link:rest-api.html[REST API].
6
7[[config-endpoints]]
8Config Endpoints
9---------------
10
Edwin Kempinf2e3fe62013-07-04 16:03:32 +020011[[get-version]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080012=== Get Version
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080013--
Edwin Kempinf2e3fe62013-07-04 16:03:32 +020014'GET /config/server/version'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080015--
Edwin Kempinf2e3fe62013-07-04 16:03:32 +020016
17Returns the version of the Gerrit server.
18
19.Request
20----
21 GET /config/server/version HTTP/1.0
22----
23
24.Response
25----
26 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +090027 Content-Type: application/json; charset=UTF-8
Edwin Kempinf2e3fe62013-07-04 16:03:32 +020028
29 )]}'
30 "2.7"
31----
32
Edwin Kempinb8590bd2015-04-30 12:55:34 +020033[[get-info]]
34=== Get Server Info
35--
36'GET /config/server/info'
37--
38
39Returns the information about the Gerrit server configuration.
40
41.Request
42----
43 GET /config/server/info HTTP/1.0
44----
45
46As result a link:#server-info[ServerInfo] entity is returned.
47
48.Response
49----
50 HTTP/1.1 200 OK
51 Content-Type: application/json; charset=UTF-8
52
53 )]}'
54 {
Edwin Kempinf0dacbd2017-08-30 16:17:17 +020055 "accounts": {
56 "visibility": "ALL"
57 },
Edwin Kempinb8590bd2015-04-30 12:55:34 +020058 "auth": {
59 "auth_type": "LDAP",
David Pursehousecc046732016-08-22 20:08:52 +090060 "use_contributor_agreements": true,
61 "contributor_agreements": [
62 {
63 "name": "Individual",
64 "description": "If you are going to be contributing code on your own, this is the one you want. You can sign this one online.",
65 "url": "static/cla_individual.html"
66 }
67 ],
Edwin Kempinb8590bd2015-04-30 12:55:34 +020068 "editable_account_fields": [
69 "FULL_NAME",
70 "REGISTER_NEW_EMAIL"
71 ]
72 },
73 "download": {
Adrian Görler266f9592015-10-08 16:56:51 +020074 "schemes": {
Edwin Kempin132d28e2015-05-07 15:30:35 +020075 "anonymous http": {
76 "url": "http://gerrithost:8080/${project}",
Edwin Kempinb8590bd2015-04-30 12:55:34 +020077 "commands": {
Edwin Kempin132d28e2015-05-07 15:30:35 +020078 "Checkout": "git fetch http://gerrithost:8080/${project} ${ref} \u0026\u0026 git checkout FETCH_HEAD",
79 "Format Patch": "git fetch http://gerrithost:8080/${project} ${ref} \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD",
80 "Pull": "git pull http://gerrithost:8080/${project} ${ref}",
81 "Cherry Pick": "git fetch http://gerrithost:8080/${project} ${ref} \u0026\u0026 git cherry-pick FETCH_HEAD"
Edwin Kempineafde882015-05-11 15:40:44 +020082 },
83 "clone_commands": {
Adrian Görler266f9592015-10-08 16:56:51 +020084 "Clone": "git clone http://gerrithost:8080/${project}",
Edwin Kempineafde882015-05-11 15:40:44 +020085 "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/"
Edwin Kempinb8590bd2015-04-30 12:55:34 +020086 }
87 },
Edwin Kempin132d28e2015-05-07 15:30:35 +020088 "http": {
Edwin Kempinb8590bd2015-04-30 12:55:34 +020089 "url": "http://jdoe@gerrithost:8080/${project}",
90 "is_auth_required": true,
91 "is_auth_supported": true,
92 "commands": {
93 "Checkout": "git fetch http://jdoe@gerrithost:8080/${project} ${ref} \u0026\u0026 git checkout FETCH_HEAD",
94 "Format Patch": "git fetch http://jdoe@gerrithost:8080/${project} ${ref} \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD",
95 "Pull": "git pull http://jdoe@gerrithost:8080/${project} ${ref}",
96 "Cherry Pick": "git fetch http://jdoe@gerrithost:8080/${project} ${ref} \u0026\u0026 git cherry-pick FETCH_HEAD"
Edwin Kempineafde882015-05-11 15:40:44 +020097 },
98 "clone_commands": {
99 "Clone": "git clone http://jdoe@gerrithost:8080/${project}",
100 "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/"
Edwin Kempinb8590bd2015-04-30 12:55:34 +0200101 }
102 },
Edwin Kempin132d28e2015-05-07 15:30:35 +0200103 "ssh": {
104 "url": "ssh://jdoe@gerrithost:29418/${project}",
105 "is_auth_required": true,
106 "is_auth_supported": true,
Edwin Kempinb8590bd2015-04-30 12:55:34 +0200107 "commands": {
Edwin Kempin132d28e2015-05-07 15:30:35 +0200108 "Checkout": "git fetch ssh://jdoe@gerrithost:29418/${project} ${ref} \u0026\u0026 git checkout FETCH_HEAD",
109 "Format Patch": "git fetch ssh://jdoe@gerrithost:29418/${project} ${ref} \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD",
110 "Pull": "git pull ssh://jdoe@gerrithost:29418/${project} ${ref}",
111 "Cherry Pick": "git fetch ssh://jdoe@gerrithost:29418/${project} ${ref} \u0026\u0026 git cherry-pick FETCH_HEAD"
Edwin Kempineafde882015-05-11 15:40:44 +0200112 },
113 "clone_commands": {
114 "Clone": "git clone ssh://jdoe@gerrithost:29418/${project}",
115 "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/"
Edwin Kempinb8590bd2015-04-30 12:55:34 +0200116 }
117 }
Adrian Görler266f9592015-10-08 16:56:51 +0200118 },
Edwin Kempinb8590bd2015-04-30 12:55:34 +0200119 "archives": [
Edwin Kempinf5c88792015-05-20 09:20:30 +0200120 "tgz",
121 "tar",
122 "tbz2",
123 "txz"
Edwin Kempinb8590bd2015-04-30 12:55:34 +0200124 ]
125 },
126 "gerrit": {
127 "all_projects": "All-Projects",
128 "all_users": "All-Users"
David Ostrovsky7163dac2017-07-29 06:49:38 +0200129 "doc_search": true
Edwin Kempin50570542015-05-08 15:31:56 +0200130 },
Edwin Kempina3188e12015-05-12 13:34:42 +0200131 "sshd": {},
Edwin Kempin50570542015-05-08 15:31:56 +0200132 "suggest": {
133 "from": 0
134 },
135 "user": {
Han-Wen Nienhuys3fb723d2017-11-20 19:21:13 +0100136 "anonymous_coward_name": "Name of user not set"
Edwin Kempinb8590bd2015-04-30 12:55:34 +0200137 }
138 }
139----
140
Edwin Kempin54fd1d32017-03-24 15:32:03 +0100141[[check-consistency]]
142=== Check Consistency
143--
Edwin Kempin2ee52f82017-04-25 11:04:28 +0200144'POST /config/server/check.consistency'
Edwin Kempin54fd1d32017-03-24 15:32:03 +0100145--
146
147Runs consistency checks and returns detected problems.
148
149Input for the consistency checks that should be run must be provided in
150the request body inside a
151link:#consistency-check-input[ConsistencyCheckInput] entity.
152
153.Request
154----
Edwin Kempin2ee52f82017-04-25 11:04:28 +0200155 POST /config/server/check.consistency HTTP/1.0
Edwin Kempin54fd1d32017-03-24 15:32:03 +0100156 Content-Type: application/json; charset=UTF-8
157
158 {
Edwin Kempin6396d6d2017-05-30 10:41:28 +0200159 "check_accounts": {},
Edwin Kempin54fd1d32017-03-24 15:32:03 +0100160 "check_account_external_ids": {}
161 }
162----
163
164As result a link:#consistency-check-info[ConsistencyCheckInfo] entity
165is returned that contains detected consistency problems.
166
167.Response
168----
169 HTTP/1.1 200 OK
170 Content-Type: application/json; charset=UTF-8
171
172 )]}'
173 {
Edwin Kempin6396d6d2017-05-30 10:41:28 +0200174 "check_accounts_result": {
175 "problems": [
176 {
177 "status": "ERROR",
178 "message": "Account \u00271000024\u0027 has no external ID for its preferred email \u0027foo.bar@example.com\u0027"
179 }
180 ]
181 }
Edwin Kempindadd3032017-05-30 09:46:44 +0200182 "check_account_external_ids_result": {
183 "problems": [
184 {
185 "status": "ERROR",
186 "message": "External ID \u0027uuid:ccb8d323-1361-45aa-8874-41987a660c46\u0027 belongs to account that doesn\u0027t exist: 1000012"
187 }
188 ]
Edwin Kempin54fd1d32017-03-24 15:32:03 +0100189 }
190 }
191----
192
Han-Wen Nienhuyse04df7e2017-04-25 17:41:58 +0200193
Sven Selberg1acfae52018-04-18 17:11:56 +0200194[[reload-config]]
195=== Reload Config
196--
197'POST /config/server/reload'
198--
199
200Reloads the gerrit.config configuration.
201
202Not all configuration value can be picked up by this command. Which config
203sections and values that are supported is documented here:
204link:config-gerrit.html[Configuration]
205
206_The output shows only modified config values that are picked up by Gerrit
207and applied._
208
209If a config entry is added or removed from gerrit.config, but still brings
210no effect due to a matching default value, no output for this entry is shown.
211
212.Request
213----
214 POST /config/server/reload HTTP/1.0
215----
216
217As result a link:#config-update-info[ConfigUpdateInfo] entity is returned that
218contains information about how the updated config entries were handled.
219
220.Response
221----
222 HTTP/1.1 200 OK
223 Content-Type: application/json; charset=UTF-8
224
225 )]}'
226 {
227 "rejected": [],
228 "applied": [
229 {
230 "config_key": "addreviewer.maxAllowed",
231 "old_value": "20",
232 "new_value": "15"
233 }
234 ]
235 }
236----
237
238
Edwin Kempined846572015-07-24 14:17:11 +0200239[[confirm-email]]
240=== Confirm Email
241--
242'PUT /config/server/email.confirm'
243--
244
245Confirms that the user owns an email address.
246
247The email token must be provided in the request body inside
248an link:#email-confirmation-input[EmailConfirmationInput] entity.
249
250.Request
251----
252 PUT /config/server/email.confirm HTTP/1.0
253 Content-Type: application/json; charset=UTF-8
254
255 {
256 "token": "Enim+QNbAo6TV8Hur8WwoUypI6apG7qBPvF+bw==$MTAwMDAwNDp0ZXN0QHRlc3QuZGU="
257 }
258----
259
260The response is "`204 No Content`".
261
262If the token is invalid or if it's the token of another user the
263request fails and the response is "`422 Unprocessable Entity`".
264
Edwin Kempinb8590bd2015-04-30 12:55:34 +0200265
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200266[[list-caches]]
267=== List Caches
268--
269'GET /config/server/caches/'
270--
271
272Lists the caches of the server. Caches defined by plugins are included.
273
Dave Borowitz664d0402015-06-11 15:35:48 -0400274The caller must be a member of a group that is granted one of the
275following capabilities:
276
277* link:access-control.html#capability_viewCaches[View Caches]
278* link:access-control.html#capability_maintainServer[Maintain Server]
279* link:access-control.html#capability_administrateServer[Administrate Server]
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200280
281As result a map of link:#cache-info[CacheInfo] entities is returned.
282
283The entries in the map are sorted by cache name.
284
285.Request
286----
287 GET /config/server/caches/ HTTP/1.0
288----
289
290.Response
291----
292 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900293 Content-Type: application/json; charset=UTF-8
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200294
295 )]}'
296 {
297 "accounts": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200298 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200299 "entries": {
300 "mem": 4
301 },
302 "average_get": "2.5ms",
303 "hit_ratio": {
304 "mem": 94
305 }
306 },
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200307 "adv_bases": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200308 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200309 "entries": {},
310 "hit_ratio": {}
311 },
312 "change_kind": {
313 "type": "DISK",
314 "entries": {
315 "space": "0.00k"
316 },
317 "hit_ratio": {}
318 },
319 "changes": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200320 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200321 "entries": {},
322 "hit_ratio": {}
323 },
324 "conflicts": {
325 "type": "DISK",
326 "entries": {
327 "mem": 2,
328 "disk": 3,
329 "space": "2.75k"
330 },
331 "hit_ratio": {
332 "mem": 0,
333 "disk": 100
334 }
335 },
336 "diff": {
337 "type": "DISK",
338 "entries": {
339 "mem": 177,
340 "disk": 253,
341 "space": "170.97k"
342 },
343 "average_get": "1.1ms",
344 "hit_ratio": {
345 "mem": 67,
346 "disk": 100
347 }
348 },
349 "diff_intraline": {
350 "type": "DISK",
351 "entries": {
352 "mem": 1,
353 "disk": 1,
354 "space": "0.37k"
355 },
356 "average_get": "6.8ms",
357 "hit_ratio": {
358 "mem": 0
359 }
360 },
361 "git_tags": {
362 "type": "DISK",
363 "entries": {
364 "space": "0.00k"
365 },
366 "hit_ratio": {}
367 },
368 groups": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200369 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200370 "entries": {
371 "mem": 27
372 },
373 "average_get": "183.2us",
374 "hit_ratio": {
375 "mem": 12
376 }
377 },
Alice Kober-Sotzek864ed142017-10-12 14:24:36 +0200378 "groups_bymember": {
379 "type": "MEM",
380 "entries": {},
381 "hit_ratio": {}
382 },
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200383 "groups_byname": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200384 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200385 "entries": {},
386 "hit_ratio": {}
387 },
Alice Kober-Sotzek3e1fe1b2017-10-12 14:44:17 +0200388 "groups_bysubgroup": {
389 "type": "MEM",
390 "entries": {},
391 "hit_ratio": {}
392 },
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200393 "groups_byuuid": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200394 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200395 "entries": {
396 "mem": 25
397 },
398 "average_get": "173.4us",
399 "hit_ratio": {
400 "mem": 13
401 }
402 },
403 "groups_external": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200404 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200405 "entries": {},
406 "hit_ratio": {}
407 },
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200408 "permission_sort": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200409 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200410 "entries": {
411 "mem": 16
412 },
413 "hit_ratio": {
414 "mem": 96
415 }
416 },
417 "plugin_resources": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200418 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200419 "entries": {
420 "mem": 2
421 },
422 "hit_ratio": {
423 "mem": 83
424 }
425 },
426 "project_list": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200427 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200428 "entries": {
429 "mem": 1
430 },
431 "average_get": "18.6ms",
432 "hit_ratio": {
433 "mem": 0
434 }
435 },
436 "projects": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200437 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200438 "entries": {
439 "mem": 35
440 },
441 "average_get": "8.6ms",
442 "hit_ratio": {
443 "mem": 99
444 }
445 },
Dave Borowitz08aa8bb2018-04-05 12:01:06 -0400446 "prolog_rules": {
447 "type": "MEM",
448 "entries": {
449 "mem": 35
450 },
451 "average_get": "103.0ms",
452 "hit_ratio": {
453 "mem": 99
454 }
455 },
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200456 "quota-repo_size": {
457 "type": "DISK",
458 "entries": {
459 "space": "0.00k"
460 },
461 "hit_ratio": {}
462 },
463 "sshkeys": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200464 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200465 "entries": {
466 "mem": 1
467 },
468 "average_get": "3.2ms",
469 "hit_ratio": {
470 "mem": 50
471 }
472 },
473 "web_sessions": {
474 "type": "DISK",
475 "entries": {
476 "mem": 1,
477 "disk": 2,
478 "space": "0.78k"
479 },
480 "hit_ratio": {
481 "mem": 82
482 }
483 }
484 }
485----
486
Edwin Kempin8dd94122014-05-28 12:04:17 +0200487It is possible to get different output formats by specifying the
488`format` option:
489
490* `LIST`:
491+
492Returns the cache names as JSON list.
493+
David Pursehouse33a3c252016-11-15 16:55:33 -0800494The cache names are lexicographically sorted.
Edwin Kempin8dd94122014-05-28 12:04:17 +0200495+
496.Request
497----
498 GET /config/server/caches/?format=LIST HTTP/1.0
499----
500+
501.Response
502----
503 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900504 Content-Type: application/json; charset=UTF-8
Edwin Kempin8dd94122014-05-28 12:04:17 +0200505
506 )]}'
507 [
508 "accounts",
Edwin Kempin8dd94122014-05-28 12:04:17 +0200509 "adv_bases",
510 "change_kind",
511 "changes",
512 "conflicts",
513 "diff",
514 "diff_intraline",
515 "git_tags",
516 "groups",
Alice Kober-Sotzek864ed142017-10-12 14:24:36 +0200517 "groups_bymember",
Edwin Kempin8dd94122014-05-28 12:04:17 +0200518 "groups_byname",
Alice Kober-Sotzek3e1fe1b2017-10-12 14:44:17 +0200519 "groups_bysubgroup",
Edwin Kempin8dd94122014-05-28 12:04:17 +0200520 "groups_byuuid",
521 "groups_external",
Edwin Kempin8dd94122014-05-28 12:04:17 +0200522 "permission_sort",
523 "plugin_resources",
524 "project_list",
525 "projects",
Dave Borowitz08aa8bb2018-04-05 12:01:06 -0400526 "prolog_rules",
Edwin Kempin8dd94122014-05-28 12:04:17 +0200527 "quota-repo_size",
528 "sshkeys",
529 "web_sessions"
530 ]
531----
532
533* `TEXT_LIST`:
534+
535Returns the cache names as a UTF-8 list that is base64 encoded. The
536cache names are delimited by '\n'.
537+
538The cache names are lexicographically sorted.
539+
540.Request
541----
542 GET /config/server/caches/?format=TEXT_LIST HTTP/1.0
543----
544+
545.Response
546----
547 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900548 Content-Type: text/plain; charset=UTF-8
Edwin Kempin8dd94122014-05-28 12:04:17 +0200549
550 YWNjb3VudHMKYW...ViX3Nlc3Npb25z
551----
552+
553E.g. this could be used to flush all caches:
554+
555----
Han-Wen Nienhuys84d830b2017-02-15 16:36:04 +0100556 for c in $(curl --user jdoe:TNAuLkXsIV7w http://gerrit/a/config/server/caches/?format=TEXT_LIST | base64 -D)
Edwin Kempin8dd94122014-05-28 12:04:17 +0200557 do
Han-Wen Nienhuys84d830b2017-02-15 16:36:04 +0100558 curl --user jdoe:TNAuLkXsIV7w -X POST http://gerrit/a/config/server/caches/$c/flush
Edwin Kempin8dd94122014-05-28 12:04:17 +0200559 done
560----
561
David Pursehousea012b012014-07-10 14:00:40 +0900562[[cache-operations]]
Edwin Kempina4286832014-05-28 14:17:22 +0200563=== Cache Operations
564--
565'POST /config/server/caches/'
566--
567
568Executes a cache operation that is specified in the request body in a
569link:#cache-operation-input[CacheOperationInput] entity.
570
571[[flush-all-caches]]
572==== Flush All Caches
573
574.Request
575----
576 POST /config/server/caches/ HTTP/1.0
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900577 Content-Type: application/json; charset=UTF-8
Edwin Kempina4286832014-05-28 14:17:22 +0200578
579 {
580 "operation": "FLUSH_ALL"
581 }
582----
583
584.Response
585----
586 HTTP/1.1 200 OK
587----
588
Edwin Kempina3c6d032014-05-28 14:46:44 +0200589[[flush-several-caches]]
590==== Flush Several Caches At Once
591
592.Request
593----
594 POST /config/server/caches/ HTTP/1.0
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900595 Content-Type: application/json; charset=UTF-8
Edwin Kempina3c6d032014-05-28 14:46:44 +0200596
597 {
Adrian Görler25125102014-08-13 15:00:44 +0200598 "operation": "FLUSH",
Edwin Kempina3c6d032014-05-28 14:46:44 +0200599 "caches": [
600 "projects",
601 "project_list"
602 ]
603 }
604----
605
606.Response
607----
608 HTTP/1.1 200 OK
609----
610
Edwin Kempin57a46822014-05-23 10:24:41 +0200611[[get-cache]]
612=== Get Cache
613--
614'GET /config/server/caches/link:#cache-name[\{cache-name\}]'
615--
616
617Retrieves information about a cache.
618
Dave Borowitz664d0402015-06-11 15:35:48 -0400619The caller must be a member of a group that is granted one of the
620following capabilities:
621
622* link:access-control.html#capability_viewCaches[View Caches]
623* link:access-control.html#capability_maintainServer[Maintain Server]
624* link:access-control.html#capability_administrateServer[Administrate Server]
Edwin Kempin57a46822014-05-23 10:24:41 +0200625
626As result a link:#cache-info[CacheInfo] entity is returned.
627
628.Request
629----
630 GET /config/server/caches/projects HTTP/1.0
631----
632
633.Response
634----
635 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900636 Content-Type: application/json; charset=UTF-8
Edwin Kempin57a46822014-05-23 10:24:41 +0200637
638 )]}'
639 {
640 "name": "projects",
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200641 "type": "MEM",
Edwin Kempin57a46822014-05-23 10:24:41 +0200642 "entries": {
643 "mem": 35
644 },
645 "average_get": " 8.6ms",
646 "hit_ratio": {
647 "mem": 99
648 }
649 }
650----
651
Edwin Kempin37cc41a2014-05-23 10:52:20 +0200652[[flush-cache]]
653=== Flush Cache
654--
655'POST /config/server/caches/link:#cache-name[\{cache-name\}]/flush'
656--
657
658Flushes a cache.
659
Dave Borowitz664d0402015-06-11 15:35:48 -0400660The caller must be a member of a group that is granted one of the
661following capabilities:
Edwin Kempin37cc41a2014-05-23 10:52:20 +0200662
Dave Borowitz664d0402015-06-11 15:35:48 -0400663* link:access-control.html#capability_flushCaches[Flush Caches] (any cache
664 except "web_sessions")
665* link:access-control.html#capability_maintainServer[Maintain Server] (any cache
666 including "web_sessions")
667* link:access-control.html#capability_administrateServer[Administrate Server]
668 (any cache including "web_sessions")
Edwin Kempin37cc41a2014-05-23 10:52:20 +0200669
670.Request
671----
672 POST /config/server/caches/projects/flush HTTP/1.0
673----
674
675.Response
676----
677 HTTP/1.1 200 OK
678----
679
Edwin Kempind905e582014-05-28 16:54:36 +0200680[[get-summary]]
681=== Get Summary
682--
683'GET /config/server/summary'
684--
685
686Retrieves a summary of the current server state.
687
688The caller must be a member of a group that is granted the
689link:access-control.html#capability_administrateServer[Administrate
690Server] capability.
691
692The following options are supported:
693
694* `jvm`:
695+
696Includes a JVM summary.
697
698* `gc`:
699+
700Requests a Java garbage collection before computing the information
701about the Java memory heap.
702
703.Request
704----
705 GET /config/server/summary?jvm HTTP/1.0
706----
707
708As result a link:#summary-info[SummaryInfo] entity is returned.
709
710.Response
711----
712 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900713 Content-Type: application/json; charset=UTF-8
Edwin Kempind905e582014-05-28 16:54:36 +0200714
715 )]}'
716 {
717 "task_summary": {
718 "total": 2,
719 "sleeping": 2
720 },
721 "mem_summary": {
722 "total": "341.06m",
723 "used": "57.16m",
724 "free": "283.90m",
725 "buffers": "0.00k",
726 "max": "1.67g",
727 }
728 "thread_summary": {
729 "cpus": 8,
730 "threads": 44,
731 "counts": {
732 "HTTP": {
733 "RUNNABLE": 3,
734 "TIMED_WAITING": 2
735 },
736 "SSH-Interactive-Worker": {
737 "WAITING": 1
738 },
739 "Other": {
740 "WAITING": 10,
741 "RUNNABLE": 2,
742 "TIMED_WAITING": 25
743 },
744 "SshCommandStart": {
745 "WAITING": 1
746 }
747 }
748 },
749 "jvm_summary": {
750 "vm_vendor": "Oracle Corporation",
751 "vm_name": "Java HotSpot(TM) 64-Bit Server VM",
752 "vm_version": "23.25-b01",
753 "os_name": "Mac OS X",
754 "os_version": "10.8.5",
755 "os_arch": "x86_64",
756 "user": "gerrit",
757 "host": "GERRIT",
758 "current_working_directory": "/Users/gerrit/site",
759 "site": "/Users/gerrit/site"
760 }
761 }
762----
763
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200764[[list-capabilities]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800765=== List Capabilities
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800766--
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200767'GET /config/server/capabilities'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800768--
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200769
David Pursehouse538a1b92013-06-12 10:45:54 +0200770Lists the capabilities that are available in the system. There are two
771kinds of capabilities: core and plugin-owned capabilities.
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200772
David Pursehouse538a1b92013-06-12 10:45:54 +0200773As result a map of link:#capability-info[CapabilityInfo] entities is
774returned.
775
776The entries in the map are sorted by capability ID.
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200777
778.Request
779----
780 GET /config/server/capabilities/ HTTP/1.0
781----
782
783.Response
784----
785 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900786 Content-Type: application/json; charset=UTF-8
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200787
788 )]}'
789 {
790 "accessDatabase": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200791 "id": "accessDatabase",
792 "name": "Access Database"
793 },
794 "administrateServer": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200795 "id": "administrateServer",
796 "name": "Administrate Server"
797 },
798 "createAccount": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200799 "id": "createAccount",
800 "name": "Create Account"
801 },
802 "createGroup": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200803 "id": "createGroup",
804 "name": "Create Group"
805 },
806 "createProject": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200807 "id": "createProject",
808 "name": "Create Project"
809 },
810 "emailReviewers": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200811 "id": "emailReviewers",
812 "name": "Email Reviewers"
813 },
814 "flushCaches": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200815 "id": "flushCaches",
816 "name": "Flush Caches"
817 },
818 "killTask": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200819 "id": "killTask",
820 "name": "Kill Task"
821 },
822 "priority": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200823 "id": "priority",
824 "name": "Priority"
825 },
826 "queryLimit": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200827 "id": "queryLimit",
828 "name": "Query Limit"
829 },
830 "runGC": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200831 "id": "runGC",
832 "name": "Run Garbage Collection"
833 },
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200834 "streamEvents": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200835 "id": "streamEvents",
836 "name": "Stream Events"
837 },
838 "viewCaches": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200839 "id": "viewCaches",
840 "name": "View Caches"
841 },
842 "viewConnections": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200843 "id": "viewConnections",
844 "name": "View Connections"
845 },
Edwin Kempin362b14d12014-05-09 14:18:12 +0200846 "viewPlugins": {
Edwin Kempin362b14d12014-05-09 14:18:12 +0200847 "id": "viewPlugins",
848 "name": "View Plugins"
849 },
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200850 "viewQueue": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200851 "id": "viewQueue",
852 "name": "View Queue"
853 }
854 }
855----
856
Edwin Kempin49098b82014-06-10 22:55:13 +0200857[[list-tasks]]
858=== List Tasks
859--
860'GET /config/server/tasks/'
861--
862
863Lists the tasks from the background work queues that the Gerrit daemon
864is currently performing, or will perform in the near future.
865
866Gerrit contains an internal scheduler, similar to cron, that it uses to
867queue and dispatch both short and long term tasks.
868
869Tasks that are completed or canceled exit the queue very quickly once
870they enter this state, but it can be possible to observe tasks in these
871states.
872
873End-users may see a task only if they can also see the project the task
874is associated with. Tasks operating on other projects, or that do not
875have a specific project, are hidden.
876
Dave Borowitz664d0402015-06-11 15:35:48 -0400877The caller must be a member of a group that is granted one of the
878following capabilities:
879
880* link:access-control.html#capability_viewQueue[View Queue]
881* link:access-control.html#capability_maintainServer[Maintain Server]
882* link:access-control.html#capability_administrateServer[Administrate Server]
Edwin Kempin49098b82014-06-10 22:55:13 +0200883
884As result a list of link:#task-info[TaskInfo] entities is returned.
885
886The entries in the list are sorted by task state, remaining delay and
887command.
888
889.Request
890----
891 GET /config/server/tasks/ HTTP/1.0
892----
893
894.Response
895----
896 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900897 Content-Type: application/json; charset=UTF-8
Edwin Kempin49098b82014-06-10 22:55:13 +0200898
899 )]}'
900 [
901 {
902 "id": "1e688bea",
903 "state": "SLEEPING",
904 "start_time": "2014-06-11 12:58:51.991000000",
905 "delay": 3453,
906 "command": "Reload Submit Queue"
907 },
908 {
909 "id": "3e6d4ffa",
910 "state": "SLEEPING",
911 "start_time": "2014-06-11 12:58:51.508000000",
912 "delay": 3287966,
913 "command": "Log File Compressor"
914 }
915 ]
916----
917
Edwin Kempin32e3a522014-07-08 12:10:31 +0200918[[get-task]]
919=== Get Task
920--
921'GET /config/server/tasks/link:#task-id[\{task-id\}]'
922--
923
924Retrieves a task from the background work queue that the Gerrit daemon
925is currently performing, or will perform in the near future.
926
927End-users may see a task only if they can also see the project the task
928is associated with. Tasks operating on other projects, or that do not
929have a specific project, are hidden.
930
Dave Borowitz664d0402015-06-11 15:35:48 -0400931The caller must be a member of a group that is granted one of the
932following capabilities:
933
934* link:access-control.html#capability_viewQueue[View Queue]
935* link:access-control.html#capability_maintainServer[Maintain Server]
936* link:access-control.html#capability_administrateServer[Administrate Server]
Edwin Kempin32e3a522014-07-08 12:10:31 +0200937
938As result a link:#task-info[TaskInfo] entity is returned.
939
940.Request
941----
942 GET /config/server/tasks/1e688bea HTTP/1.0
943----
944
945.Response
946----
947 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900948 Content-Type: application/json; charset=UTF-8
Edwin Kempin32e3a522014-07-08 12:10:31 +0200949
950 )]}'
951 {
952 "id": "1e688bea",
953 "state": "SLEEPING",
954 "start_time": "2014-06-11 12:58:51.991000000",
955 "delay": 3453,
956 "command": "Reload Submit Queue"
957 }
958----
959
Edwin Kempin7e283812014-07-08 12:49:03 +0200960[[delete-task]]
961=== Delete Task
962--
963'DELETE /config/server/tasks/link:#task-id[\{task-id\}]'
964--
965
966Kills a task from the background work queue that the Gerrit daemon
967is currently performing, or will perform in the near future.
968
Dave Borowitz664d0402015-06-11 15:35:48 -0400969The caller must be a member of a group that is granted one of the
970following capabilities:
971
972* link:access-control.html#capability_kill[Kill Task]
973* link:access-control.html#capability_maintainServer[Maintain Server]
974* link:access-control.html#capability_administrateServer[Administrate Server]
Edwin Kempin7e283812014-07-08 12:49:03 +0200975
976End-users may see a task only if they can also see the project the task
977is associated with. Tasks operating on other projects, or that do not
978have a specific project, are hidden.
979
Dave Borowitz664d0402015-06-11 15:35:48 -0400980Members of a group granted one of the following capabilities may view
981all tasks:
982
983* link:access-control.html#capability_viewQueue[View Queue]
984* link:access-control.html#capability_maintainServer[Maintain Server]
985* link:access-control.html#capability_administrateServer[Administrate Server]
Edwin Kempin7e283812014-07-08 12:49:03 +0200986
987.Request
988----
989 DELETE /config/server/tasks/1e688bea HTTP/1.0
990----
991
992.Response
993----
994 HTTP/1.1 204 No Content
995----
996
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +0200997[[get-top-menus]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800998=== Get Top Menus
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800999--
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001000'GET /config/server/top-menus'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001001--
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001002
1003Returns the list of additional top menu entries.
1004
1005.Request
1006----
1007 GET /config/server/top-menus HTTP/1.0
1008----
1009
1010As response a list of the additional top menu entries as
1011link:#top-menu-entry-info[TopMenuEntryInfo] entities is returned.
1012
1013.Response
1014----
1015 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +09001016 Content-Type: application/json; charset=UTF-8
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001017
1018 )]}'
1019 [
1020 {
1021 "name": "Top Menu Entry",
1022 "items": [
1023 {
1024 "url": "http://gerrit.googlecode.com/",
1025 "name": "Gerrit",
1026 "target": "_blank"
1027 }
1028 ]
1029 }
1030 ]
1031----
1032
Edwin Kempine9f5da32016-06-03 17:08:34 +02001033[[get-user-preferences]]
1034=== Get Default User Preferences
1035--
1036'GET /config/server/preferences'
1037--
1038
1039Returns the default user preferences for the server.
1040
1041.Request
1042----
1043 GET /a/config/server/preferences HTTP/1.0
1044----
1045
1046As response a link:rest-api-accounts.html#preferences-info[
1047PreferencesInfo] is returned.
1048
1049.Response
1050----
1051 HTTP/1.1 200 OK
1052 Content-Type: application/json; charset=UTF-8
1053
1054 )]}'
1055 {
1056 "changes_per_page": 25,
Edwin Kempine9f5da32016-06-03 17:08:34 +02001057 "download_command": "CHECKOUT",
1058 "date_format": "STD",
1059 "time_format": "HHMM_12",
1060 "diff_view": "SIDE_BY_SIDE",
1061 "size_bar_in_change_table": true,
Edwin Kempine9f5da32016-06-03 17:08:34 +02001062 "mute_common_path_prefixes": true,
Dave Borowitzd6ee48e2017-04-27 10:32:42 -04001063 "publish_comments_on_push": true,
Edwin Kempine9f5da32016-06-03 17:08:34 +02001064 "my": [
1065 {
1066 "url": "#/dashboard/self",
1067 "name": "Changes"
1068 },
1069 {
Edwin Kempine9f5da32016-06-03 17:08:34 +02001070 "url": "#/q/has:draft",
1071 "name": "Draft Comments"
1072 },
1073 {
1074 "url": "#/q/has:edit",
1075 "name": "Edits"
1076 },
1077 {
1078 "url": "#/q/is:watched+is:open",
1079 "name": "Watched Changes"
1080 },
1081 {
1082 "url": "#/q/is:starred",
1083 "name": "Starred Changes"
1084 },
1085 {
1086 "url": "#/groups/self",
1087 "name": "Groups"
1088 }
1089 ],
1090 "email_strategy": "ENABLED"
1091 }
1092----
1093
1094[[set-user-preferences]]
1095=== Set Default User Preferences
1096
1097--
1098'PUT /config/server/preferences'
1099--
1100
1101Sets the default user preferences for the server.
1102
1103The new user preferences must be provided in the request body as a
1104link:rest-api-accounts.html#preferences-input[PreferencesInput]
1105entity.
1106
1107To be allowed to set default preferences, a user must be a member of
1108a group that is granted the
1109link:access-control.html#capability_administrateServer[
1110Administrate Server] capability.
1111
1112.Request
1113----
1114 PUT /a/config/server/preferences HTTP/1.0
1115 Content-Type: application/json; charset=UTF-8
1116
1117 {
1118 "changes_per_page": 50
1119 }
1120----
1121
1122As response a link:rest-api-accounts.html#preferences-info[
1123PreferencesInfo] is returned.
1124
1125.Response
1126----
1127 HTTP/1.1 200 OK
1128 Content-Type: application/json; charset=UTF-8
1129
1130 )]}'
1131 {
1132 "changes_per_page": 50,
Edwin Kempine9f5da32016-06-03 17:08:34 +02001133 "download_command": "CHECKOUT",
1134 "date_format": "STD",
1135 "time_format": "HHMM_12",
1136 "diff_view": "SIDE_BY_SIDE",
1137 "size_bar_in_change_table": true,
Edwin Kempine9f5da32016-06-03 17:08:34 +02001138 "mute_common_path_prefixes": true,
Dave Borowitzd6ee48e2017-04-27 10:32:42 -04001139 "publish_comments_on_push": true,
Edwin Kempine9f5da32016-06-03 17:08:34 +02001140 "my": [
1141 {
1142 "url": "#/dashboard/self",
1143 "name": "Changes"
1144 },
1145 {
Edwin Kempine9f5da32016-06-03 17:08:34 +02001146 "url": "#/q/has:draft",
1147 "name": "Draft Comments"
1148 },
1149 {
1150 "url": "#/q/has:edit",
1151 "name": "Edits"
1152 },
1153 {
1154 "url": "#/q/is:watched+is:open",
1155 "name": "Watched Changes"
1156 },
1157 {
1158 "url": "#/q/is:starred",
1159 "name": "Starred Changes"
1160 },
1161 {
1162 "url": "#/groups/self",
1163 "name": "Groups"
1164 }
1165 ],
1166 "email_strategy": "ENABLED"
1167 }
1168----
1169
Sven Selbergc60abbd2016-05-17 15:26:33 +02001170[[get-diff-preferences]]
Edwin Kempinc8b90342016-06-23 13:20:52 +02001171=== Get Default Diff Preferences
Sven Selbergc60abbd2016-05-17 15:26:33 +02001172
1173--
1174'GET /config/server/preferences.diff'
1175--
1176
1177Returns the default diff preferences for the server.
1178
1179.Request
1180----
1181 GET /a/config/server/preferences.diff HTTP/1.0
1182----
1183
1184As response a link:rest-api-accounts.html#diff-preferences-info[
1185DiffPreferencesInfo] is returned.
1186
1187.Response
1188----
1189 HTTP/1.1 200 OK
1190 Content-Type: application/json; charset=UTF-8
1191
1192 )]}'
1193 {
1194 "context": 10,
1195 "tab_size": 8,
1196 "line_length": 100,
1197 "cursor_blink_rate": 0,
1198 "intraline_difference": true,
1199 "show_line_endings": true,
1200 "show_tabs": true,
1201 "show_whitespace_errors": true,
1202 "syntax_highlighting": true,
1203 "auto_hide_diff_table_header": true,
1204 "theme": "DEFAULT",
1205 "ignore_whitespace": "IGNORE_NONE"
1206 }
1207----
1208
1209[[set-diff-preferences]]
Edwin Kempinc8b90342016-06-23 13:20:52 +02001210=== Set Default Diff Preferences
Sven Selbergc60abbd2016-05-17 15:26:33 +02001211
1212--
1213'PUT /config/server/preferences.diff'
1214--
1215
Edwin Kempinc8b90342016-06-23 13:20:52 +02001216Sets the default diff preferences for the server.
1217
1218The new diff preferences must be provided in the request body as a
1219link:rest-api-accounts.html#diff-preferences-input[
1220DiffPreferencesInput] entity.
1221
1222To be allowed to set default diff preferences, a user must be a member
1223of a group that is granted the
1224link:access-control.html#capability_administrateServer[
1225Administrate Server] capability.
Sven Selbergc60abbd2016-05-17 15:26:33 +02001226
1227.Request
1228----
1229 PUT /a/config/server/preferences.diff HTTP/1.0
1230 Content-Type: application/json; charset=UTF-8
1231
1232 {
1233 "context": 10,
1234 "tab_size": 8,
1235 "line_length": 80,
1236 "cursor_blink_rate": 0,
1237 "intraline_difference": true,
1238 "show_line_endings": true,
1239 "show_tabs": true,
1240 "show_whitespace_errors": true,
1241 "syntax_highlighting": true,
1242 "auto_hide_diff_table_header": true,
1243 "theme": "DEFAULT",
1244 "ignore_whitespace": "IGNORE_NONE"
1245 }
1246----
1247
1248As response a link:rest-api-accounts.html#diff-preferences-info[
1249DiffPreferencesInfo] is returned.
1250
1251.Response
1252----
1253 HTTP/1.1 200 OK
1254 Content-Type: application/json; charset=UTF-8
1255
1256 )]}'
1257 {
1258 "context": 10,
1259 "tab_size": 8,
1260 "line_length": 80,
1261 "cursor_blink_rate": 0,
1262 "intraline_difference": true,
1263 "show_line_endings": true,
1264 "show_tabs": true,
1265 "show_whitespace_errors": true,
1266 "syntax_highlighting": true,
1267 "auto_hide_diff_table_header": true,
1268 "theme": "DEFAULT",
1269 "ignore_whitespace": "IGNORE_NONE"
1270 }
1271----
1272
Edwin Kempin1e01692e2018-01-17 11:01:00 +01001273[[get-edit-preferences]]
1274=== Get Default Edit Preferences
1275
1276--
1277'GET /config/server/preferences.edit'
1278--
1279
1280Returns the default edit preferences for the server.
1281
1282.Request
1283----
1284 GET /a/config/server/preferences.edit HTTP/1.0
1285----
1286
1287As response a link:rest-api-accounts.html#edit-preferences-info[
1288EditPreferencesInfo] is returned.
1289
1290.Response
1291----
1292 HTTP/1.1 200 OK
1293 Content-Type: application/json; charset=UTF-8
1294
1295 )]}'
1296 {
1297 "tab_size": 8,
1298 "line_length": 100,
1299 "indent_unit": 2,
1300 "cursor_blink_rate": 0,
1301 "show_tabs": true,
1302 "syntax_highlighting": true,
1303 "match_brackets": true,
1304 "auto_close_brackets": true,
1305 "theme": "DEFAULT",
1306 "key_map_type": "DEFAULT"
1307 }
1308----
1309
1310[[set-edit-preferences]]
1311=== Set Default Edit Preferences
1312
1313--
1314'PUT /config/server/preferences.edit'
1315--
1316
1317Sets the default edit preferences for the server.
1318
1319The new edit preferences must be provided in the request body as a
1320link:rest-api-accounts.html#edit-preferences-input[
1321EditPreferencesInput] entity.
1322
1323To be allowed to set default edit preferences, a user must be a member
1324of a group that is granted the
1325link:access-control.html#capability_administrateServer[
1326Administrate Server] capability.
1327
1328.Request
1329----
1330 PUT /a/config/server/preferences.edit HTTP/1.0
1331 Content-Type: application/json; charset=UTF-8
1332
1333 {
1334 "tab_size": 8,
1335 "line_length": 80,
1336 "indent_unit": 2,
1337 "cursor_blink_rate": 0,
1338 "show_tabs": true,
1339 "syntax_highlighting": true,
1340 "match_brackets": true,
1341 "auto_close_brackets": true,
1342 "theme": "DEFAULT",
1343 "key_map_type": "DEFAULT"
1344 }
1345----
1346
1347As response a link:rest-api-accounts.html#edit-preferences-info[
1348EditPreferencesInfo] is returned.
1349
1350.Response
1351----
1352 HTTP/1.1 200 OK
1353 Content-Type: application/json; charset=UTF-8
1354
1355 )]}'
1356 {
1357 "tab_size": 8,
1358 "line_length": 80,
1359 "indent_unit": 2,
1360 "cursor_blink_rate": 0,
1361 "show_tabs": true,
1362 "syntax_highlighting": true,
1363 "match_brackets": true,
1364 "auto_close_brackets": true,
1365 "theme": "DEFAULT",
1366 "key_map_type": "DEFAULT"
1367 }
1368----
1369
Saša Živkove9223062019-09-05 10:31:41 +02001370[[index.changes]]
1371=== Index a set of changes
1372
1373This endpoint allows Gerrit admins to index a set of changes with one request
1374by providing a link:#index-changes-input[IndexChangesInput] entity.
1375
1376Using this endpoint Gerrit admins can also index change(s) which are not visible to them.
1377
1378.Request
1379----
1380 POST /config/server/index.changes HTTP/1.0
1381 Content-Type: application/json; charset=UTF-8
1382
Saša Živkovb50ba02c2022-04-29 10:17:43 +02001383 {
1384 "changes": [
1385 "foo~101",
1386 "bar~202",
1387 "303"
1388 ],
1389 "delete_missing": "true"
1390 }
Saša Živkove9223062019-09-05 10:31:41 +02001391----
1392
1393.Response
1394----
1395 HTTP/1.1 200 OK
1396 Content-Disposition: attachment
1397----
1398
Saša Živkovb50ba02c2022-04-29 10:17:43 +02001399When `delete_missing` is set to `true` changes to be reindexed which are missing in NoteDb
1400will be deleted in the index.
1401
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001402
Edwin Kempin57a46822014-05-23 10:24:41 +02001403[[ids]]
1404== IDs
1405
1406[[cache-name]]
1407=== \{cache-name\}
1408The name of the cache.
1409
1410If the cache is defined by a plugin the cache name must include the
1411plugin name: "<plugin-name>-<cache-name>".
1412
1413Gerrit core caches can optionally be prefixed with "gerrit":
1414"gerrit-<cache-name>".
1415
Edwin Kempin32e3a522014-07-08 12:10:31 +02001416[[task-id]]
1417=== \{task-id\}
1418The ID of the task (hex string).
1419
Edwin Kempin57a46822014-05-23 10:24:41 +02001420
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001421[[json-entities]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001422== JSON Entities
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001423
Edwin Kempinf0dacbd2017-08-30 16:17:17 +02001424[[accounts-config-info]]
1425=== AccountsConfigInfo
1426The `AccountsConfigInfo` entity contains information about Gerrit
1427configuration from the link:config-gerrit.html#accounts[accounts]
1428section.
1429
1430[options="header",cols="1,6"]
1431|=============================
Ben Rohlfs99f16a12020-02-11 19:44:17 +01001432|Field Name |Description
1433|`visibility` |
Edwin Kempinf0dacbd2017-08-30 16:17:17 +02001434link:config-gerrit.html#accounts.visibility[Visibility setting for
1435accounts].
Ben Rohlfs99f16a12020-02-11 19:44:17 +01001436|`default_display_name`|The default strategy for choosing the display
1437name in the UI, see also
1438link:config-gerrit.html#accounts.defaultDisplayName[gerrit.config].
Edwin Kempinf0dacbd2017-08-30 16:17:17 +02001439|=============================
Han-Wen Nienhuyse04df7e2017-04-25 17:41:58 +02001440
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001441[[auth-info]]
1442=== AuthInfo
1443The `AuthInfo` entity contains information about the authentication
1444configuration of the Gerrit server.
1445
1446[options="header",cols="1,^1,5"]
1447|==========================================
1448|Field Name ||Description
1449|`type` ||
1450The link:config-gerrit.html#auth.type[authentication type] that is
1451configured on the server. Can be `OPENID`, `OPENID_SSO`, `OAUTH`,
1452`HTTP`, `HTTP_LDAP`, `CLIENT_SSL_CERT_LDAP`, `LDAP`, `LDAP_BIND`,
1453`CUSTOM_EXTENSION` or `DEVELOPMENT_BECOME_ANY_ACCOUNT`.
1454|`use_contributor_agreements` |not set if `false`|
1455Whether link:config-gerrit.html#auth.contributorAgreements[contributor
1456agreements] are required.
David Pursehousecc046732016-08-22 20:08:52 +09001457|`contributor_agreements` |not set if `use_contributor_agreements` is `false`|
1458List of contributor agreements as link:rest-api-accounts.html#contributor-agreement-info[
1459ContributorAgreementInfo] entities.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001460|`editable_account_fields` ||
1461List of account fields that are editable. Possible values are
1462`FULL_NAME`, `USER_NAME` and `REGISTER_NEW_EMAIL`.
Edwin Kempin5a8c9e92015-05-08 10:59:01 +02001463|`login_url` |optional|
1464The link:config-gerrit.html#auth.loginUrl[login URL]. Only set if
1465link:config-gerrit.html#auth.type[authentication type] is `HTTP` or
1466`HTTP_LDAP`.
1467|`login_text` |optional|
1468The link:config-gerrit.html#auth.loginText[login text]. Only set if
1469link:config-gerrit.html#auth.type[authentication type] is `HTTP` or
1470`HTTP_LDAP`.
1471|`switch_account_url` |optional|
1472The link:config-gerrit.html#auth.switchAccountUrl[URL to switch
1473accounts].
1474|`register_url` |optional|
1475The link:config-gerrit.html#auth.registerUrl[register URL]. Only set if
1476link:config-gerrit.html#auth.type[authentication type] is `LDAP`,
1477`LDAP_BIND` or `CUSTOM_EXTENSION`.
1478|`register_text` |optional|
1479The link:config-gerrit.html#auth.registerText[register text]. Only set
1480if link:config-gerrit.html#auth.type[authentication type] is `LDAP`,
1481`LDAP_BIND` or `CUSTOM_EXTENSION`.
1482|`edit_full_name_url` |optional|
1483The link:config-gerrit.html#auth.editFullNameUrl[URL to edit the full
1484name]. Only set if link:config-gerrit.html#auth.type[authentication
1485type] is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`.
1486|`http_password_url` |optional|
1487The link:config-gerrit.html#auth.httpPasswordUrl[URL to obtain an HTTP
1488password]. Only set if link:config-gerrit.html#auth.type[authentication
1489type] is `CUSTOM_EXTENSION`.
Hector Oswaldo Caballero2a9ad1f2016-09-15 18:24:42 -04001490|`git_basic_auth_policy` |optional|
1491The link:config-gerrit.html#auth.gitBasicAuthPolicy[policy] to authenticate
1492Git over HTTP and REST API requests when
Edwin Kempin02551c02019-12-31 11:08:38 +01001493link:config-gerrit.html#auth.type[authentication type] is `LDAP`,
1494`LDAP_BIND` or `OAUTH`. Can be `HTTP`, `LDAP`, `HTTP_LDAP` or `OAUTH`.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001495|==========================================
1496
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001497[[cache-info]]
1498=== CacheInfo
1499The `CacheInfo` entity contains information about a cache.
1500
David Pursehouseae367192014-11-25 17:24:47 +09001501[options="header",cols="1,^1,5"]
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001502|==================================
1503|Field Name ||Description
1504|`name` |
1505not set if returned in a map where the cache name is used as map key|
1506The cache name. If the cache is defined by a plugin the cache name
1507includes the plugin name: "<plugin-name>-<cache-name>".
Edwin Kempinf11eadc2014-06-24 15:23:52 +02001508|`type` ||
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001509The type of the cache (`MEM`: in memory cache, `DISK`: disk cache).
1510|`entries` ||
1511Information about the entries in the cache as a
1512link:#entries-info[EntriesInfo] entity.
1513|`average_get` |optional|
1514The average duration of getting one entry from the cache. The value is
1515returned with a standard time unit abbreviation (`ns`: nanoseconds,
1516`us`: microseconds, `ms`: milliseconds, `s`: seconds).
1517|`hit_ratio` ||
1518Information about the hit ratio as a link:#hit-ration-info[
1519HitRatioInfo] entity.
1520|==================================
1521
Edwin Kempina4286832014-05-28 14:17:22 +02001522[[cache-operation-input]]
1523=== CacheOperationInput
1524The `CacheOperationInput` entity contains information about an
1525operation that should be executed on caches.
1526
David Pursehouseae367192014-11-25 17:24:47 +09001527[options="header",cols="1,^1,5"]
Edwin Kempina3c6d032014-05-28 14:46:44 +02001528|==================================
1529|Field Name ||Description
1530|`operation` ||
Edwin Kempina4286832014-05-28 14:17:22 +02001531The cache operation that should be executed:
1532
1533`FLUSH_ALL`: Flushes all caches, except the `web_sessions` cache.
Edwin Kempina3c6d032014-05-28 14:46:44 +02001534
1535`FLUSH`: Flushes the specified caches.
1536|`caches` |optional|
1537A list of cache names. This list defines the caches on which the
1538specified operation should be executed. Whether this list must be
1539specified depends on the operation being executed.
1540|==================================
Edwin Kempina4286832014-05-28 14:17:22 +02001541
Edwin Kempin521c1242015-01-23 12:44:44 +01001542[[capability-info]]
1543=== CapabilityInfo
1544The `CapabilityInfo` entity contains information about a capability.
1545
1546[options="header",cols="1,6"]
1547|=================================
1548|Field Name |Description
1549|`id` |capability ID
1550|`name` |capability name
1551|=================================
1552
Edwin Kempin50570542015-05-08 15:31:56 +02001553[[change-config-info]]
1554=== ChangeConfigInfo
1555The `ChangeConfigInfo` entity contains information about Gerrit
1556configuration from the link:config-gerrit.html#change[change]
1557section.
1558
1559[options="header",cols="1,^1,5"]
1560|=============================
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001561|Field Name ||Description
Gabor Somossyb72d4c62015-10-20 23:40:07 +01001562|`allow_blame` |not set if `false`|
1563link:config-gerrit.html#change.allowBlame[Whether blame on side by side diff is
1564allowed].
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001565|`update_delay` ||
Edwin Kempin50570542015-05-08 15:31:56 +02001566link:config-gerrit.html#change.updateDelay[How often in seconds the web
1567interface should poll for updates to the currently open change].
Edwin Kempin3450dde2019-08-23 10:36:57 +02001568|`submit_whole_topic` |not set if `false`|
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001569link:config-gerrit.html#change.submitWholeTopic[A configuration if
1570the whole topic is submitted].
Changcheng Xiao16095352017-12-18 10:03:08 +01001571|`disable_private_changes` |not set if `false`|
1572Returns true if private changes are disabled.
Patrick Hiesela4824db2019-12-20 10:55:26 +01001573|`mergeability_computation_behavior` ||
1574Value of the link:config-gerrit.html#change.mergeabilityComputationBehavior[
Edwin Kempin181eed22019-08-23 10:27:39 +02001575configuration parameter] that controls whether the mergeability bit in
Patrick Hiesela4824db2019-12-20 10:55:26 +01001576link:rest-api-changes.html#change-info[ChangeInfo] will never be set and if the
1577bit is indexed.
Ben Rohlfs2cc33542020-02-28 12:44:09 +01001578|`enable_attention_set` |defaults to `false`|
1579Returns true if attention set UI features are enabled.
1580|`enable_assignee` |defaults to `true`|
1581Returns true if assignee related UI features are enabled.
Edwin Kempin50570542015-05-08 15:31:56 +02001582|=============================
1583
Patrick Hieselbc3addc2019-12-02 17:23:24 +01001584[[change-index-config-info]]
1585=== ChangeIndexConfigInfo
1586The `ChangeIndexConfigInfo` entity contains information about Gerrit
1587configuration from the link:config-gerrit.html#index.change[index.change]
1588section.
1589
1590[options="header",cols="1,^1,5"]
1591|=============================
1592|Field Name ||Description
1593|`index_mergeable` |not set if `false`|
1594Value of the link:config-gerrit.html#index.change.indexMergeable[
1595configuration parameter] that controls whether the mergeability bit is
1596indexed (hence queryable using `is:mergeable`).
1597|=============================
1598
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001599[[check-account-external-ids-input]]
1600=== CheckAccountExternalIdsInput
1601The `CheckAccountExternalIdsInput` entity contains input for the
Edwin Kempine6bf3242018-01-12 13:29:24 +01001602account external ID consistency check.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001603
1604Currently this entity contains no fields.
1605
1606[[check-account-external-ids-result-info]]
1607=== CheckAccountExternalIdsResultInfo
1608The `CheckAccountExternalIdsResultInfo` entity contains the result of
Edwin Kempine6bf3242018-01-12 13:29:24 +01001609running the account external ID consistency check.
1610
1611[options="header",cols="1,6"]
1612|======================
1613|Field Name|Description
1614|`problems`|A list of link:#consistency-problem-info[
1615ConsistencyProblemInfo] entities.
1616|======================
1617
1618[[check-accounts-input]]
1619=== CheckAccountsInput
1620The `CheckAccountsInput` entity contains input for the account consistency
1621check.
1622
1623Currently this entity contains no fields.
1624
1625[[check-accounts-result-info]]
1626=== CheckAccountsResultInfo
1627The `CheckAccountsResultInfo` entity contains the result of running the
1628account consistency check.
1629
1630[options="header",cols="1,6"]
1631|======================
1632|Field Name|Description
1633|`problems`|A list of link:#consistency-problem-info[
1634ConsistencyProblemInfo] entities.
1635|======================
1636
1637[[check-groups-input]]
1638=== CheckGroupsInput
1639The `CheckGroupsInput` entity contains input for the group consistency
1640check.
1641
1642Currently this entity contains no fields.
1643
1644[[check-groups-result-info]]
1645=== CheckGroupsResultInfo
1646The `CheckGroupsResultInfo` entity contains the result of running the
1647group consistency check.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001648
1649[options="header",cols="1,6"]
1650|======================
1651|Field Name|Description
1652|`problems`|A list of link:#consistency-problem-info[
1653ConsistencyProblemInfo] entities.
1654|======================
1655
1656[[consistency-check-info]]
1657=== ConsistencyCheckInfo
1658The `ConsistencyCheckInfo` entity contains the results of running
1659consistency checks.
1660
1661[options="header",cols="1,^1,5"]
1662|================================================
1663|Field Name ||Description
Edwin Kempin6396d6d2017-05-30 10:41:28 +02001664|`check_accounts_result` |optional|
1665The result of running the account consistency check as a
1666link:#check-accounts-result-info[CheckAccountsResultInfo] entity.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001667|`check_account_external_ids_result`|optional|
1668The result of running the account external ID consistency check as a
1669link:#check-account-external-ids-result-info[
1670CheckAccountExternalIdsResultInfo] entity.
Edwin Kempine6bf3242018-01-12 13:29:24 +01001671|`check_groups_result` |optional|
1672The result of running the group consistency check as a
1673link:#check-groups-result-info[CheckGroupsResultInfo] entity.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001674|================================================
1675
1676[[consistency-check-input]]
1677=== ConsistencyCheckInput
1678The `ConsistencyCheckInput` entity contains information about which
1679consistency checks should be run.
1680
1681[options="header",cols="1,^1,5"]
1682|=========================================
1683|Field Name ||Description
Edwin Kempin6396d6d2017-05-30 10:41:28 +02001684|`check_accounts` |optional|
1685Input for the account consistency check as
1686link:#check-accounts-input[CheckAccountsInput] entity.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001687|`check_account_external_ids`|optional|
1688Input for the account external ID consistency check as
1689link:#check-account-external-ids-input[CheckAccountExternalIdsInput]
1690entity.
Edwin Kempine6bf3242018-01-12 13:29:24 +01001691|`check_groups` |optional|
1692Input for the group consistency check as link:#check-groups-input[
1693CheckGroupsInput] entity.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001694|=========================================
1695
1696[[consistency-problem-info]]
1697=== ConsistencyProblemInfo
1698The `ConsistencyProblemInfo` entity contains information about a
1699consistency problem.
1700
1701[options="header",cols="1,6"]
1702|======================
1703|Field Name|Description
1704|`status` |The status of the consistency problem. +
Edwin Kempin50017182020-10-21 12:45:12 +02001705Possible values are `FATAL`, `ERROR` and `WARNING`.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001706|`message` |Message describing the consistency problem.
1707|======================
1708
Sven Selberg1acfae52018-04-18 17:11:56 +02001709[[config-update-info]]
1710=== ConfigUpdateInfo
1711The entity describes the result of a reload of gerrit.config.
1712
1713If a changed config value is missing from the `applied` and the `rejected`
1714lists there are no guarantees to whether they have or have not taken effect.
1715
1716[options="header",cols="1,6"]
1717|======================
1718|Field Name|Description
1719|`applied` |A list of link:#config-update-entry-info[ConfigUpdateEntryInfos]
1720describing the applied configuration changes. +
1721Every config value change representation present in this list is guaranteed to
1722have taken effect.
1723|`rejected` |A list of link:#config-update-entry-info[ConfigUpdateEntryInfos]
1724describing the rejected configuration changes. +
1725Every config value change representation present in this list is guaranteed not
1726to have taken effect.
1727|======================
1728
1729[[config-update-entry-info]]
1730=== ConfigUpdateEntryInfo
1731The entity describes an updated config value.
1732
1733[options="header",cols="1,6"]
1734|======================
1735|Field Name|Description
1736|`config_key` |The config key that contains the value.
1737|`old_value` |The old config value. +
1738Missing if value was not previously configured.
1739|`new_value` |The new config value, picked up after reload.
1740|======================
1741
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001742[[download-info]]
1743=== DownloadInfo
1744The `DownloadInfo` entity contains information about supported download
1745options.
1746
1747[options="header",cols="1,6"]
1748|=======================
1749|Field Name |Description
1750|`schemes` |
Edwin Kempin132d28e2015-05-07 15:30:35 +02001751The supported download schemes as a map which maps the scheme name to a
1752of link:#download-scheme-info[DownloadSchemeInfo] entity.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001753|`archives` |
Edwin Kempinf5c88792015-05-20 09:20:30 +02001754List of supported archive formats. Possible values are `tgz`, `tar`,
1755`tbz2` and `txz`.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001756|=======================
1757
1758[[download-scheme-info]]
1759=== DownloadSchemeInfo
1760The `DownloadSchemeInfo` entity contains information about a supported
1761download scheme and its commands.
1762
1763[options="header",cols="1,^1,5"]
1764|=================================
1765|Field Name ||Description
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001766|`url` ||
1767The URL of the download scheme, where '${project}' is used as
1768placeholder for the project name.
1769|`is_auth_required` |not set if `false`|
1770Whether this download scheme requires authentication.
1771|`is_auth_supported` |not set if `false`|
1772Whether this download scheme supports authentication.
1773|`commands` ||
Edwin Kempina9554a52015-05-07 15:19:54 +02001774Download commands as a map which maps the command name to the download
1775command. In the download command '${project}' is used as
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001776placeholder for the project name, and '${ref}' is used as
1777placeholder for the (change) ref.
1778
1779Empty, if accessed anonymously and the download scheme requires
1780authentication.
Edwin Kempineafde882015-05-11 15:40:44 +02001781|`clone_commands` ||
1782Clone commands as a map which maps the command name to the clone
1783command. In the clone command '${project}' is used as
Edwin Kempin4bf36ef2015-06-23 09:44:19 +02001784placeholder for the project name and '${project-base-name}' as name
1785for the project base name (e.g. for a project 'foo/bar' '${project}'
1786is a placeholder for 'foo/bar' and '${project-base-name}' is a
1787placeholder for 'bar').
Edwin Kempineafde882015-05-11 15:40:44 +02001788
1789Empty, if accessed anonymously and the download scheme requires
1790authentication.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001791|=================================
1792
Edwin Kempined846572015-07-24 14:17:11 +02001793[[email-confirmation-input]]
1794=== EmailConfirmationInput
1795The `EmailConfirmationInput` entity contains information for confirming
1796an email address.
1797
1798[options="header",cols="1,6"]
1799|=======================
1800|Field Name |Description
1801|`token` |
1802The token that was sent by mail to a newly registered email address.
1803|=======================
1804
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001805[[entries-info]]
1806=== EntriesInfo
1807The `EntriesInfo` entity contains information about the entries in a
1808cache.
1809
David Pursehouseae367192014-11-25 17:24:47 +09001810[options="header",cols="1,^1,5"]
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001811|==================================
1812|Field Name ||Description
1813|`mem` |optional|Number of cache entries that are held in memory.
1814|`disk` |optional|Number of cache entries on the disk. For non-disk
1815caches this value is not set; for disk caches it is only set if there
1816are entries in the cache.
1817|`space` |optional|
1818The space that is consumed by the cache on disk. The value is returned
1819with a unit abbreviation (`k`: kilobytes, `m`: megabytes,
1820`g`: gigabytes). Only set for disk caches.
1821|==================================
1822
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001823[[gerrit-info]]
1824=== GerritInfo
1825The `GerritInfo` entity contains information about Gerrit
1826configuration from the link:config-gerrit.html#gerrit[gerrit] section.
1827
Edwin Kempin50570542015-05-08 15:31:56 +02001828[options="header",cols="1,^1,5"]
1829|=================================
1830|Field Name ||Description
1831|`all_projects_name` ||
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001832Name of the link:config-gerrit.html#gerrit.allProjects[root project].
Edwin Kempin50570542015-05-08 15:31:56 +02001833|`all_users_name` ||
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001834Name of the link:config-gerrit.html#gerrit.allUsers[project in which
1835meta data of all users is stored].
Yuxuan 'fishy' Wanged1596b2015-11-09 16:32:45 -08001836|`doc_search` ||
1837Whether documentation search is available.
Dave Borowitza5d3fec2015-07-09 14:24:02 -07001838|`doc_url` |optional|
1839Custom base URL where Gerrit server documentation is located.
1840(Documentation may still be available at /Documentation relative to the
1841Gerrit base path even if this value is unset.)
Dave Borowitza17a9842015-09-15 09:58:17 -04001842|`edit_gpg_keys` |not set if `false`|
1843Whether to enable the web UI for editing GPG keys.
Edwin Kempin50570542015-05-08 15:31:56 +02001844|`report_bug_url` |optional|
1845link:config-gerrit.html#gerrit.reportBugUrl[URL to report bugs].
Patrick Hiesela08ba4b2021-02-22 16:21:37 +01001846|`instance_id` |optional|
1847link:config-gerrit.html#gerrit.instanceId[Short identifier for this Gerrit installation].
Edwin Kempin50570542015-05-08 15:31:56 +02001848|=================================
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001849
Patrick Hieselbc3addc2019-12-02 17:23:24 +01001850[[index-config-info]]
1851=== IndexConfigInfo
1852The `IndexConfigInfo` entity contains information about Gerrit
1853configuration from the link:config-gerrit.html#index[index]
1854section.
1855
1856[options="header",cols="1,^1,5"]
1857|=============================
1858|Field Name ||Description
1859|`change` ||
1860Information about the configuration from the
1861link:config-gerrit.html#index.change[index.change] section as
1862link:#index.change[ChangeIndexConfigInfo] entity.
1863|=============================
1864
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001865[[hit-ration-info]]
1866=== HitRatioInfo
1867The `HitRatioInfo` entity contains information about the hit ratio of a
1868cache.
1869
David Pursehouseae367192014-11-25 17:24:47 +09001870[options="header",cols="1,^1,5"]
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001871|==================================
1872|Field Name ||Description
1873|`mem` ||
1874Hit ratio for cache entries that are held in memory (0 \<= value \<= 100).
1875|`disk` |optional|
1876Hit ratio for cache entries that are held on disk (0 \<= value \<= 100).
1877Only set for disk caches.
1878|==================================
1879
Saša Živkove9223062019-09-05 10:31:41 +02001880[[index-changes-input]]
1881=== IndexChangesInput
1882The `IndexChangesInput` contains a list of numerical changes IDs to index.
1883
1884[options="header",cols="1,^2,4"]
1885|================================
1886|Field Name ||Description
1887|`changes` ||
1888List of link:rest-api-changes.html#change-id[change-ids]
Saša Živkovb50ba02c2022-04-29 10:17:43 +02001889|`delete_missing` |optional|
1890Delete changes which are missing in NoteDb from the index. This can be used
1891to get rid of stale index entries. Possible values are `true` and `false`.
1892By default set to `false`.
Saša Živkove9223062019-09-05 10:31:41 +02001893|================================
1894
Edwin Kempind905e582014-05-28 16:54:36 +02001895[[jvm-summary-info]]
1896=== JvmSummaryInfo
1897The `JvmSummaryInfo` entity contains information about the JVM.
1898
David Pursehouseae367192014-11-25 17:24:47 +09001899[options="header",cols="1,^1,5"]
Edwin Kempind905e582014-05-28 16:54:36 +02001900|========================================
1901|Field Name ||Description
1902|`vm_vendor` ||The vendor of the virtual machine.
1903|`vm_name` ||The name of the virtual machine.
1904|`vm_version` ||The version of the virtual machine.
1905|`os_name` ||The name of the operating system.
1906|`os_version` ||The version of the operating system.
1907|`os_arch` ||The architecture of the operating system.
1908|`user` ||The user that is running Gerrit.
1909|`host` |optional|
1910The host on which Gerrit is running.
1911|`current_working_directory`||The current working directory.
1912|`site` ||The path to the review site.
1913|========================================
1914
1915[[mem-summary-info]]
1916=== MemSummaryInfo
1917The `MemSummaryInfo` entity contains information about the current
1918memory usage.
1919
David Pursehouseae367192014-11-25 17:24:47 +09001920[options="header",cols="1,^1,5"]
Edwin Kempind905e582014-05-28 16:54:36 +02001921|============================
1922|Field Name ||Description
1923|`total` ||
1924The total size of the memory. The value is returned with a unit
1925abbreviation (`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1926|`used` ||
1927The size of used memory. The value is returned with a unit abbreviation
1928(`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1929|`free` ||
1930The size of free memory. The value is returned with a unit abbreviation
1931(`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1932|`buffers` ||
1933The size of memory used for JGit buffers. The value is returned with a
1934unit abbreviation (`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1935|`max` ||
1936The maximal memory size. The value is returned with a unit abbreviation
1937(`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1938|`open_files` |optional|
1939The number of open files.
1940|============================
1941
Edwin Kempin7754d0c2015-07-09 15:11:49 +02001942[[plugin-config-info]]
1943=== PluginConfigInfo
1944The `PluginConfigInfo` entity contains information about Gerrit
1945extensions by plugins.
1946
1947[options="header",cols="1,^1,5"]
1948|===========================
1949|Field Name ||Description
1950|`has_avatars` |not set if `false`|
1951Whether an avatar provider is registered.
Ben Rohlfsee2e12b2021-04-08 17:21:51 +02001952|`js_resource_paths`||
1953A list of relative paths (strings). Each path points to a frontend plugin that
1954should be loaded, e.g. `plugins/codemirror_editor/static/codemirror_editor.js`.
Edwin Kempin7754d0c2015-07-09 15:11:49 +02001955|===========================
1956
Dave Borowitz5170e0f2015-06-18 21:05:29 -04001957[[receive-info]]
1958=== ReceiveInfo
1959The `ReceiveInfo` entity contains information about the configuration
1960of git-receive-pack behavior on the server.
1961
1962[options="header",cols="1,^1,5"]
1963|=======================================
1964|Field Name ||Description
1965|`enableSignedPush`|optional|
1966Whether signed push validation support is enabled on the server; see the
1967link:config-gerrit.html#receive.certNonceSeed[global configuration] for
1968details.
1969|=======================================
1970
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001971[[server-info]]
1972=== ServerInfo
1973The `ServerInfo` entity contains information about the configuration of
1974the Gerrit server.
1975
1976[options="header",cols="1,^1,5"]
1977|=======================================
1978|Field Name ||Description
Edwin Kempinf0dacbd2017-08-30 16:17:17 +02001979|`accounts` ||
1980Information about the configuration from the
1981link:config-gerrit.html#accounts[accounts] section as
1982link:#accounts-config-info[AccountsConfigInfo] entity.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001983|`auth` ||
1984Information about the authentication configuration as
1985link:#auth-info[AuthInfo] entity.
Edwin Kempin50570542015-05-08 15:31:56 +02001986|`change` ||
1987Information about the configuration from the
1988link:config-gerrit.html#change[change] section as
1989link:#change-config-info[ChangeConfigInfo] entity.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001990|`download` ||
1991Information about the configured download options as
1992link:#download-info[DownloadInfo] entity.
1993information about Gerrit
1994|`gerrit` ||
1995Information about the configuration from the
1996link:config-gerrit.html#gerrit[gerrit] section as link:#gerrit-info[
1997GerritInfo] entity.
Patrick Hieselbc3addc2019-12-02 17:23:24 +01001998|`index` ||
1999Information about the configuration from the
2000link:config-gerrit.html#index[index] section as link:#index[
2001IndexConfigInfo] entity.
Edwin Kempin7c044322016-06-21 07:29:43 +02002002|`note_db_enabled` |not set if `false`|
David Pursehousea61ee502016-09-06 16:27:09 +09002003Whether the NoteDb storage backend is fully enabled.
Dave Borowitz6b4ac162018-08-27 14:06:15 -07002004|`plugin` ||
Edwin Kempin7754d0c2015-07-09 15:11:49 +02002005Information about Gerrit extensions by plugins as
2006link:#plugin-config-info[PluginConfigInfo] entity.
Dave Borowitz5170e0f2015-06-18 21:05:29 -04002007|`receive` |optional|
2008Information about the receive-pack configuration as a
2009link:#receive-info[ReceiveInfo] entity.
Edwin Kempina3188e12015-05-12 13:34:42 +02002010|`sshd` |optional|
2011Information about the configuration from the
2012link:config-gerrit.html#sshd[sshd] section as link:#sshd-info[SshdInfo]
2013entity. Not set if SSHD is disabled.
Edwin Kempin50570542015-05-08 15:31:56 +02002014|`suggest` ||
2015Information about the configuration from the
2016link:config-gerrit.html#suggest[suggest] section as link:#suggest-info[
2017SuggestInfo] entity.
2018|`user` ||
2019Information about the configuration from the
2020link:config-gerrit.html#user[user] section as link:#user-config-info[
2021UserConfigInfo] entity.
Viktar Donich38252c52017-07-20 16:20:09 -07002022|`default_theme` |optional|
Ben Rohlfsda0a62b2021-04-26 17:02:19 +02002023URL to a default Gerrit UI theme plugin, if available.
Tao Zhou2b29a1f2020-07-15 16:43:33 +02002024Located in `/static/gerrit-theme.js` by default.
Youssef Elghareeb3fa84312022-01-14 15:25:05 +01002025|`submit_requirement_dashboard_columns` ||
2026The list of submit requirement names that should be displayed as separate
2027columns in the dashboard. If empty, the default is to display all submit
2028requirements that are applicable for changes appearing in the dashboard.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02002029|=======================================
2030
Edwin Kempina3188e12015-05-12 13:34:42 +02002031[[sshd-info]]
2032=== SshdInfo
2033The `SshdInfo` entity contains information about Gerrit
2034configuration from the link:config-gerrit.html#sshd[sshd]
2035section.
2036
2037This entity doesn't contain any data, but the presence of this (empty)
2038entity in the link:#server-info[ServerInfo] entity means that SSHD is
2039enabled on the server.
2040
Edwin Kempin50570542015-05-08 15:31:56 +02002041[[suggest-info]]
2042=== SuggestInfo
2043The `SuggestInfo` entity contains information about Gerrit
2044configuration from the link:config-gerrit.html#suggest[suggest]
2045section.
2046
2047[options="header",cols="1,6"]
2048|=======================
2049|Field Name |Description
2050|`from` |
2051The link:config-gerrit.html#suggest.from[number of characters] that a
2052user must have typed before suggestions are provided.
2053|=======================
2054
Edwin Kempind905e582014-05-28 16:54:36 +02002055[[summary-info]]
2056=== SummaryInfo
2057The `SummaryInfo` entity contains information about the current state
2058of the server.
2059
David Pursehouseae367192014-11-25 17:24:47 +09002060[options="header",cols="1,^1,5"]
Edwin Kempind905e582014-05-28 16:54:36 +02002061|============================
2062|Field Name ||Description
2063|`task_summary` ||
2064Summary about current tasks as a link:#task-summary-info[
2065TaskSummaryInfo] entity.
2066|`mem_summary` ||
2067Summary about current memory usage as a link:#mem-summary-info[
2068MemSummaryInfo] entity.
2069|`thread_summary` ||
2070Summary about current threads as a link:#thread-summary-info[
2071ThreadSummaryInfo] entity.
2072|`jvm_summary` |optional|
2073Summary about the JVM link:#jvm-summary-info[JvmSummaryInfo] entity.
2074Only set if the `jvm` option was set.
2075|============================
2076
Edwin Kempin49098b82014-06-10 22:55:13 +02002077[[task-info]]
2078=== TaskInfo
2079The `TaskInfo` entity contains information about a task in a background
2080work queue.
2081
David Pursehouseae367192014-11-25 17:24:47 +09002082[options="header",cols="1,^1,5"]
Edwin Kempin49098b82014-06-10 22:55:13 +02002083|====================================
2084|Field Name ||Description
2085|`id` ||The ID of the task.
2086|`state` ||
2087The state of the task, can be `DONE`, `CANCELLED`, `RUNNING`, `READY`,
2088`SLEEPING` and `OTHER`.
2089|`start_time` ||The start time of the task.
2090|`delay` ||The remaining delay of the task.
2091|`command` ||The command of the task.
2092|`remote_name`|optional|
2093The remote name. May only be set for tasks that are associated with a
2094project.
2095|`project` |optional|The project the task is associated with.
2096|====================================
2097
Edwin Kempind905e582014-05-28 16:54:36 +02002098[[task-summary-info]]
2099=== TaskSummaryInfo
2100The `TaskSummaryInfo` entity contains information about the current
2101tasks.
2102
David Pursehouseae367192014-11-25 17:24:47 +09002103[options="header",cols="1,^1,5"]
Edwin Kempind905e582014-05-28 16:54:36 +02002104|============================
2105|Field Name ||Description
2106|`total` |optional|
2107Total number of current tasks.
2108|`running` |optional|
2109Number of currently running tasks.
2110|`ready` |optional|
2111Number of currently ready tasks.
2112|`sleeping` |optional|
2113Number of currently sleeping tasks.
2114|============================
2115
2116[[thread-summary-info]]
2117=== ThreadSummaryInfo
2118The `ThreadSummaryInfo` entity contains information about the current
2119threads.
2120
David Pursehouseae367192014-11-25 17:24:47 +09002121[options="header",cols="1,6"]
Edwin Kempind905e582014-05-28 16:54:36 +02002122|===========================
2123|Field Name |Description
2124|`cpus` |
2125The number of available processors.
2126|`threads` |
2127The total number of current threads.
2128|`counts` |
2129Detailed thread counts as a map that maps a thread kind to a map that
2130maps a thread state to the thread count. The thread kinds group the
David Pursehousee9ccf872017-02-24 12:39:36 +09002131counts by threads that have the same name prefix (`H2`, `HTTP`,
Edwin Kempind905e582014-05-28 16:54:36 +02002132`IntraLineDiff`, `ReceiveCommits`, `SSH git-receive-pack`,
2133`SSH git-upload-pack`, `SSH-Interactive-Worker`, `SSH-Stream-Worker`,
David Pursehousee9ccf872017-02-24 12:39:36 +09002134`SshCommandStart`, `sshd-SshServer`). The counts for other threads are
2135available under the thread kind `Other`. Counts for the following thread
2136states can be included: `NEW`, `RUNNABLE`, `BLOCKED`, `WAITING`,
2137`TIMED_WAITING` and `TERMINATED`.
Edwin Kempind905e582014-05-28 16:54:36 +02002138|===========================
2139
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02002140[[top-menu-entry-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002141=== TopMenuEntryInfo
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02002142The `TopMenuEntryInfo` entity contains information about a top menu
2143entry.
2144
David Pursehouseae367192014-11-25 17:24:47 +09002145[options="header",cols="1,6"]
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02002146|=================================
2147|Field Name |Description
2148|`name` |Name of the top menu entry.
2149|`items` |List of link:#top-menu-item-info[menu items].
2150|=================================
2151
2152[[top-menu-item-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002153=== TopMenuItemInfo
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02002154The `TopMenuItemInfo` entity contains information about a menu item in
2155a top menu entry.
2156
David Pursehouseae367192014-11-25 17:24:47 +09002157[options="header",cols="1,^1,5"]
Edwin Kempin002c9cb2013-11-06 09:10:47 +01002158|========================
2159|Field Name ||Description
2160|`url` ||The URL of the menu item link.
2161|`name` ||The name of the menu item.
2162|`target` ||Target attribute of the menu item link.
2163|`id` |optional|The `id` attribute of the menu item link.
2164|========================
David Ostrovsky28b8ea62013-06-09 02:16:57 +02002165
Edwin Kempin50570542015-05-08 15:31:56 +02002166[[user-config-info]]
2167=== UserConfigInfo
2168The `UserConfigInfo` entity contains information about Gerrit
2169configuration from the link:config-gerrit.html#user[user] section.
2170
2171[options="header",cols="1,6"]
2172|====================================
2173|Field Name |Description
2174|`anonymous_coward_name` |
2175link:config-gerrit.html#user.anonymousCoward[Username] that is
2176displayed in the Gerrit Web UI and in e-mail notifications if the full
2177name of the user is not set.
2178|====================================
2179
2180
David Ostrovsky28b8ea62013-06-09 02:16:57 +02002181GERRIT
2182------
2183Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -07002184
2185SEARCHBOX
2186---------