blob: f76e0b8090a56c0903f888b7221759531f1e7b69 [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
1383 {changes: ["foo~101", "bar~202"]}
1384----
1385
1386.Response
1387----
1388 HTTP/1.1 200 OK
1389 Content-Disposition: attachment
1390----
1391
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001392
Edwin Kempin57a46822014-05-23 10:24:41 +02001393[[ids]]
1394== IDs
1395
1396[[cache-name]]
1397=== \{cache-name\}
1398The name of the cache.
1399
1400If the cache is defined by a plugin the cache name must include the
1401plugin name: "<plugin-name>-<cache-name>".
1402
1403Gerrit core caches can optionally be prefixed with "gerrit":
1404"gerrit-<cache-name>".
1405
Edwin Kempin32e3a522014-07-08 12:10:31 +02001406[[task-id]]
1407=== \{task-id\}
1408The ID of the task (hex string).
1409
Edwin Kempin57a46822014-05-23 10:24:41 +02001410
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001411[[json-entities]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001412== JSON Entities
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001413
Edwin Kempinf0dacbd2017-08-30 16:17:17 +02001414[[accounts-config-info]]
1415=== AccountsConfigInfo
1416The `AccountsConfigInfo` entity contains information about Gerrit
1417configuration from the link:config-gerrit.html#accounts[accounts]
1418section.
1419
1420[options="header",cols="1,6"]
1421|=============================
Ben Rohlfs99f16a12020-02-11 19:44:17 +01001422|Field Name |Description
1423|`visibility` |
Edwin Kempinf0dacbd2017-08-30 16:17:17 +02001424link:config-gerrit.html#accounts.visibility[Visibility setting for
1425accounts].
Ben Rohlfs99f16a12020-02-11 19:44:17 +01001426|`default_display_name`|The default strategy for choosing the display
1427name in the UI, see also
1428link:config-gerrit.html#accounts.defaultDisplayName[gerrit.config].
Edwin Kempinf0dacbd2017-08-30 16:17:17 +02001429|=============================
Han-Wen Nienhuyse04df7e2017-04-25 17:41:58 +02001430
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001431[[auth-info]]
1432=== AuthInfo
1433The `AuthInfo` entity contains information about the authentication
1434configuration of the Gerrit server.
1435
1436[options="header",cols="1,^1,5"]
1437|==========================================
1438|Field Name ||Description
1439|`type` ||
1440The link:config-gerrit.html#auth.type[authentication type] that is
1441configured on the server. Can be `OPENID`, `OPENID_SSO`, `OAUTH`,
1442`HTTP`, `HTTP_LDAP`, `CLIENT_SSL_CERT_LDAP`, `LDAP`, `LDAP_BIND`,
1443`CUSTOM_EXTENSION` or `DEVELOPMENT_BECOME_ANY_ACCOUNT`.
1444|`use_contributor_agreements` |not set if `false`|
1445Whether link:config-gerrit.html#auth.contributorAgreements[contributor
1446agreements] are required.
David Pursehousecc046732016-08-22 20:08:52 +09001447|`contributor_agreements` |not set if `use_contributor_agreements` is `false`|
1448List of contributor agreements as link:rest-api-accounts.html#contributor-agreement-info[
1449ContributorAgreementInfo] entities.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001450|`editable_account_fields` ||
1451List of account fields that are editable. Possible values are
1452`FULL_NAME`, `USER_NAME` and `REGISTER_NEW_EMAIL`.
Edwin Kempin5a8c9e92015-05-08 10:59:01 +02001453|`login_url` |optional|
1454The link:config-gerrit.html#auth.loginUrl[login URL]. Only set if
1455link:config-gerrit.html#auth.type[authentication type] is `HTTP` or
1456`HTTP_LDAP`.
1457|`login_text` |optional|
1458The link:config-gerrit.html#auth.loginText[login text]. Only set if
1459link:config-gerrit.html#auth.type[authentication type] is `HTTP` or
1460`HTTP_LDAP`.
1461|`switch_account_url` |optional|
1462The link:config-gerrit.html#auth.switchAccountUrl[URL to switch
1463accounts].
1464|`register_url` |optional|
1465The link:config-gerrit.html#auth.registerUrl[register URL]. Only set if
1466link:config-gerrit.html#auth.type[authentication type] is `LDAP`,
1467`LDAP_BIND` or `CUSTOM_EXTENSION`.
1468|`register_text` |optional|
1469The link:config-gerrit.html#auth.registerText[register text]. Only set
1470if link:config-gerrit.html#auth.type[authentication type] is `LDAP`,
1471`LDAP_BIND` or `CUSTOM_EXTENSION`.
1472|`edit_full_name_url` |optional|
1473The link:config-gerrit.html#auth.editFullNameUrl[URL to edit the full
1474name]. Only set if link:config-gerrit.html#auth.type[authentication
1475type] is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`.
1476|`http_password_url` |optional|
1477The link:config-gerrit.html#auth.httpPasswordUrl[URL to obtain an HTTP
1478password]. Only set if link:config-gerrit.html#auth.type[authentication
1479type] is `CUSTOM_EXTENSION`.
Hector Oswaldo Caballero2a9ad1f2016-09-15 18:24:42 -04001480|`git_basic_auth_policy` |optional|
1481The link:config-gerrit.html#auth.gitBasicAuthPolicy[policy] to authenticate
1482Git over HTTP and REST API requests when
Edwin Kempin02551c02019-12-31 11:08:38 +01001483link:config-gerrit.html#auth.type[authentication type] is `LDAP`,
1484`LDAP_BIND` or `OAUTH`. Can be `HTTP`, `LDAP`, `HTTP_LDAP` or `OAUTH`.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001485|==========================================
1486
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001487[[cache-info]]
1488=== CacheInfo
1489The `CacheInfo` entity contains information about a cache.
1490
David Pursehouseae367192014-11-25 17:24:47 +09001491[options="header",cols="1,^1,5"]
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001492|==================================
1493|Field Name ||Description
1494|`name` |
1495not set if returned in a map where the cache name is used as map key|
1496The cache name. If the cache is defined by a plugin the cache name
1497includes the plugin name: "<plugin-name>-<cache-name>".
Edwin Kempinf11eadc2014-06-24 15:23:52 +02001498|`type` ||
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001499The type of the cache (`MEM`: in memory cache, `DISK`: disk cache).
1500|`entries` ||
1501Information about the entries in the cache as a
1502link:#entries-info[EntriesInfo] entity.
1503|`average_get` |optional|
1504The average duration of getting one entry from the cache. The value is
1505returned with a standard time unit abbreviation (`ns`: nanoseconds,
1506`us`: microseconds, `ms`: milliseconds, `s`: seconds).
1507|`hit_ratio` ||
1508Information about the hit ratio as a link:#hit-ration-info[
1509HitRatioInfo] entity.
1510|==================================
1511
Edwin Kempina4286832014-05-28 14:17:22 +02001512[[cache-operation-input]]
1513=== CacheOperationInput
1514The `CacheOperationInput` entity contains information about an
1515operation that should be executed on caches.
1516
David Pursehouseae367192014-11-25 17:24:47 +09001517[options="header",cols="1,^1,5"]
Edwin Kempina3c6d032014-05-28 14:46:44 +02001518|==================================
1519|Field Name ||Description
1520|`operation` ||
Edwin Kempina4286832014-05-28 14:17:22 +02001521The cache operation that should be executed:
1522
1523`FLUSH_ALL`: Flushes all caches, except the `web_sessions` cache.
Edwin Kempina3c6d032014-05-28 14:46:44 +02001524
1525`FLUSH`: Flushes the specified caches.
1526|`caches` |optional|
1527A list of cache names. This list defines the caches on which the
1528specified operation should be executed. Whether this list must be
1529specified depends on the operation being executed.
1530|==================================
Edwin Kempina4286832014-05-28 14:17:22 +02001531
Edwin Kempin521c1242015-01-23 12:44:44 +01001532[[capability-info]]
1533=== CapabilityInfo
1534The `CapabilityInfo` entity contains information about a capability.
1535
1536[options="header",cols="1,6"]
1537|=================================
1538|Field Name |Description
1539|`id` |capability ID
1540|`name` |capability name
1541|=================================
1542
Edwin Kempin50570542015-05-08 15:31:56 +02001543[[change-config-info]]
1544=== ChangeConfigInfo
1545The `ChangeConfigInfo` entity contains information about Gerrit
1546configuration from the link:config-gerrit.html#change[change]
1547section.
1548
1549[options="header",cols="1,^1,5"]
1550|=============================
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001551|Field Name ||Description
Gabor Somossyb72d4c62015-10-20 23:40:07 +01001552|`allow_blame` |not set if `false`|
1553link:config-gerrit.html#change.allowBlame[Whether blame on side by side diff is
1554allowed].
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001555|`large_change` ||
Edwin Kempin50570542015-05-08 15:31:56 +02001556link:config-gerrit.html#change.largeChange[Number of changed lines from
1557which on a change is considered as a large change].
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001558|`reply_label` ||
Edwin Kempin50570542015-05-08 15:31:56 +02001559link:config-gerrit.html#change.replyTooltip[Label name for the reply
1560button].
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001561|`reply_tooltip` ||
Edwin Kempin50570542015-05-08 15:31:56 +02001562link:config-gerrit.html#change.replyTooltip[Tooltip for the reply
1563button].
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001564|`update_delay` ||
Edwin Kempin50570542015-05-08 15:31:56 +02001565link:config-gerrit.html#change.updateDelay[How often in seconds the web
1566interface should poll for updates to the currently open change].
Edwin Kempin3450dde2019-08-23 10:36:57 +02001567|`submit_whole_topic` |not set if `false`|
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001568link:config-gerrit.html#change.submitWholeTopic[A configuration if
1569the whole topic is submitted].
Changcheng Xiao16095352017-12-18 10:03:08 +01001570|`disable_private_changes` |not set if `false`|
1571Returns true if private changes are disabled.
Patrick Hiesela4824db2019-12-20 10:55:26 +01001572|`mergeability_computation_behavior` ||
1573Value of the link:config-gerrit.html#change.mergeabilityComputationBehavior[
Edwin Kempin181eed22019-08-23 10:27:39 +02001574configuration parameter] that controls whether the mergeability bit in
Patrick Hiesela4824db2019-12-20 10:55:26 +01001575link:rest-api-changes.html#change-info[ChangeInfo] will never be set and if the
1576bit is indexed.
Ben Rohlfs2cc33542020-02-28 12:44:09 +01001577|`enable_attention_set` |defaults to `false`|
1578Returns true if attention set UI features are enabled.
1579|`enable_assignee` |defaults to `true`|
1580Returns true if assignee related UI features are enabled.
Edwin Kempin50570542015-05-08 15:31:56 +02001581|=============================
1582
Patrick Hieselbc3addc2019-12-02 17:23:24 +01001583[[change-index-config-info]]
1584=== ChangeIndexConfigInfo
1585The `ChangeIndexConfigInfo` entity contains information about Gerrit
1586configuration from the link:config-gerrit.html#index.change[index.change]
1587section.
1588
1589[options="header",cols="1,^1,5"]
1590|=============================
1591|Field Name ||Description
1592|`index_mergeable` |not set if `false`|
1593Value of the link:config-gerrit.html#index.change.indexMergeable[
1594configuration parameter] that controls whether the mergeability bit is
1595indexed (hence queryable using `is:mergeable`).
1596|=============================
1597
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001598[[check-account-external-ids-input]]
1599=== CheckAccountExternalIdsInput
1600The `CheckAccountExternalIdsInput` entity contains input for the
Edwin Kempine6bf3242018-01-12 13:29:24 +01001601account external ID consistency check.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001602
1603Currently this entity contains no fields.
1604
1605[[check-account-external-ids-result-info]]
1606=== CheckAccountExternalIdsResultInfo
1607The `CheckAccountExternalIdsResultInfo` entity contains the result of
Edwin Kempine6bf3242018-01-12 13:29:24 +01001608running the account external ID consistency check.
1609
1610[options="header",cols="1,6"]
1611|======================
1612|Field Name|Description
1613|`problems`|A list of link:#consistency-problem-info[
1614ConsistencyProblemInfo] entities.
1615|======================
1616
1617[[check-accounts-input]]
1618=== CheckAccountsInput
1619The `CheckAccountsInput` entity contains input for the account consistency
1620check.
1621
1622Currently this entity contains no fields.
1623
1624[[check-accounts-result-info]]
1625=== CheckAccountsResultInfo
1626The `CheckAccountsResultInfo` entity contains the result of running the
1627account consistency check.
1628
1629[options="header",cols="1,6"]
1630|======================
1631|Field Name|Description
1632|`problems`|A list of link:#consistency-problem-info[
1633ConsistencyProblemInfo] entities.
1634|======================
1635
1636[[check-groups-input]]
1637=== CheckGroupsInput
1638The `CheckGroupsInput` entity contains input for the group consistency
1639check.
1640
1641Currently this entity contains no fields.
1642
1643[[check-groups-result-info]]
1644=== CheckGroupsResultInfo
1645The `CheckGroupsResultInfo` entity contains the result of running the
1646group consistency check.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001647
1648[options="header",cols="1,6"]
1649|======================
1650|Field Name|Description
1651|`problems`|A list of link:#consistency-problem-info[
1652ConsistencyProblemInfo] entities.
1653|======================
1654
1655[[consistency-check-info]]
1656=== ConsistencyCheckInfo
1657The `ConsistencyCheckInfo` entity contains the results of running
1658consistency checks.
1659
1660[options="header",cols="1,^1,5"]
1661|================================================
1662|Field Name ||Description
Edwin Kempin6396d6d2017-05-30 10:41:28 +02001663|`check_accounts_result` |optional|
1664The result of running the account consistency check as a
1665link:#check-accounts-result-info[CheckAccountsResultInfo] entity.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001666|`check_account_external_ids_result`|optional|
1667The result of running the account external ID consistency check as a
1668link:#check-account-external-ids-result-info[
1669CheckAccountExternalIdsResultInfo] entity.
Edwin Kempine6bf3242018-01-12 13:29:24 +01001670|`check_groups_result` |optional|
1671The result of running the group consistency check as a
1672link:#check-groups-result-info[CheckGroupsResultInfo] entity.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001673|================================================
1674
1675[[consistency-check-input]]
1676=== ConsistencyCheckInput
1677The `ConsistencyCheckInput` entity contains information about which
1678consistency checks should be run.
1679
1680[options="header",cols="1,^1,5"]
1681|=========================================
1682|Field Name ||Description
Edwin Kempin6396d6d2017-05-30 10:41:28 +02001683|`check_accounts` |optional|
1684Input for the account consistency check as
1685link:#check-accounts-input[CheckAccountsInput] entity.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001686|`check_account_external_ids`|optional|
1687Input for the account external ID consistency check as
1688link:#check-account-external-ids-input[CheckAccountExternalIdsInput]
1689entity.
Edwin Kempine6bf3242018-01-12 13:29:24 +01001690|`check_groups` |optional|
1691Input for the group consistency check as link:#check-groups-input[
1692CheckGroupsInput] entity.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001693|=========================================
1694
1695[[consistency-problem-info]]
1696=== ConsistencyProblemInfo
1697The `ConsistencyProblemInfo` entity contains information about a
1698consistency problem.
1699
1700[options="header",cols="1,6"]
1701|======================
1702|Field Name|Description
1703|`status` |The status of the consistency problem. +
1704Possible values are `ERROR` and `WARNING`.
1705|`message` |Message describing the consistency problem.
1706|======================
1707
Sven Selberg1acfae52018-04-18 17:11:56 +02001708[[config-update-info]]
1709=== ConfigUpdateInfo
1710The entity describes the result of a reload of gerrit.config.
1711
1712If a changed config value is missing from the `applied` and the `rejected`
1713lists there are no guarantees to whether they have or have not taken effect.
1714
1715[options="header",cols="1,6"]
1716|======================
1717|Field Name|Description
1718|`applied` |A list of link:#config-update-entry-info[ConfigUpdateEntryInfos]
1719describing the applied configuration changes. +
1720Every config value change representation present in this list is guaranteed to
1721have taken effect.
1722|`rejected` |A list of link:#config-update-entry-info[ConfigUpdateEntryInfos]
1723describing the rejected configuration changes. +
1724Every config value change representation present in this list is guaranteed not
1725to have taken effect.
1726|======================
1727
1728[[config-update-entry-info]]
1729=== ConfigUpdateEntryInfo
1730The entity describes an updated config value.
1731
1732[options="header",cols="1,6"]
1733|======================
1734|Field Name|Description
1735|`config_key` |The config key that contains the value.
1736|`old_value` |The old config value. +
1737Missing if value was not previously configured.
1738|`new_value` |The new config value, picked up after reload.
1739|======================
1740
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001741[[download-info]]
1742=== DownloadInfo
1743The `DownloadInfo` entity contains information about supported download
1744options.
1745
1746[options="header",cols="1,6"]
1747|=======================
1748|Field Name |Description
1749|`schemes` |
Edwin Kempin132d28e2015-05-07 15:30:35 +02001750The supported download schemes as a map which maps the scheme name to a
1751of link:#download-scheme-info[DownloadSchemeInfo] entity.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001752|`archives` |
Edwin Kempinf5c88792015-05-20 09:20:30 +02001753List of supported archive formats. Possible values are `tgz`, `tar`,
1754`tbz2` and `txz`.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001755|=======================
1756
1757[[download-scheme-info]]
1758=== DownloadSchemeInfo
1759The `DownloadSchemeInfo` entity contains information about a supported
1760download scheme and its commands.
1761
1762[options="header",cols="1,^1,5"]
1763|=================================
1764|Field Name ||Description
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001765|`url` ||
1766The URL of the download scheme, where '${project}' is used as
1767placeholder for the project name.
1768|`is_auth_required` |not set if `false`|
1769Whether this download scheme requires authentication.
1770|`is_auth_supported` |not set if `false`|
1771Whether this download scheme supports authentication.
1772|`commands` ||
Edwin Kempina9554a52015-05-07 15:19:54 +02001773Download commands as a map which maps the command name to the download
1774command. In the download command '${project}' is used as
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001775placeholder for the project name, and '${ref}' is used as
1776placeholder for the (change) ref.
1777
1778Empty, if accessed anonymously and the download scheme requires
1779authentication.
Edwin Kempineafde882015-05-11 15:40:44 +02001780|`clone_commands` ||
1781Clone commands as a map which maps the command name to the clone
1782command. In the clone command '${project}' is used as
Edwin Kempin4bf36ef2015-06-23 09:44:19 +02001783placeholder for the project name and '${project-base-name}' as name
1784for the project base name (e.g. for a project 'foo/bar' '${project}'
1785is a placeholder for 'foo/bar' and '${project-base-name}' is a
1786placeholder for 'bar').
Edwin Kempineafde882015-05-11 15:40:44 +02001787
1788Empty, if accessed anonymously and the download scheme requires
1789authentication.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001790|=================================
1791
Edwin Kempined846572015-07-24 14:17:11 +02001792[[email-confirmation-input]]
1793=== EmailConfirmationInput
1794The `EmailConfirmationInput` entity contains information for confirming
1795an email address.
1796
1797[options="header",cols="1,6"]
1798|=======================
1799|Field Name |Description
1800|`token` |
1801The token that was sent by mail to a newly registered email address.
1802|=======================
1803
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001804[[entries-info]]
1805=== EntriesInfo
1806The `EntriesInfo` entity contains information about the entries in a
1807cache.
1808
David Pursehouseae367192014-11-25 17:24:47 +09001809[options="header",cols="1,^1,5"]
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001810|==================================
1811|Field Name ||Description
1812|`mem` |optional|Number of cache entries that are held in memory.
1813|`disk` |optional|Number of cache entries on the disk. For non-disk
1814caches this value is not set; for disk caches it is only set if there
1815are entries in the cache.
1816|`space` |optional|
1817The space that is consumed by the cache on disk. The value is returned
1818with a unit abbreviation (`k`: kilobytes, `m`: megabytes,
1819`g`: gigabytes). Only set for disk caches.
1820|==================================
1821
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001822[[gerrit-info]]
1823=== GerritInfo
1824The `GerritInfo` entity contains information about Gerrit
1825configuration from the link:config-gerrit.html#gerrit[gerrit] section.
1826
Edwin Kempin50570542015-05-08 15:31:56 +02001827[options="header",cols="1,^1,5"]
1828|=================================
1829|Field Name ||Description
1830|`all_projects_name` ||
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001831Name of the link:config-gerrit.html#gerrit.allProjects[root project].
Edwin Kempin50570542015-05-08 15:31:56 +02001832|`all_users_name` ||
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001833Name of the link:config-gerrit.html#gerrit.allUsers[project in which
1834meta data of all users is stored].
Yuxuan 'fishy' Wanged1596b2015-11-09 16:32:45 -08001835|`doc_search` ||
1836Whether documentation search is available.
Dave Borowitza5d3fec2015-07-09 14:24:02 -07001837|`doc_url` |optional|
1838Custom base URL where Gerrit server documentation is located.
1839(Documentation may still be available at /Documentation relative to the
1840Gerrit base path even if this value is unset.)
Dave Borowitza17a9842015-09-15 09:58:17 -04001841|`edit_gpg_keys` |not set if `false`|
1842Whether to enable the web UI for editing GPG keys.
Edwin Kempin50570542015-05-08 15:31:56 +02001843|`report_bug_url` |optional|
1844link:config-gerrit.html#gerrit.reportBugUrl[URL to report bugs].
Edwin Kempin50570542015-05-08 15:31:56 +02001845|=================================
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001846
Patrick Hieselbc3addc2019-12-02 17:23:24 +01001847[[index-config-info]]
1848=== IndexConfigInfo
1849The `IndexConfigInfo` entity contains information about Gerrit
1850configuration from the link:config-gerrit.html#index[index]
1851section.
1852
1853[options="header",cols="1,^1,5"]
1854|=============================
1855|Field Name ||Description
1856|`change` ||
1857Information about the configuration from the
1858link:config-gerrit.html#index.change[index.change] section as
1859link:#index.change[ChangeIndexConfigInfo] entity.
1860|=============================
1861
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001862[[hit-ration-info]]
1863=== HitRatioInfo
1864The `HitRatioInfo` entity contains information about the hit ratio of a
1865cache.
1866
David Pursehouseae367192014-11-25 17:24:47 +09001867[options="header",cols="1,^1,5"]
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001868|==================================
1869|Field Name ||Description
1870|`mem` ||
1871Hit ratio for cache entries that are held in memory (0 \<= value \<= 100).
1872|`disk` |optional|
1873Hit ratio for cache entries that are held on disk (0 \<= value \<= 100).
1874Only set for disk caches.
1875|==================================
1876
Saša Živkove9223062019-09-05 10:31:41 +02001877[[index-changes-input]]
1878=== IndexChangesInput
1879The `IndexChangesInput` contains a list of numerical changes IDs to index.
1880
1881[options="header",cols="1,^2,4"]
1882|================================
1883|Field Name ||Description
1884|`changes` ||
1885List of link:rest-api-changes.html#change-id[change-ids]
1886|================================
1887
Edwin Kempind905e582014-05-28 16:54:36 +02001888[[jvm-summary-info]]
1889=== JvmSummaryInfo
1890The `JvmSummaryInfo` entity contains information about the JVM.
1891
David Pursehouseae367192014-11-25 17:24:47 +09001892[options="header",cols="1,^1,5"]
Edwin Kempind905e582014-05-28 16:54:36 +02001893|========================================
1894|Field Name ||Description
1895|`vm_vendor` ||The vendor of the virtual machine.
1896|`vm_name` ||The name of the virtual machine.
1897|`vm_version` ||The version of the virtual machine.
1898|`os_name` ||The name of the operating system.
1899|`os_version` ||The version of the operating system.
1900|`os_arch` ||The architecture of the operating system.
1901|`user` ||The user that is running Gerrit.
1902|`host` |optional|
1903The host on which Gerrit is running.
1904|`current_working_directory`||The current working directory.
1905|`site` ||The path to the review site.
1906|========================================
1907
1908[[mem-summary-info]]
1909=== MemSummaryInfo
1910The `MemSummaryInfo` entity contains information about the current
1911memory usage.
1912
David Pursehouseae367192014-11-25 17:24:47 +09001913[options="header",cols="1,^1,5"]
Edwin Kempind905e582014-05-28 16:54:36 +02001914|============================
1915|Field Name ||Description
1916|`total` ||
1917The total size of the memory. The value is returned with a unit
1918abbreviation (`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1919|`used` ||
1920The size of used memory. The value is returned with a unit abbreviation
1921(`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1922|`free` ||
1923The size of free memory. The value is returned with a unit abbreviation
1924(`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1925|`buffers` ||
1926The size of memory used for JGit buffers. The value is returned with a
1927unit abbreviation (`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1928|`max` ||
1929The maximal memory size. The value is returned with a unit abbreviation
1930(`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1931|`open_files` |optional|
1932The number of open files.
1933|============================
1934
Edwin Kempin7754d0c2015-07-09 15:11:49 +02001935[[plugin-config-info]]
1936=== PluginConfigInfo
1937The `PluginConfigInfo` entity contains information about Gerrit
1938extensions by plugins.
1939
1940[options="header",cols="1,^1,5"]
1941|===========================
1942|Field Name ||Description
1943|`has_avatars` |not set if `false`|
1944Whether an avatar provider is registered.
1945|===========================
1946
Dave Borowitz5170e0f2015-06-18 21:05:29 -04001947[[receive-info]]
1948=== ReceiveInfo
1949The `ReceiveInfo` entity contains information about the configuration
1950of git-receive-pack behavior on the server.
1951
1952[options="header",cols="1,^1,5"]
1953|=======================================
1954|Field Name ||Description
1955|`enableSignedPush`|optional|
1956Whether signed push validation support is enabled on the server; see the
1957link:config-gerrit.html#receive.certNonceSeed[global configuration] for
1958details.
1959|=======================================
1960
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001961[[server-info]]
1962=== ServerInfo
1963The `ServerInfo` entity contains information about the configuration of
1964the Gerrit server.
1965
1966[options="header",cols="1,^1,5"]
1967|=======================================
1968|Field Name ||Description
Edwin Kempinf0dacbd2017-08-30 16:17:17 +02001969|`accounts` ||
1970Information about the configuration from the
1971link:config-gerrit.html#accounts[accounts] section as
1972link:#accounts-config-info[AccountsConfigInfo] entity.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001973|`auth` ||
1974Information about the authentication configuration as
1975link:#auth-info[AuthInfo] entity.
Edwin Kempin50570542015-05-08 15:31:56 +02001976|`change` ||
1977Information about the configuration from the
1978link:config-gerrit.html#change[change] section as
1979link:#change-config-info[ChangeConfigInfo] entity.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001980|`download` ||
1981Information about the configured download options as
1982link:#download-info[DownloadInfo] entity.
1983information about Gerrit
1984|`gerrit` ||
1985Information about the configuration from the
1986link:config-gerrit.html#gerrit[gerrit] section as link:#gerrit-info[
1987GerritInfo] entity.
Patrick Hieselbc3addc2019-12-02 17:23:24 +01001988|`index` ||
1989Information about the configuration from the
1990link:config-gerrit.html#index[index] section as link:#index[
1991IndexConfigInfo] entity.
Edwin Kempin7c044322016-06-21 07:29:43 +02001992|`note_db_enabled` |not set if `false`|
David Pursehousea61ee502016-09-06 16:27:09 +09001993Whether the NoteDb storage backend is fully enabled.
Dave Borowitz6b4ac162018-08-27 14:06:15 -07001994|`plugin` ||
Edwin Kempin7754d0c2015-07-09 15:11:49 +02001995Information about Gerrit extensions by plugins as
1996link:#plugin-config-info[PluginConfigInfo] entity.
Dave Borowitz5170e0f2015-06-18 21:05:29 -04001997|`receive` |optional|
1998Information about the receive-pack configuration as a
1999link:#receive-info[ReceiveInfo] entity.
Edwin Kempina3188e12015-05-12 13:34:42 +02002000|`sshd` |optional|
2001Information about the configuration from the
2002link:config-gerrit.html#sshd[sshd] section as link:#sshd-info[SshdInfo]
2003entity. Not set if SSHD is disabled.
Edwin Kempin50570542015-05-08 15:31:56 +02002004|`suggest` ||
2005Information about the configuration from the
2006link:config-gerrit.html#suggest[suggest] section as link:#suggest-info[
2007SuggestInfo] entity.
2008|`user` ||
2009Information about the configuration from the
2010link:config-gerrit.html#user[user] section as link:#user-config-info[
2011UserConfigInfo] entity.
Viktar Donich38252c52017-07-20 16:20:09 -07002012|`default_theme` |optional|
2013URL to a default PolyGerrit UI theme plugin, if available.
2014Located in `/static/gerrit-theme.html` by default.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02002015|=======================================
2016
Edwin Kempina3188e12015-05-12 13:34:42 +02002017[[sshd-info]]
2018=== SshdInfo
2019The `SshdInfo` entity contains information about Gerrit
2020configuration from the link:config-gerrit.html#sshd[sshd]
2021section.
2022
2023This entity doesn't contain any data, but the presence of this (empty)
2024entity in the link:#server-info[ServerInfo] entity means that SSHD is
2025enabled on the server.
2026
Edwin Kempin50570542015-05-08 15:31:56 +02002027[[suggest-info]]
2028=== SuggestInfo
2029The `SuggestInfo` entity contains information about Gerrit
2030configuration from the link:config-gerrit.html#suggest[suggest]
2031section.
2032
2033[options="header",cols="1,6"]
2034|=======================
2035|Field Name |Description
2036|`from` |
2037The link:config-gerrit.html#suggest.from[number of characters] that a
2038user must have typed before suggestions are provided.
2039|=======================
2040
Edwin Kempind905e582014-05-28 16:54:36 +02002041[[summary-info]]
2042=== SummaryInfo
2043The `SummaryInfo` entity contains information about the current state
2044of the server.
2045
David Pursehouseae367192014-11-25 17:24:47 +09002046[options="header",cols="1,^1,5"]
Edwin Kempind905e582014-05-28 16:54:36 +02002047|============================
2048|Field Name ||Description
2049|`task_summary` ||
2050Summary about current tasks as a link:#task-summary-info[
2051TaskSummaryInfo] entity.
2052|`mem_summary` ||
2053Summary about current memory usage as a link:#mem-summary-info[
2054MemSummaryInfo] entity.
2055|`thread_summary` ||
2056Summary about current threads as a link:#thread-summary-info[
2057ThreadSummaryInfo] entity.
2058|`jvm_summary` |optional|
2059Summary about the JVM link:#jvm-summary-info[JvmSummaryInfo] entity.
2060Only set if the `jvm` option was set.
2061|============================
2062
Edwin Kempin49098b82014-06-10 22:55:13 +02002063[[task-info]]
2064=== TaskInfo
2065The `TaskInfo` entity contains information about a task in a background
2066work queue.
2067
David Pursehouseae367192014-11-25 17:24:47 +09002068[options="header",cols="1,^1,5"]
Edwin Kempin49098b82014-06-10 22:55:13 +02002069|====================================
2070|Field Name ||Description
2071|`id` ||The ID of the task.
2072|`state` ||
2073The state of the task, can be `DONE`, `CANCELLED`, `RUNNING`, `READY`,
2074`SLEEPING` and `OTHER`.
2075|`start_time` ||The start time of the task.
2076|`delay` ||The remaining delay of the task.
2077|`command` ||The command of the task.
2078|`remote_name`|optional|
2079The remote name. May only be set for tasks that are associated with a
2080project.
2081|`project` |optional|The project the task is associated with.
2082|====================================
2083
Edwin Kempind905e582014-05-28 16:54:36 +02002084[[task-summary-info]]
2085=== TaskSummaryInfo
2086The `TaskSummaryInfo` entity contains information about the current
2087tasks.
2088
David Pursehouseae367192014-11-25 17:24:47 +09002089[options="header",cols="1,^1,5"]
Edwin Kempind905e582014-05-28 16:54:36 +02002090|============================
2091|Field Name ||Description
2092|`total` |optional|
2093Total number of current tasks.
2094|`running` |optional|
2095Number of currently running tasks.
2096|`ready` |optional|
2097Number of currently ready tasks.
2098|`sleeping` |optional|
2099Number of currently sleeping tasks.
2100|============================
2101
2102[[thread-summary-info]]
2103=== ThreadSummaryInfo
2104The `ThreadSummaryInfo` entity contains information about the current
2105threads.
2106
David Pursehouseae367192014-11-25 17:24:47 +09002107[options="header",cols="1,6"]
Edwin Kempind905e582014-05-28 16:54:36 +02002108|===========================
2109|Field Name |Description
2110|`cpus` |
2111The number of available processors.
2112|`threads` |
2113The total number of current threads.
2114|`counts` |
2115Detailed thread counts as a map that maps a thread kind to a map that
2116maps a thread state to the thread count. The thread kinds group the
David Pursehousee9ccf872017-02-24 12:39:36 +09002117counts by threads that have the same name prefix (`H2`, `HTTP`,
Edwin Kempind905e582014-05-28 16:54:36 +02002118`IntraLineDiff`, `ReceiveCommits`, `SSH git-receive-pack`,
2119`SSH git-upload-pack`, `SSH-Interactive-Worker`, `SSH-Stream-Worker`,
David Pursehousee9ccf872017-02-24 12:39:36 +09002120`SshCommandStart`, `sshd-SshServer`). The counts for other threads are
2121available under the thread kind `Other`. Counts for the following thread
2122states can be included: `NEW`, `RUNNABLE`, `BLOCKED`, `WAITING`,
2123`TIMED_WAITING` and `TERMINATED`.
Edwin Kempind905e582014-05-28 16:54:36 +02002124|===========================
2125
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02002126[[top-menu-entry-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002127=== TopMenuEntryInfo
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02002128The `TopMenuEntryInfo` entity contains information about a top menu
2129entry.
2130
David Pursehouseae367192014-11-25 17:24:47 +09002131[options="header",cols="1,6"]
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02002132|=================================
2133|Field Name |Description
2134|`name` |Name of the top menu entry.
2135|`items` |List of link:#top-menu-item-info[menu items].
2136|=================================
2137
2138[[top-menu-item-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002139=== TopMenuItemInfo
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02002140The `TopMenuItemInfo` entity contains information about a menu item in
2141a top menu entry.
2142
David Pursehouseae367192014-11-25 17:24:47 +09002143[options="header",cols="1,^1,5"]
Edwin Kempin002c9cb2013-11-06 09:10:47 +01002144|========================
2145|Field Name ||Description
2146|`url` ||The URL of the menu item link.
2147|`name` ||The name of the menu item.
2148|`target` ||Target attribute of the menu item link.
2149|`id` |optional|The `id` attribute of the menu item link.
2150|========================
David Ostrovsky28b8ea62013-06-09 02:16:57 +02002151
Edwin Kempin50570542015-05-08 15:31:56 +02002152[[user-config-info]]
2153=== UserConfigInfo
2154The `UserConfigInfo` entity contains information about Gerrit
2155configuration from the link:config-gerrit.html#user[user] section.
2156
2157[options="header",cols="1,6"]
2158|====================================
2159|Field Name |Description
2160|`anonymous_coward_name` |
2161link:config-gerrit.html#user.anonymousCoward[Username] that is
2162displayed in the Gerrit Web UI and in e-mail notifications if the full
2163name of the user is not set.
2164|====================================
2165
2166
David Ostrovsky28b8ea62013-06-09 02:16:57 +02002167GERRIT
2168------
2169Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -07002170
2171SEARCHBOX
2172---------