blob: b58d22aaa356eab9ae249fa791e0a52f68ac503e [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,
1057 "show_site_header": true,
1058 "use_flash_clipboard": true,
1059 "download_command": "CHECKOUT",
1060 "date_format": "STD",
1061 "time_format": "HHMM_12",
1062 "diff_view": "SIDE_BY_SIDE",
1063 "size_bar_in_change_table": true,
1064 "review_category_strategy": "NONE",
1065 "mute_common_path_prefixes": true,
Dave Borowitzd6ee48e2017-04-27 10:32:42 -04001066 "publish_comments_on_push": true,
Edwin Kempine9f5da32016-06-03 17:08:34 +02001067 "my": [
1068 {
1069 "url": "#/dashboard/self",
1070 "name": "Changes"
1071 },
1072 {
Edwin Kempine9f5da32016-06-03 17:08:34 +02001073 "url": "#/q/has:draft",
1074 "name": "Draft Comments"
1075 },
1076 {
1077 "url": "#/q/has:edit",
1078 "name": "Edits"
1079 },
1080 {
1081 "url": "#/q/is:watched+is:open",
1082 "name": "Watched Changes"
1083 },
1084 {
1085 "url": "#/q/is:starred",
1086 "name": "Starred Changes"
1087 },
1088 {
1089 "url": "#/groups/self",
1090 "name": "Groups"
1091 }
1092 ],
1093 "email_strategy": "ENABLED"
1094 }
1095----
1096
1097[[set-user-preferences]]
1098=== Set Default User Preferences
1099
1100--
1101'PUT /config/server/preferences'
1102--
1103
1104Sets the default user preferences for the server.
1105
1106The new user preferences must be provided in the request body as a
1107link:rest-api-accounts.html#preferences-input[PreferencesInput]
1108entity.
1109
1110To be allowed to set default preferences, a user must be a member of
1111a group that is granted the
1112link:access-control.html#capability_administrateServer[
1113Administrate Server] capability.
1114
1115.Request
1116----
1117 PUT /a/config/server/preferences HTTP/1.0
1118 Content-Type: application/json; charset=UTF-8
1119
1120 {
1121 "changes_per_page": 50
1122 }
1123----
1124
1125As response a link:rest-api-accounts.html#preferences-info[
1126PreferencesInfo] is returned.
1127
1128.Response
1129----
1130 HTTP/1.1 200 OK
1131 Content-Type: application/json; charset=UTF-8
1132
1133 )]}'
1134 {
1135 "changes_per_page": 50,
1136 "show_site_header": true,
1137 "use_flash_clipboard": true,
1138 "download_command": "CHECKOUT",
1139 "date_format": "STD",
1140 "time_format": "HHMM_12",
1141 "diff_view": "SIDE_BY_SIDE",
1142 "size_bar_in_change_table": true,
1143 "review_category_strategy": "NONE",
1144 "mute_common_path_prefixes": true,
Dave Borowitzd6ee48e2017-04-27 10:32:42 -04001145 "publish_comments_on_push": true,
Edwin Kempine9f5da32016-06-03 17:08:34 +02001146 "my": [
1147 {
1148 "url": "#/dashboard/self",
1149 "name": "Changes"
1150 },
1151 {
Edwin Kempine9f5da32016-06-03 17:08:34 +02001152 "url": "#/q/has:draft",
1153 "name": "Draft Comments"
1154 },
1155 {
1156 "url": "#/q/has:edit",
1157 "name": "Edits"
1158 },
1159 {
1160 "url": "#/q/is:watched+is:open",
1161 "name": "Watched Changes"
1162 },
1163 {
1164 "url": "#/q/is:starred",
1165 "name": "Starred Changes"
1166 },
1167 {
1168 "url": "#/groups/self",
1169 "name": "Groups"
1170 }
1171 ],
1172 "email_strategy": "ENABLED"
1173 }
1174----
1175
Sven Selbergc60abbd2016-05-17 15:26:33 +02001176[[get-diff-preferences]]
Edwin Kempinc8b90342016-06-23 13:20:52 +02001177=== Get Default Diff Preferences
Sven Selbergc60abbd2016-05-17 15:26:33 +02001178
1179--
1180'GET /config/server/preferences.diff'
1181--
1182
1183Returns the default diff preferences for the server.
1184
1185.Request
1186----
1187 GET /a/config/server/preferences.diff HTTP/1.0
1188----
1189
1190As response a link:rest-api-accounts.html#diff-preferences-info[
1191DiffPreferencesInfo] is returned.
1192
1193.Response
1194----
1195 HTTP/1.1 200 OK
1196 Content-Type: application/json; charset=UTF-8
1197
1198 )]}'
1199 {
1200 "context": 10,
1201 "tab_size": 8,
1202 "line_length": 100,
1203 "cursor_blink_rate": 0,
1204 "intraline_difference": true,
1205 "show_line_endings": true,
1206 "show_tabs": true,
1207 "show_whitespace_errors": true,
1208 "syntax_highlighting": true,
1209 "auto_hide_diff_table_header": true,
1210 "theme": "DEFAULT",
1211 "ignore_whitespace": "IGNORE_NONE"
1212 }
1213----
1214
1215[[set-diff-preferences]]
Edwin Kempinc8b90342016-06-23 13:20:52 +02001216=== Set Default Diff Preferences
Sven Selbergc60abbd2016-05-17 15:26:33 +02001217
1218--
1219'PUT /config/server/preferences.diff'
1220--
1221
Edwin Kempinc8b90342016-06-23 13:20:52 +02001222Sets the default diff preferences for the server.
1223
1224The new diff preferences must be provided in the request body as a
1225link:rest-api-accounts.html#diff-preferences-input[
1226DiffPreferencesInput] entity.
1227
1228To be allowed to set default diff preferences, a user must be a member
1229of a group that is granted the
1230link:access-control.html#capability_administrateServer[
1231Administrate Server] capability.
Sven Selbergc60abbd2016-05-17 15:26:33 +02001232
1233.Request
1234----
1235 PUT /a/config/server/preferences.diff HTTP/1.0
1236 Content-Type: application/json; charset=UTF-8
1237
1238 {
1239 "context": 10,
1240 "tab_size": 8,
1241 "line_length": 80,
1242 "cursor_blink_rate": 0,
1243 "intraline_difference": true,
1244 "show_line_endings": true,
1245 "show_tabs": true,
1246 "show_whitespace_errors": true,
1247 "syntax_highlighting": true,
1248 "auto_hide_diff_table_header": true,
1249 "theme": "DEFAULT",
1250 "ignore_whitespace": "IGNORE_NONE"
1251 }
1252----
1253
1254As response a link:rest-api-accounts.html#diff-preferences-info[
1255DiffPreferencesInfo] is returned.
1256
1257.Response
1258----
1259 HTTP/1.1 200 OK
1260 Content-Type: application/json; charset=UTF-8
1261
1262 )]}'
1263 {
1264 "context": 10,
1265 "tab_size": 8,
1266 "line_length": 80,
1267 "cursor_blink_rate": 0,
1268 "intraline_difference": true,
1269 "show_line_endings": true,
1270 "show_tabs": true,
1271 "show_whitespace_errors": true,
1272 "syntax_highlighting": true,
1273 "auto_hide_diff_table_header": true,
1274 "theme": "DEFAULT",
1275 "ignore_whitespace": "IGNORE_NONE"
1276 }
1277----
1278
Edwin Kempin1e01692e2018-01-17 11:01:00 +01001279[[get-edit-preferences]]
1280=== Get Default Edit Preferences
1281
1282--
1283'GET /config/server/preferences.edit'
1284--
1285
1286Returns the default edit preferences for the server.
1287
1288.Request
1289----
1290 GET /a/config/server/preferences.edit HTTP/1.0
1291----
1292
1293As response a link:rest-api-accounts.html#edit-preferences-info[
1294EditPreferencesInfo] is returned.
1295
1296.Response
1297----
1298 HTTP/1.1 200 OK
1299 Content-Type: application/json; charset=UTF-8
1300
1301 )]}'
1302 {
1303 "tab_size": 8,
1304 "line_length": 100,
1305 "indent_unit": 2,
1306 "cursor_blink_rate": 0,
1307 "show_tabs": true,
1308 "syntax_highlighting": true,
1309 "match_brackets": true,
1310 "auto_close_brackets": true,
1311 "theme": "DEFAULT",
1312 "key_map_type": "DEFAULT"
1313 }
1314----
1315
1316[[set-edit-preferences]]
1317=== Set Default Edit Preferences
1318
1319--
1320'PUT /config/server/preferences.edit'
1321--
1322
1323Sets the default edit preferences for the server.
1324
1325The new edit preferences must be provided in the request body as a
1326link:rest-api-accounts.html#edit-preferences-input[
1327EditPreferencesInput] entity.
1328
1329To be allowed to set default edit preferences, a user must be a member
1330of a group that is granted the
1331link:access-control.html#capability_administrateServer[
1332Administrate Server] capability.
1333
1334.Request
1335----
1336 PUT /a/config/server/preferences.edit HTTP/1.0
1337 Content-Type: application/json; charset=UTF-8
1338
1339 {
1340 "tab_size": 8,
1341 "line_length": 80,
1342 "indent_unit": 2,
1343 "cursor_blink_rate": 0,
1344 "show_tabs": true,
1345 "syntax_highlighting": true,
1346 "match_brackets": true,
1347 "auto_close_brackets": true,
1348 "theme": "DEFAULT",
1349 "key_map_type": "DEFAULT"
1350 }
1351----
1352
1353As response a link:rest-api-accounts.html#edit-preferences-info[
1354EditPreferencesInfo] is returned.
1355
1356.Response
1357----
1358 HTTP/1.1 200 OK
1359 Content-Type: application/json; charset=UTF-8
1360
1361 )]}'
1362 {
1363 "tab_size": 8,
1364 "line_length": 80,
1365 "indent_unit": 2,
1366 "cursor_blink_rate": 0,
1367 "show_tabs": true,
1368 "syntax_highlighting": true,
1369 "match_brackets": true,
1370 "auto_close_brackets": true,
1371 "theme": "DEFAULT",
1372 "key_map_type": "DEFAULT"
1373 }
1374----
1375
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001376
Edwin Kempin57a46822014-05-23 10:24:41 +02001377[[ids]]
1378== IDs
1379
1380[[cache-name]]
1381=== \{cache-name\}
1382The name of the cache.
1383
1384If the cache is defined by a plugin the cache name must include the
1385plugin name: "<plugin-name>-<cache-name>".
1386
1387Gerrit core caches can optionally be prefixed with "gerrit":
1388"gerrit-<cache-name>".
1389
Edwin Kempin32e3a522014-07-08 12:10:31 +02001390[[task-id]]
1391=== \{task-id\}
1392The ID of the task (hex string).
1393
Edwin Kempin57a46822014-05-23 10:24:41 +02001394
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001395[[json-entities]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001396== JSON Entities
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001397
Edwin Kempinf0dacbd2017-08-30 16:17:17 +02001398[[accounts-config-info]]
1399=== AccountsConfigInfo
1400The `AccountsConfigInfo` entity contains information about Gerrit
1401configuration from the link:config-gerrit.html#accounts[accounts]
1402section.
1403
1404[options="header",cols="1,6"]
1405|=============================
1406|Field Name |Description
1407|`visibility` |
1408link:config-gerrit.html#accounts.visibility[Visibility setting for
1409accounts].
1410|=============================
Han-Wen Nienhuyse04df7e2017-04-25 17:41:58 +02001411
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001412[[auth-info]]
1413=== AuthInfo
1414The `AuthInfo` entity contains information about the authentication
1415configuration of the Gerrit server.
1416
1417[options="header",cols="1,^1,5"]
1418|==========================================
1419|Field Name ||Description
1420|`type` ||
1421The link:config-gerrit.html#auth.type[authentication type] that is
1422configured on the server. Can be `OPENID`, `OPENID_SSO`, `OAUTH`,
1423`HTTP`, `HTTP_LDAP`, `CLIENT_SSL_CERT_LDAP`, `LDAP`, `LDAP_BIND`,
1424`CUSTOM_EXTENSION` or `DEVELOPMENT_BECOME_ANY_ACCOUNT`.
1425|`use_contributor_agreements` |not set if `false`|
1426Whether link:config-gerrit.html#auth.contributorAgreements[contributor
1427agreements] are required.
David Pursehousecc046732016-08-22 20:08:52 +09001428|`contributor_agreements` |not set if `use_contributor_agreements` is `false`|
1429List of contributor agreements as link:rest-api-accounts.html#contributor-agreement-info[
1430ContributorAgreementInfo] entities.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001431|`editable_account_fields` ||
1432List of account fields that are editable. Possible values are
1433`FULL_NAME`, `USER_NAME` and `REGISTER_NEW_EMAIL`.
Edwin Kempin5a8c9e92015-05-08 10:59:01 +02001434|`login_url` |optional|
1435The link:config-gerrit.html#auth.loginUrl[login URL]. Only set if
1436link:config-gerrit.html#auth.type[authentication type] is `HTTP` or
1437`HTTP_LDAP`.
1438|`login_text` |optional|
1439The link:config-gerrit.html#auth.loginText[login text]. Only set if
1440link:config-gerrit.html#auth.type[authentication type] is `HTTP` or
1441`HTTP_LDAP`.
1442|`switch_account_url` |optional|
1443The link:config-gerrit.html#auth.switchAccountUrl[URL to switch
1444accounts].
1445|`register_url` |optional|
1446The link:config-gerrit.html#auth.registerUrl[register URL]. Only set if
1447link:config-gerrit.html#auth.type[authentication type] is `LDAP`,
1448`LDAP_BIND` or `CUSTOM_EXTENSION`.
1449|`register_text` |optional|
1450The link:config-gerrit.html#auth.registerText[register text]. Only set
1451if link:config-gerrit.html#auth.type[authentication type] is `LDAP`,
1452`LDAP_BIND` or `CUSTOM_EXTENSION`.
1453|`edit_full_name_url` |optional|
1454The link:config-gerrit.html#auth.editFullNameUrl[URL to edit the full
1455name]. Only set if link:config-gerrit.html#auth.type[authentication
1456type] is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`.
1457|`http_password_url` |optional|
1458The link:config-gerrit.html#auth.httpPasswordUrl[URL to obtain an HTTP
1459password]. Only set if link:config-gerrit.html#auth.type[authentication
1460type] is `CUSTOM_EXTENSION`.
Hector Oswaldo Caballero2a9ad1f2016-09-15 18:24:42 -04001461|`git_basic_auth_policy` |optional|
1462The link:config-gerrit.html#auth.gitBasicAuthPolicy[policy] to authenticate
1463Git over HTTP and REST API requests when
David Pursehousecdc381e2017-03-01 17:42:06 +09001464link:config-gerrit.html#auth.type[authentication type] is `LDAP`.
Hector Oswaldo Caballero2a9ad1f2016-09-15 18:24:42 -04001465Can be `HTTP`, `LDAP` or `HTTP_LDAP`.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001466|==========================================
1467
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001468[[cache-info]]
1469=== CacheInfo
1470The `CacheInfo` entity contains information about a cache.
1471
David Pursehouseae367192014-11-25 17:24:47 +09001472[options="header",cols="1,^1,5"]
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001473|==================================
1474|Field Name ||Description
1475|`name` |
1476not set if returned in a map where the cache name is used as map key|
1477The cache name. If the cache is defined by a plugin the cache name
1478includes the plugin name: "<plugin-name>-<cache-name>".
Edwin Kempinf11eadc2014-06-24 15:23:52 +02001479|`type` ||
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001480The type of the cache (`MEM`: in memory cache, `DISK`: disk cache).
1481|`entries` ||
1482Information about the entries in the cache as a
1483link:#entries-info[EntriesInfo] entity.
1484|`average_get` |optional|
1485The average duration of getting one entry from the cache. The value is
1486returned with a standard time unit abbreviation (`ns`: nanoseconds,
1487`us`: microseconds, `ms`: milliseconds, `s`: seconds).
1488|`hit_ratio` ||
1489Information about the hit ratio as a link:#hit-ration-info[
1490HitRatioInfo] entity.
1491|==================================
1492
Edwin Kempina4286832014-05-28 14:17:22 +02001493[[cache-operation-input]]
1494=== CacheOperationInput
1495The `CacheOperationInput` entity contains information about an
1496operation that should be executed on caches.
1497
David Pursehouseae367192014-11-25 17:24:47 +09001498[options="header",cols="1,^1,5"]
Edwin Kempina3c6d032014-05-28 14:46:44 +02001499|==================================
1500|Field Name ||Description
1501|`operation` ||
Edwin Kempina4286832014-05-28 14:17:22 +02001502The cache operation that should be executed:
1503
1504`FLUSH_ALL`: Flushes all caches, except the `web_sessions` cache.
Edwin Kempina3c6d032014-05-28 14:46:44 +02001505
1506`FLUSH`: Flushes the specified caches.
1507|`caches` |optional|
1508A list of cache names. This list defines the caches on which the
1509specified operation should be executed. Whether this list must be
1510specified depends on the operation being executed.
1511|==================================
Edwin Kempina4286832014-05-28 14:17:22 +02001512
Edwin Kempin521c1242015-01-23 12:44:44 +01001513[[capability-info]]
1514=== CapabilityInfo
1515The `CapabilityInfo` entity contains information about a capability.
1516
1517[options="header",cols="1,6"]
1518|=================================
1519|Field Name |Description
1520|`id` |capability ID
1521|`name` |capability name
1522|=================================
1523
Edwin Kempin50570542015-05-08 15:31:56 +02001524[[change-config-info]]
1525=== ChangeConfigInfo
1526The `ChangeConfigInfo` entity contains information about Gerrit
1527configuration from the link:config-gerrit.html#change[change]
1528section.
1529
1530[options="header",cols="1,^1,5"]
1531|=============================
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001532|Field Name ||Description
Gabor Somossyb72d4c62015-10-20 23:40:07 +01001533|`allow_blame` |not set if `false`|
1534link:config-gerrit.html#change.allowBlame[Whether blame on side by side diff is
1535allowed].
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001536|`large_change` ||
Edwin Kempin50570542015-05-08 15:31:56 +02001537link:config-gerrit.html#change.largeChange[Number of changed lines from
1538which on a change is considered as a large change].
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001539|`reply_label` ||
Edwin Kempin50570542015-05-08 15:31:56 +02001540link:config-gerrit.html#change.replyTooltip[Label name for the reply
1541button].
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001542|`reply_tooltip` ||
Edwin Kempin50570542015-05-08 15:31:56 +02001543link:config-gerrit.html#change.replyTooltip[Tooltip for the reply
1544button].
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001545|`update_delay` ||
Edwin Kempin50570542015-05-08 15:31:56 +02001546link:config-gerrit.html#change.updateDelay[How often in seconds the web
1547interface should poll for updates to the currently open change].
Edwin Kempin3450dde2019-08-23 10:36:57 +02001548|`submit_whole_topic` |not set if `false`|
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001549link:config-gerrit.html#change.submitWholeTopic[A configuration if
1550the whole topic is submitted].
Changcheng Xiao16095352017-12-18 10:03:08 +01001551|`disable_private_changes` |not set if `false`|
1552Returns true if private changes are disabled.
Edwin Kempin181eed22019-08-23 10:27:39 +02001553|`exclude_mergeable_in_change_info` |not set if `false`|
1554Value of the link:config-gerrit.html#change.api.excludeMergeableInChangeInfo[
1555configuration parameter] that controls whether the mergeability bit in
1556link:rest-api-changes.html#change-info[ChangeInfo] will never be set.
Edwin Kempin50570542015-05-08 15:31:56 +02001557|=============================
1558
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001559[[check-account-external-ids-input]]
1560=== CheckAccountExternalIdsInput
1561The `CheckAccountExternalIdsInput` entity contains input for the
Edwin Kempine6bf3242018-01-12 13:29:24 +01001562account external ID consistency check.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001563
1564Currently this entity contains no fields.
1565
1566[[check-account-external-ids-result-info]]
1567=== CheckAccountExternalIdsResultInfo
1568The `CheckAccountExternalIdsResultInfo` entity contains the result of
Edwin Kempine6bf3242018-01-12 13:29:24 +01001569running the account external ID consistency check.
1570
1571[options="header",cols="1,6"]
1572|======================
1573|Field Name|Description
1574|`problems`|A list of link:#consistency-problem-info[
1575ConsistencyProblemInfo] entities.
1576|======================
1577
1578[[check-accounts-input]]
1579=== CheckAccountsInput
1580The `CheckAccountsInput` entity contains input for the account consistency
1581check.
1582
1583Currently this entity contains no fields.
1584
1585[[check-accounts-result-info]]
1586=== CheckAccountsResultInfo
1587The `CheckAccountsResultInfo` entity contains the result of running the
1588account consistency check.
1589
1590[options="header",cols="1,6"]
1591|======================
1592|Field Name|Description
1593|`problems`|A list of link:#consistency-problem-info[
1594ConsistencyProblemInfo] entities.
1595|======================
1596
1597[[check-groups-input]]
1598=== CheckGroupsInput
1599The `CheckGroupsInput` entity contains input for the group consistency
1600check.
1601
1602Currently this entity contains no fields.
1603
1604[[check-groups-result-info]]
1605=== CheckGroupsResultInfo
1606The `CheckGroupsResultInfo` entity contains the result of running the
1607group consistency check.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001608
1609[options="header",cols="1,6"]
1610|======================
1611|Field Name|Description
1612|`problems`|A list of link:#consistency-problem-info[
1613ConsistencyProblemInfo] entities.
1614|======================
1615
1616[[consistency-check-info]]
1617=== ConsistencyCheckInfo
1618The `ConsistencyCheckInfo` entity contains the results of running
1619consistency checks.
1620
1621[options="header",cols="1,^1,5"]
1622|================================================
1623|Field Name ||Description
Edwin Kempin6396d6d2017-05-30 10:41:28 +02001624|`check_accounts_result` |optional|
1625The result of running the account consistency check as a
1626link:#check-accounts-result-info[CheckAccountsResultInfo] entity.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001627|`check_account_external_ids_result`|optional|
1628The result of running the account external ID consistency check as a
1629link:#check-account-external-ids-result-info[
1630CheckAccountExternalIdsResultInfo] entity.
Edwin Kempine6bf3242018-01-12 13:29:24 +01001631|`check_groups_result` |optional|
1632The result of running the group consistency check as a
1633link:#check-groups-result-info[CheckGroupsResultInfo] entity.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001634|================================================
1635
1636[[consistency-check-input]]
1637=== ConsistencyCheckInput
1638The `ConsistencyCheckInput` entity contains information about which
1639consistency checks should be run.
1640
1641[options="header",cols="1,^1,5"]
1642|=========================================
1643|Field Name ||Description
Edwin Kempin6396d6d2017-05-30 10:41:28 +02001644|`check_accounts` |optional|
1645Input for the account consistency check as
1646link:#check-accounts-input[CheckAccountsInput] entity.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001647|`check_account_external_ids`|optional|
1648Input for the account external ID consistency check as
1649link:#check-account-external-ids-input[CheckAccountExternalIdsInput]
1650entity.
Edwin Kempine6bf3242018-01-12 13:29:24 +01001651|`check_groups` |optional|
1652Input for the group consistency check as link:#check-groups-input[
1653CheckGroupsInput] entity.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001654|=========================================
1655
1656[[consistency-problem-info]]
1657=== ConsistencyProblemInfo
1658The `ConsistencyProblemInfo` entity contains information about a
1659consistency problem.
1660
1661[options="header",cols="1,6"]
1662|======================
1663|Field Name|Description
1664|`status` |The status of the consistency problem. +
1665Possible values are `ERROR` and `WARNING`.
1666|`message` |Message describing the consistency problem.
1667|======================
1668
Sven Selberg1acfae52018-04-18 17:11:56 +02001669[[config-update-info]]
1670=== ConfigUpdateInfo
1671The entity describes the result of a reload of gerrit.config.
1672
1673If a changed config value is missing from the `applied` and the `rejected`
1674lists there are no guarantees to whether they have or have not taken effect.
1675
1676[options="header",cols="1,6"]
1677|======================
1678|Field Name|Description
1679|`applied` |A list of link:#config-update-entry-info[ConfigUpdateEntryInfos]
1680describing the applied configuration changes. +
1681Every config value change representation present in this list is guaranteed to
1682have taken effect.
1683|`rejected` |A list of link:#config-update-entry-info[ConfigUpdateEntryInfos]
1684describing the rejected configuration changes. +
1685Every config value change representation present in this list is guaranteed not
1686to have taken effect.
1687|======================
1688
1689[[config-update-entry-info]]
1690=== ConfigUpdateEntryInfo
1691The entity describes an updated config value.
1692
1693[options="header",cols="1,6"]
1694|======================
1695|Field Name|Description
1696|`config_key` |The config key that contains the value.
1697|`old_value` |The old config value. +
1698Missing if value was not previously configured.
1699|`new_value` |The new config value, picked up after reload.
1700|======================
1701
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001702[[download-info]]
1703=== DownloadInfo
1704The `DownloadInfo` entity contains information about supported download
1705options.
1706
1707[options="header",cols="1,6"]
1708|=======================
1709|Field Name |Description
1710|`schemes` |
Edwin Kempin132d28e2015-05-07 15:30:35 +02001711The supported download schemes as a map which maps the scheme name to a
1712of link:#download-scheme-info[DownloadSchemeInfo] entity.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001713|`archives` |
Edwin Kempinf5c88792015-05-20 09:20:30 +02001714List of supported archive formats. Possible values are `tgz`, `tar`,
1715`tbz2` and `txz`.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001716|=======================
1717
1718[[download-scheme-info]]
1719=== DownloadSchemeInfo
1720The `DownloadSchemeInfo` entity contains information about a supported
1721download scheme and its commands.
1722
1723[options="header",cols="1,^1,5"]
1724|=================================
1725|Field Name ||Description
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001726|`url` ||
1727The URL of the download scheme, where '${project}' is used as
1728placeholder for the project name.
1729|`is_auth_required` |not set if `false`|
1730Whether this download scheme requires authentication.
1731|`is_auth_supported` |not set if `false`|
1732Whether this download scheme supports authentication.
1733|`commands` ||
Edwin Kempina9554a52015-05-07 15:19:54 +02001734Download commands as a map which maps the command name to the download
1735command. In the download command '${project}' is used as
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001736placeholder for the project name, and '${ref}' is used as
1737placeholder for the (change) ref.
1738
1739Empty, if accessed anonymously and the download scheme requires
1740authentication.
Edwin Kempineafde882015-05-11 15:40:44 +02001741|`clone_commands` ||
1742Clone commands as a map which maps the command name to the clone
1743command. In the clone command '${project}' is used as
Edwin Kempin4bf36ef2015-06-23 09:44:19 +02001744placeholder for the project name and '${project-base-name}' as name
1745for the project base name (e.g. for a project 'foo/bar' '${project}'
1746is a placeholder for 'foo/bar' and '${project-base-name}' is a
1747placeholder for 'bar').
Edwin Kempineafde882015-05-11 15:40:44 +02001748
1749Empty, if accessed anonymously and the download scheme requires
1750authentication.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001751|=================================
1752
Edwin Kempined846572015-07-24 14:17:11 +02001753[[email-confirmation-input]]
1754=== EmailConfirmationInput
1755The `EmailConfirmationInput` entity contains information for confirming
1756an email address.
1757
1758[options="header",cols="1,6"]
1759|=======================
1760|Field Name |Description
1761|`token` |
1762The token that was sent by mail to a newly registered email address.
1763|=======================
1764
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001765[[entries-info]]
1766=== EntriesInfo
1767The `EntriesInfo` entity contains information about the entries in a
1768cache.
1769
David Pursehouseae367192014-11-25 17:24:47 +09001770[options="header",cols="1,^1,5"]
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001771|==================================
1772|Field Name ||Description
1773|`mem` |optional|Number of cache entries that are held in memory.
1774|`disk` |optional|Number of cache entries on the disk. For non-disk
1775caches this value is not set; for disk caches it is only set if there
1776are entries in the cache.
1777|`space` |optional|
1778The space that is consumed by the cache on disk. The value is returned
1779with a unit abbreviation (`k`: kilobytes, `m`: megabytes,
1780`g`: gigabytes). Only set for disk caches.
1781|==================================
1782
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001783[[gerrit-info]]
1784=== GerritInfo
1785The `GerritInfo` entity contains information about Gerrit
1786configuration from the link:config-gerrit.html#gerrit[gerrit] section.
1787
Edwin Kempin50570542015-05-08 15:31:56 +02001788[options="header",cols="1,^1,5"]
1789|=================================
1790|Field Name ||Description
1791|`all_projects_name` ||
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001792Name of the link:config-gerrit.html#gerrit.allProjects[root project].
Edwin Kempin50570542015-05-08 15:31:56 +02001793|`all_users_name` ||
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001794Name of the link:config-gerrit.html#gerrit.allUsers[project in which
1795meta data of all users is stored].
Yuxuan 'fishy' Wanged1596b2015-11-09 16:32:45 -08001796|`doc_search` ||
1797Whether documentation search is available.
Dave Borowitza5d3fec2015-07-09 14:24:02 -07001798|`doc_url` |optional|
1799Custom base URL where Gerrit server documentation is located.
1800(Documentation may still be available at /Documentation relative to the
1801Gerrit base path even if this value is unset.)
Dave Borowitza17a9842015-09-15 09:58:17 -04001802|`edit_gpg_keys` |not set if `false`|
1803Whether to enable the web UI for editing GPG keys.
Edwin Kempin50570542015-05-08 15:31:56 +02001804|`report_bug_url` |optional|
1805link:config-gerrit.html#gerrit.reportBugUrl[URL to report bugs].
Edwin Kempin50570542015-05-08 15:31:56 +02001806|=================================
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001807
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001808[[hit-ration-info]]
1809=== HitRatioInfo
1810The `HitRatioInfo` entity contains information about the hit ratio of a
1811cache.
1812
David Pursehouseae367192014-11-25 17:24:47 +09001813[options="header",cols="1,^1,5"]
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001814|==================================
1815|Field Name ||Description
1816|`mem` ||
1817Hit ratio for cache entries that are held in memory (0 \<= value \<= 100).
1818|`disk` |optional|
1819Hit ratio for cache entries that are held on disk (0 \<= value \<= 100).
1820Only set for disk caches.
1821|==================================
1822
Edwin Kempind905e582014-05-28 16:54:36 +02001823[[jvm-summary-info]]
1824=== JvmSummaryInfo
1825The `JvmSummaryInfo` entity contains information about the JVM.
1826
David Pursehouseae367192014-11-25 17:24:47 +09001827[options="header",cols="1,^1,5"]
Edwin Kempind905e582014-05-28 16:54:36 +02001828|========================================
1829|Field Name ||Description
1830|`vm_vendor` ||The vendor of the virtual machine.
1831|`vm_name` ||The name of the virtual machine.
1832|`vm_version` ||The version of the virtual machine.
1833|`os_name` ||The name of the operating system.
1834|`os_version` ||The version of the operating system.
1835|`os_arch` ||The architecture of the operating system.
1836|`user` ||The user that is running Gerrit.
1837|`host` |optional|
1838The host on which Gerrit is running.
1839|`current_working_directory`||The current working directory.
1840|`site` ||The path to the review site.
1841|========================================
1842
1843[[mem-summary-info]]
1844=== MemSummaryInfo
1845The `MemSummaryInfo` entity contains information about the current
1846memory usage.
1847
David Pursehouseae367192014-11-25 17:24:47 +09001848[options="header",cols="1,^1,5"]
Edwin Kempind905e582014-05-28 16:54:36 +02001849|============================
1850|Field Name ||Description
1851|`total` ||
1852The total size of the memory. The value is returned with a unit
1853abbreviation (`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1854|`used` ||
1855The size of used memory. The value is returned with a unit abbreviation
1856(`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1857|`free` ||
1858The size of free memory. The value is returned with a unit abbreviation
1859(`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1860|`buffers` ||
1861The size of memory used for JGit buffers. The value is returned with a
1862unit abbreviation (`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1863|`max` ||
1864The maximal memory size. The value is returned with a unit abbreviation
1865(`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1866|`open_files` |optional|
1867The number of open files.
1868|============================
1869
Edwin Kempin7754d0c2015-07-09 15:11:49 +02001870[[plugin-config-info]]
1871=== PluginConfigInfo
1872The `PluginConfigInfo` entity contains information about Gerrit
1873extensions by plugins.
1874
1875[options="header",cols="1,^1,5"]
1876|===========================
1877|Field Name ||Description
1878|`has_avatars` |not set if `false`|
1879Whether an avatar provider is registered.
1880|===========================
1881
Dave Borowitz5170e0f2015-06-18 21:05:29 -04001882[[receive-info]]
1883=== ReceiveInfo
1884The `ReceiveInfo` entity contains information about the configuration
1885of git-receive-pack behavior on the server.
1886
1887[options="header",cols="1,^1,5"]
1888|=======================================
1889|Field Name ||Description
1890|`enableSignedPush`|optional|
1891Whether signed push validation support is enabled on the server; see the
1892link:config-gerrit.html#receive.certNonceSeed[global configuration] for
1893details.
1894|=======================================
1895
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001896[[server-info]]
1897=== ServerInfo
1898The `ServerInfo` entity contains information about the configuration of
1899the Gerrit server.
1900
1901[options="header",cols="1,^1,5"]
1902|=======================================
1903|Field Name ||Description
Edwin Kempinf0dacbd2017-08-30 16:17:17 +02001904|`accounts` ||
1905Information about the configuration from the
1906link:config-gerrit.html#accounts[accounts] section as
1907link:#accounts-config-info[AccountsConfigInfo] entity.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001908|`auth` ||
1909Information about the authentication configuration as
1910link:#auth-info[AuthInfo] entity.
Edwin Kempin50570542015-05-08 15:31:56 +02001911|`change` ||
1912Information about the configuration from the
1913link:config-gerrit.html#change[change] section as
1914link:#change-config-info[ChangeConfigInfo] entity.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001915|`download` ||
1916Information about the configured download options as
1917link:#download-info[DownloadInfo] entity.
1918information about Gerrit
1919|`gerrit` ||
1920Information about the configuration from the
1921link:config-gerrit.html#gerrit[gerrit] section as link:#gerrit-info[
1922GerritInfo] entity.
Edwin Kempin7c044322016-06-21 07:29:43 +02001923|`note_db_enabled` |not set if `false`|
David Pursehousea61ee502016-09-06 16:27:09 +09001924Whether the NoteDb storage backend is fully enabled.
Dave Borowitz6b4ac162018-08-27 14:06:15 -07001925|`plugin` ||
Edwin Kempin7754d0c2015-07-09 15:11:49 +02001926Information about Gerrit extensions by plugins as
1927link:#plugin-config-info[PluginConfigInfo] entity.
Dave Borowitz5170e0f2015-06-18 21:05:29 -04001928|`receive` |optional|
1929Information about the receive-pack configuration as a
1930link:#receive-info[ReceiveInfo] entity.
Edwin Kempina3188e12015-05-12 13:34:42 +02001931|`sshd` |optional|
1932Information about the configuration from the
1933link:config-gerrit.html#sshd[sshd] section as link:#sshd-info[SshdInfo]
1934entity. Not set if SSHD is disabled.
Edwin Kempin50570542015-05-08 15:31:56 +02001935|`suggest` ||
1936Information about the configuration from the
1937link:config-gerrit.html#suggest[suggest] section as link:#suggest-info[
1938SuggestInfo] entity.
Edwin Kempinfa0d4942015-07-16 12:38:52 +02001939|`url_aliases` |optional|
1940A map of URL aliases, where a regular expression for an URL token is
1941mapped to a target URL token. The target URL token can contain
1942placeholders for the groups matched by the regular expression: `$1` for
1943the first matched group, `$2` for the second matched group, etc.
Edwin Kempin50570542015-05-08 15:31:56 +02001944|`user` ||
1945Information about the configuration from the
1946link:config-gerrit.html#user[user] section as link:#user-config-info[
1947UserConfigInfo] entity.
Viktar Donich38252c52017-07-20 16:20:09 -07001948|`default_theme` |optional|
1949URL to a default PolyGerrit UI theme plugin, if available.
1950Located in `/static/gerrit-theme.html` by default.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001951|=======================================
1952
Edwin Kempina3188e12015-05-12 13:34:42 +02001953[[sshd-info]]
1954=== SshdInfo
1955The `SshdInfo` entity contains information about Gerrit
1956configuration from the link:config-gerrit.html#sshd[sshd]
1957section.
1958
1959This entity doesn't contain any data, but the presence of this (empty)
1960entity in the link:#server-info[ServerInfo] entity means that SSHD is
1961enabled on the server.
1962
Edwin Kempin50570542015-05-08 15:31:56 +02001963[[suggest-info]]
1964=== SuggestInfo
1965The `SuggestInfo` entity contains information about Gerrit
1966configuration from the link:config-gerrit.html#suggest[suggest]
1967section.
1968
1969[options="header",cols="1,6"]
1970|=======================
1971|Field Name |Description
1972|`from` |
1973The link:config-gerrit.html#suggest.from[number of characters] that a
1974user must have typed before suggestions are provided.
1975|=======================
1976
Edwin Kempind905e582014-05-28 16:54:36 +02001977[[summary-info]]
1978=== SummaryInfo
1979The `SummaryInfo` entity contains information about the current state
1980of the server.
1981
David Pursehouseae367192014-11-25 17:24:47 +09001982[options="header",cols="1,^1,5"]
Edwin Kempind905e582014-05-28 16:54:36 +02001983|============================
1984|Field Name ||Description
1985|`task_summary` ||
1986Summary about current tasks as a link:#task-summary-info[
1987TaskSummaryInfo] entity.
1988|`mem_summary` ||
1989Summary about current memory usage as a link:#mem-summary-info[
1990MemSummaryInfo] entity.
1991|`thread_summary` ||
1992Summary about current threads as a link:#thread-summary-info[
1993ThreadSummaryInfo] entity.
1994|`jvm_summary` |optional|
1995Summary about the JVM link:#jvm-summary-info[JvmSummaryInfo] entity.
1996Only set if the `jvm` option was set.
1997|============================
1998
Edwin Kempin49098b82014-06-10 22:55:13 +02001999[[task-info]]
2000=== TaskInfo
2001The `TaskInfo` entity contains information about a task in a background
2002work queue.
2003
David Pursehouseae367192014-11-25 17:24:47 +09002004[options="header",cols="1,^1,5"]
Edwin Kempin49098b82014-06-10 22:55:13 +02002005|====================================
2006|Field Name ||Description
2007|`id` ||The ID of the task.
2008|`state` ||
2009The state of the task, can be `DONE`, `CANCELLED`, `RUNNING`, `READY`,
2010`SLEEPING` and `OTHER`.
2011|`start_time` ||The start time of the task.
2012|`delay` ||The remaining delay of the task.
2013|`command` ||The command of the task.
2014|`remote_name`|optional|
2015The remote name. May only be set for tasks that are associated with a
2016project.
2017|`project` |optional|The project the task is associated with.
2018|====================================
2019
Edwin Kempind905e582014-05-28 16:54:36 +02002020[[task-summary-info]]
2021=== TaskSummaryInfo
2022The `TaskSummaryInfo` entity contains information about the current
2023tasks.
2024
David Pursehouseae367192014-11-25 17:24:47 +09002025[options="header",cols="1,^1,5"]
Edwin Kempind905e582014-05-28 16:54:36 +02002026|============================
2027|Field Name ||Description
2028|`total` |optional|
2029Total number of current tasks.
2030|`running` |optional|
2031Number of currently running tasks.
2032|`ready` |optional|
2033Number of currently ready tasks.
2034|`sleeping` |optional|
2035Number of currently sleeping tasks.
2036|============================
2037
2038[[thread-summary-info]]
2039=== ThreadSummaryInfo
2040The `ThreadSummaryInfo` entity contains information about the current
2041threads.
2042
David Pursehouseae367192014-11-25 17:24:47 +09002043[options="header",cols="1,6"]
Edwin Kempind905e582014-05-28 16:54:36 +02002044|===========================
2045|Field Name |Description
2046|`cpus` |
2047The number of available processors.
2048|`threads` |
2049The total number of current threads.
2050|`counts` |
2051Detailed thread counts as a map that maps a thread kind to a map that
2052maps a thread state to the thread count. The thread kinds group the
David Pursehousee9ccf872017-02-24 12:39:36 +09002053counts by threads that have the same name prefix (`H2`, `HTTP`,
Edwin Kempind905e582014-05-28 16:54:36 +02002054`IntraLineDiff`, `ReceiveCommits`, `SSH git-receive-pack`,
2055`SSH git-upload-pack`, `SSH-Interactive-Worker`, `SSH-Stream-Worker`,
David Pursehousee9ccf872017-02-24 12:39:36 +09002056`SshCommandStart`, `sshd-SshServer`). The counts for other threads are
2057available under the thread kind `Other`. Counts for the following thread
2058states can be included: `NEW`, `RUNNABLE`, `BLOCKED`, `WAITING`,
2059`TIMED_WAITING` and `TERMINATED`.
Edwin Kempind905e582014-05-28 16:54:36 +02002060|===========================
2061
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02002062[[top-menu-entry-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002063=== TopMenuEntryInfo
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02002064The `TopMenuEntryInfo` entity contains information about a top menu
2065entry.
2066
David Pursehouseae367192014-11-25 17:24:47 +09002067[options="header",cols="1,6"]
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02002068|=================================
2069|Field Name |Description
2070|`name` |Name of the top menu entry.
2071|`items` |List of link:#top-menu-item-info[menu items].
2072|=================================
2073
2074[[top-menu-item-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002075=== TopMenuItemInfo
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02002076The `TopMenuItemInfo` entity contains information about a menu item in
2077a top menu entry.
2078
David Pursehouseae367192014-11-25 17:24:47 +09002079[options="header",cols="1,^1,5"]
Edwin Kempin002c9cb2013-11-06 09:10:47 +01002080|========================
2081|Field Name ||Description
2082|`url` ||The URL of the menu item link.
2083|`name` ||The name of the menu item.
2084|`target` ||Target attribute of the menu item link.
2085|`id` |optional|The `id` attribute of the menu item link.
2086|========================
David Ostrovsky28b8ea62013-06-09 02:16:57 +02002087
Edwin Kempin50570542015-05-08 15:31:56 +02002088[[user-config-info]]
2089=== UserConfigInfo
2090The `UserConfigInfo` entity contains information about Gerrit
2091configuration from the link:config-gerrit.html#user[user] section.
2092
2093[options="header",cols="1,6"]
2094|====================================
2095|Field Name |Description
2096|`anonymous_coward_name` |
2097link:config-gerrit.html#user.anonymousCoward[Username] that is
2098displayed in the Gerrit Web UI and in e-mail notifications if the full
2099name of the user is not set.
2100|====================================
2101
2102
David Ostrovsky28b8ea62013-06-09 02:16:57 +02002103GERRIT
2104------
2105Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -07002106
2107SEARCHBOX
2108---------