blob: 3d18abb32c960c46a7488b9abc46e76ba91c0f6a [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"
Dave Borowitzf4599a02016-09-19 21:51:51 +0200129 "doc_search": true,
130 "web_uis": [
131 "gwt"
132 ]
Edwin Kempin50570542015-05-08 15:31:56 +0200133 },
Edwin Kempina3188e12015-05-12 13:34:42 +0200134 "sshd": {},
Edwin Kempin50570542015-05-08 15:31:56 +0200135 "suggest": {
136 "from": 0
137 },
138 "user": {
Han-Wen Nienhuys3fb723d2017-11-20 19:21:13 +0100139 "anonymous_coward_name": "Name of user not set"
Edwin Kempinb8590bd2015-04-30 12:55:34 +0200140 }
141 }
142----
143
Edwin Kempin54fd1d32017-03-24 15:32:03 +0100144[[check-consistency]]
145=== Check Consistency
146--
Edwin Kempin2ee52f82017-04-25 11:04:28 +0200147'POST /config/server/check.consistency'
Edwin Kempin54fd1d32017-03-24 15:32:03 +0100148--
149
150Runs consistency checks and returns detected problems.
151
152Input for the consistency checks that should be run must be provided in
153the request body inside a
154link:#consistency-check-input[ConsistencyCheckInput] entity.
155
156.Request
157----
Edwin Kempin2ee52f82017-04-25 11:04:28 +0200158 POST /config/server/check.consistency HTTP/1.0
Edwin Kempin54fd1d32017-03-24 15:32:03 +0100159 Content-Type: application/json; charset=UTF-8
160
161 {
Edwin Kempin6396d6d2017-05-30 10:41:28 +0200162 "check_accounts": {},
Edwin Kempin54fd1d32017-03-24 15:32:03 +0100163 "check_account_external_ids": {}
164 }
165----
166
167As result a link:#consistency-check-info[ConsistencyCheckInfo] entity
168is returned that contains detected consistency problems.
169
170.Response
171----
172 HTTP/1.1 200 OK
173 Content-Type: application/json; charset=UTF-8
174
175 )]}'
176 {
Edwin Kempin6396d6d2017-05-30 10:41:28 +0200177 "check_accounts_result": {
178 "problems": [
179 {
180 "status": "ERROR",
181 "message": "Account \u00271000024\u0027 has no external ID for its preferred email \u0027foo.bar@example.com\u0027"
182 }
183 ]
184 }
Edwin Kempindadd3032017-05-30 09:46:44 +0200185 "check_account_external_ids_result": {
186 "problems": [
187 {
188 "status": "ERROR",
189 "message": "External ID \u0027uuid:ccb8d323-1361-45aa-8874-41987a660c46\u0027 belongs to account that doesn\u0027t exist: 1000012"
190 }
191 ]
Edwin Kempin54fd1d32017-03-24 15:32:03 +0100192 }
193 }
194----
195
Han-Wen Nienhuyse04df7e2017-04-25 17:41:58 +0200196
Edwin Kempined846572015-07-24 14:17:11 +0200197[[confirm-email]]
198=== Confirm Email
199--
200'PUT /config/server/email.confirm'
201--
202
203Confirms that the user owns an email address.
204
205The email token must be provided in the request body inside
206an link:#email-confirmation-input[EmailConfirmationInput] entity.
207
208.Request
209----
210 PUT /config/server/email.confirm HTTP/1.0
211 Content-Type: application/json; charset=UTF-8
212
213 {
214 "token": "Enim+QNbAo6TV8Hur8WwoUypI6apG7qBPvF+bw==$MTAwMDAwNDp0ZXN0QHRlc3QuZGU="
215 }
216----
217
218The response is "`204 No Content`".
219
220If the token is invalid or if it's the token of another user the
221request fails and the response is "`422 Unprocessable Entity`".
222
Edwin Kempinb8590bd2015-04-30 12:55:34 +0200223
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200224[[list-caches]]
225=== List Caches
226--
227'GET /config/server/caches/'
228--
229
230Lists the caches of the server. Caches defined by plugins are included.
231
Dave Borowitz664d0402015-06-11 15:35:48 -0400232The caller must be a member of a group that is granted one of the
233following capabilities:
234
235* link:access-control.html#capability_viewCaches[View Caches]
236* link:access-control.html#capability_maintainServer[Maintain Server]
237* link:access-control.html#capability_administrateServer[Administrate Server]
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200238
239As result a map of link:#cache-info[CacheInfo] entities is returned.
240
241The entries in the map are sorted by cache name.
242
243.Request
244----
245 GET /config/server/caches/ HTTP/1.0
246----
247
248.Response
249----
250 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900251 Content-Type: application/json; charset=UTF-8
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200252
253 )]}'
254 {
255 "accounts": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200256 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200257 "entries": {
258 "mem": 4
259 },
260 "average_get": "2.5ms",
261 "hit_ratio": {
262 "mem": 94
263 }
264 },
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200265 "adv_bases": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200266 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200267 "entries": {},
268 "hit_ratio": {}
269 },
270 "change_kind": {
271 "type": "DISK",
272 "entries": {
273 "space": "0.00k"
274 },
275 "hit_ratio": {}
276 },
277 "changes": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200278 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200279 "entries": {},
280 "hit_ratio": {}
281 },
282 "conflicts": {
283 "type": "DISK",
284 "entries": {
285 "mem": 2,
286 "disk": 3,
287 "space": "2.75k"
288 },
289 "hit_ratio": {
290 "mem": 0,
291 "disk": 100
292 }
293 },
294 "diff": {
295 "type": "DISK",
296 "entries": {
297 "mem": 177,
298 "disk": 253,
299 "space": "170.97k"
300 },
301 "average_get": "1.1ms",
302 "hit_ratio": {
303 "mem": 67,
304 "disk": 100
305 }
306 },
307 "diff_intraline": {
308 "type": "DISK",
309 "entries": {
310 "mem": 1,
311 "disk": 1,
312 "space": "0.37k"
313 },
314 "average_get": "6.8ms",
315 "hit_ratio": {
316 "mem": 0
317 }
318 },
319 "git_tags": {
320 "type": "DISK",
321 "entries": {
322 "space": "0.00k"
323 },
324 "hit_ratio": {}
325 },
326 groups": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200327 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200328 "entries": {
329 "mem": 27
330 },
331 "average_get": "183.2us",
332 "hit_ratio": {
333 "mem": 12
334 }
335 },
Alice Kober-Sotzek864ed142017-10-12 14:24:36 +0200336 "groups_bymember": {
337 "type": "MEM",
338 "entries": {},
339 "hit_ratio": {}
340 },
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200341 "groups_byname": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200342 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200343 "entries": {},
344 "hit_ratio": {}
345 },
Alice Kober-Sotzek3e1fe1b2017-10-12 14:44:17 +0200346 "groups_bysubgroup": {
347 "type": "MEM",
348 "entries": {},
349 "hit_ratio": {}
350 },
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200351 "groups_byuuid": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200352 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200353 "entries": {
354 "mem": 25
355 },
356 "average_get": "173.4us",
357 "hit_ratio": {
358 "mem": 13
359 }
360 },
361 "groups_external": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200362 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200363 "entries": {},
364 "hit_ratio": {}
365 },
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200366 "permission_sort": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200367 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200368 "entries": {
369 "mem": 16
370 },
371 "hit_ratio": {
372 "mem": 96
373 }
374 },
375 "plugin_resources": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200376 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200377 "entries": {
378 "mem": 2
379 },
380 "hit_ratio": {
381 "mem": 83
382 }
383 },
384 "project_list": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200385 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200386 "entries": {
387 "mem": 1
388 },
389 "average_get": "18.6ms",
390 "hit_ratio": {
391 "mem": 0
392 }
393 },
394 "projects": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200395 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200396 "entries": {
397 "mem": 35
398 },
399 "average_get": "8.6ms",
400 "hit_ratio": {
401 "mem": 99
402 }
403 },
404 "quota-repo_size": {
405 "type": "DISK",
406 "entries": {
407 "space": "0.00k"
408 },
409 "hit_ratio": {}
410 },
411 "sshkeys": {
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200412 "type": "MEM",
Edwin Kempin42c9cf62014-05-23 08:45:56 +0200413 "entries": {
414 "mem": 1
415 },
416 "average_get": "3.2ms",
417 "hit_ratio": {
418 "mem": 50
419 }
420 },
421 "web_sessions": {
422 "type": "DISK",
423 "entries": {
424 "mem": 1,
425 "disk": 2,
426 "space": "0.78k"
427 },
428 "hit_ratio": {
429 "mem": 82
430 }
431 }
432 }
433----
434
Edwin Kempin8dd94122014-05-28 12:04:17 +0200435It is possible to get different output formats by specifying the
436`format` option:
437
438* `LIST`:
439+
440Returns the cache names as JSON list.
441+
David Pursehouse33a3c252016-11-15 16:55:33 -0800442The cache names are lexicographically sorted.
Edwin Kempin8dd94122014-05-28 12:04:17 +0200443+
444.Request
445----
446 GET /config/server/caches/?format=LIST HTTP/1.0
447----
448+
449.Response
450----
451 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900452 Content-Type: application/json; charset=UTF-8
Edwin Kempin8dd94122014-05-28 12:04:17 +0200453
454 )]}'
455 [
456 "accounts",
Edwin Kempin8dd94122014-05-28 12:04:17 +0200457 "adv_bases",
458 "change_kind",
459 "changes",
460 "conflicts",
461 "diff",
462 "diff_intraline",
463 "git_tags",
464 "groups",
Alice Kober-Sotzek864ed142017-10-12 14:24:36 +0200465 "groups_bymember",
Edwin Kempin8dd94122014-05-28 12:04:17 +0200466 "groups_byname",
Alice Kober-Sotzek3e1fe1b2017-10-12 14:44:17 +0200467 "groups_bysubgroup",
Edwin Kempin8dd94122014-05-28 12:04:17 +0200468 "groups_byuuid",
469 "groups_external",
Edwin Kempin8dd94122014-05-28 12:04:17 +0200470 "permission_sort",
471 "plugin_resources",
472 "project_list",
473 "projects",
474 "quota-repo_size",
475 "sshkeys",
476 "web_sessions"
477 ]
478----
479
480* `TEXT_LIST`:
481+
482Returns the cache names as a UTF-8 list that is base64 encoded. The
483cache names are delimited by '\n'.
484+
485The cache names are lexicographically sorted.
486+
487.Request
488----
489 GET /config/server/caches/?format=TEXT_LIST HTTP/1.0
490----
491+
492.Response
493----
494 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900495 Content-Type: text/plain; charset=UTF-8
Edwin Kempin8dd94122014-05-28 12:04:17 +0200496
497 YWNjb3VudHMKYW...ViX3Nlc3Npb25z
498----
499+
500E.g. this could be used to flush all caches:
501+
502----
Han-Wen Nienhuys84d830b2017-02-15 16:36:04 +0100503 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 +0200504 do
Han-Wen Nienhuys84d830b2017-02-15 16:36:04 +0100505 curl --user jdoe:TNAuLkXsIV7w -X POST http://gerrit/a/config/server/caches/$c/flush
Edwin Kempin8dd94122014-05-28 12:04:17 +0200506 done
507----
508
David Pursehousea012b012014-07-10 14:00:40 +0900509[[cache-operations]]
Edwin Kempina4286832014-05-28 14:17:22 +0200510=== Cache Operations
511--
512'POST /config/server/caches/'
513--
514
515Executes a cache operation that is specified in the request body in a
516link:#cache-operation-input[CacheOperationInput] entity.
517
518[[flush-all-caches]]
519==== Flush All Caches
520
521.Request
522----
523 POST /config/server/caches/ HTTP/1.0
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900524 Content-Type: application/json; charset=UTF-8
Edwin Kempina4286832014-05-28 14:17:22 +0200525
526 {
527 "operation": "FLUSH_ALL"
528 }
529----
530
531.Response
532----
533 HTTP/1.1 200 OK
534----
535
Edwin Kempina3c6d032014-05-28 14:46:44 +0200536[[flush-several-caches]]
537==== Flush Several Caches At Once
538
539.Request
540----
541 POST /config/server/caches/ HTTP/1.0
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900542 Content-Type: application/json; charset=UTF-8
Edwin Kempina3c6d032014-05-28 14:46:44 +0200543
544 {
Adrian Görler25125102014-08-13 15:00:44 +0200545 "operation": "FLUSH",
Edwin Kempina3c6d032014-05-28 14:46:44 +0200546 "caches": [
547 "projects",
548 "project_list"
549 ]
550 }
551----
552
553.Response
554----
555 HTTP/1.1 200 OK
556----
557
Edwin Kempin57a46822014-05-23 10:24:41 +0200558[[get-cache]]
559=== Get Cache
560--
561'GET /config/server/caches/link:#cache-name[\{cache-name\}]'
562--
563
564Retrieves information about a cache.
565
Dave Borowitz664d0402015-06-11 15:35:48 -0400566The caller must be a member of a group that is granted one of the
567following capabilities:
568
569* link:access-control.html#capability_viewCaches[View Caches]
570* link:access-control.html#capability_maintainServer[Maintain Server]
571* link:access-control.html#capability_administrateServer[Administrate Server]
Edwin Kempin57a46822014-05-23 10:24:41 +0200572
573As result a link:#cache-info[CacheInfo] entity is returned.
574
575.Request
576----
577 GET /config/server/caches/projects HTTP/1.0
578----
579
580.Response
581----
582 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900583 Content-Type: application/json; charset=UTF-8
Edwin Kempin57a46822014-05-23 10:24:41 +0200584
585 )]}'
586 {
587 "name": "projects",
Edwin Kempinf11eadc2014-06-24 15:23:52 +0200588 "type": "MEM",
Edwin Kempin57a46822014-05-23 10:24:41 +0200589 "entries": {
590 "mem": 35
591 },
592 "average_get": " 8.6ms",
593 "hit_ratio": {
594 "mem": 99
595 }
596 }
597----
598
Edwin Kempin37cc41a2014-05-23 10:52:20 +0200599[[flush-cache]]
600=== Flush Cache
601--
602'POST /config/server/caches/link:#cache-name[\{cache-name\}]/flush'
603--
604
605Flushes a cache.
606
Dave Borowitz664d0402015-06-11 15:35:48 -0400607The caller must be a member of a group that is granted one of the
608following capabilities:
Edwin Kempin37cc41a2014-05-23 10:52:20 +0200609
Dave Borowitz664d0402015-06-11 15:35:48 -0400610* link:access-control.html#capability_flushCaches[Flush Caches] (any cache
611 except "web_sessions")
612* link:access-control.html#capability_maintainServer[Maintain Server] (any cache
613 including "web_sessions")
614* link:access-control.html#capability_administrateServer[Administrate Server]
615 (any cache including "web_sessions")
Edwin Kempin37cc41a2014-05-23 10:52:20 +0200616
617.Request
618----
619 POST /config/server/caches/projects/flush HTTP/1.0
620----
621
622.Response
623----
624 HTTP/1.1 200 OK
625----
626
Edwin Kempind905e582014-05-28 16:54:36 +0200627[[get-summary]]
628=== Get Summary
629--
630'GET /config/server/summary'
631--
632
633Retrieves a summary of the current server state.
634
635The caller must be a member of a group that is granted the
636link:access-control.html#capability_administrateServer[Administrate
637Server] capability.
638
639The following options are supported:
640
641* `jvm`:
642+
643Includes a JVM summary.
644
645* `gc`:
646+
647Requests a Java garbage collection before computing the information
648about the Java memory heap.
649
650.Request
651----
652 GET /config/server/summary?jvm HTTP/1.0
653----
654
655As result a link:#summary-info[SummaryInfo] entity is returned.
656
657.Response
658----
659 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900660 Content-Type: application/json; charset=UTF-8
Edwin Kempind905e582014-05-28 16:54:36 +0200661
662 )]}'
663 {
664 "task_summary": {
665 "total": 2,
666 "sleeping": 2
667 },
668 "mem_summary": {
669 "total": "341.06m",
670 "used": "57.16m",
671 "free": "283.90m",
672 "buffers": "0.00k",
673 "max": "1.67g",
674 }
675 "thread_summary": {
676 "cpus": 8,
677 "threads": 44,
678 "counts": {
679 "HTTP": {
680 "RUNNABLE": 3,
681 "TIMED_WAITING": 2
682 },
683 "SSH-Interactive-Worker": {
684 "WAITING": 1
685 },
686 "Other": {
687 "WAITING": 10,
688 "RUNNABLE": 2,
689 "TIMED_WAITING": 25
690 },
691 "SshCommandStart": {
692 "WAITING": 1
693 }
694 }
695 },
696 "jvm_summary": {
697 "vm_vendor": "Oracle Corporation",
698 "vm_name": "Java HotSpot(TM) 64-Bit Server VM",
699 "vm_version": "23.25-b01",
700 "os_name": "Mac OS X",
701 "os_version": "10.8.5",
702 "os_arch": "x86_64",
703 "user": "gerrit",
704 "host": "GERRIT",
705 "current_working_directory": "/Users/gerrit/site",
706 "site": "/Users/gerrit/site"
707 }
708 }
709----
710
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200711[[list-capabilities]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800712=== List Capabilities
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800713--
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200714'GET /config/server/capabilities'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800715--
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200716
David Pursehouse538a1b92013-06-12 10:45:54 +0200717Lists the capabilities that are available in the system. There are two
718kinds of capabilities: core and plugin-owned capabilities.
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200719
David Pursehouse538a1b92013-06-12 10:45:54 +0200720As result a map of link:#capability-info[CapabilityInfo] entities is
721returned.
722
723The entries in the map are sorted by capability ID.
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200724
725.Request
726----
727 GET /config/server/capabilities/ HTTP/1.0
728----
729
730.Response
731----
732 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900733 Content-Type: application/json; charset=UTF-8
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200734
735 )]}'
736 {
737 "accessDatabase": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200738 "id": "accessDatabase",
739 "name": "Access Database"
740 },
741 "administrateServer": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200742 "id": "administrateServer",
743 "name": "Administrate Server"
744 },
745 "createAccount": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200746 "id": "createAccount",
747 "name": "Create Account"
748 },
749 "createGroup": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200750 "id": "createGroup",
751 "name": "Create Group"
752 },
753 "createProject": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200754 "id": "createProject",
755 "name": "Create Project"
756 },
757 "emailReviewers": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200758 "id": "emailReviewers",
759 "name": "Email Reviewers"
760 },
761 "flushCaches": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200762 "id": "flushCaches",
763 "name": "Flush Caches"
764 },
765 "killTask": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200766 "id": "killTask",
767 "name": "Kill Task"
768 },
769 "priority": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200770 "id": "priority",
771 "name": "Priority"
772 },
773 "queryLimit": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200774 "id": "queryLimit",
775 "name": "Query Limit"
776 },
777 "runGC": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200778 "id": "runGC",
779 "name": "Run Garbage Collection"
780 },
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200781 "streamEvents": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200782 "id": "streamEvents",
783 "name": "Stream Events"
784 },
785 "viewCaches": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200786 "id": "viewCaches",
787 "name": "View Caches"
788 },
789 "viewConnections": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200790 "id": "viewConnections",
791 "name": "View Connections"
792 },
Edwin Kempin362b14d12014-05-09 14:18:12 +0200793 "viewPlugins": {
Edwin Kempin362b14d12014-05-09 14:18:12 +0200794 "id": "viewPlugins",
795 "name": "View Plugins"
796 },
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200797 "viewQueue": {
David Ostrovsky28b8ea62013-06-09 02:16:57 +0200798 "id": "viewQueue",
799 "name": "View Queue"
800 }
801 }
802----
803
Edwin Kempin49098b82014-06-10 22:55:13 +0200804[[list-tasks]]
805=== List Tasks
806--
807'GET /config/server/tasks/'
808--
809
810Lists the tasks from the background work queues that the Gerrit daemon
811is currently performing, or will perform in the near future.
812
813Gerrit contains an internal scheduler, similar to cron, that it uses to
814queue and dispatch both short and long term tasks.
815
816Tasks that are completed or canceled exit the queue very quickly once
817they enter this state, but it can be possible to observe tasks in these
818states.
819
820End-users may see a task only if they can also see the project the task
821is associated with. Tasks operating on other projects, or that do not
822have a specific project, are hidden.
823
Dave Borowitz664d0402015-06-11 15:35:48 -0400824The caller must be a member of a group that is granted one of the
825following capabilities:
826
827* link:access-control.html#capability_viewQueue[View Queue]
828* link:access-control.html#capability_maintainServer[Maintain Server]
829* link:access-control.html#capability_administrateServer[Administrate Server]
Edwin Kempin49098b82014-06-10 22:55:13 +0200830
831As result a list of link:#task-info[TaskInfo] entities is returned.
832
833The entries in the list are sorted by task state, remaining delay and
834command.
835
836.Request
837----
838 GET /config/server/tasks/ HTTP/1.0
839----
840
841.Response
842----
843 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900844 Content-Type: application/json; charset=UTF-8
Edwin Kempin49098b82014-06-10 22:55:13 +0200845
846 )]}'
847 [
848 {
849 "id": "1e688bea",
850 "state": "SLEEPING",
851 "start_time": "2014-06-11 12:58:51.991000000",
852 "delay": 3453,
853 "command": "Reload Submit Queue"
854 },
855 {
856 "id": "3e6d4ffa",
857 "state": "SLEEPING",
858 "start_time": "2014-06-11 12:58:51.508000000",
859 "delay": 3287966,
860 "command": "Log File Compressor"
861 }
862 ]
863----
864
Edwin Kempin32e3a522014-07-08 12:10:31 +0200865[[get-task]]
866=== Get Task
867--
868'GET /config/server/tasks/link:#task-id[\{task-id\}]'
869--
870
871Retrieves a task from the background work queue that the Gerrit daemon
872is currently performing, or will perform in the near future.
873
874End-users may see a task only if they can also see the project the task
875is associated with. Tasks operating on other projects, or that do not
876have a specific project, are hidden.
877
Dave Borowitz664d0402015-06-11 15:35:48 -0400878The caller must be a member of a group that is granted one of the
879following capabilities:
880
881* link:access-control.html#capability_viewQueue[View Queue]
882* link:access-control.html#capability_maintainServer[Maintain Server]
883* link:access-control.html#capability_administrateServer[Administrate Server]
Edwin Kempin32e3a522014-07-08 12:10:31 +0200884
885As result a link:#task-info[TaskInfo] entity is returned.
886
887.Request
888----
889 GET /config/server/tasks/1e688bea HTTP/1.0
890----
891
892.Response
893----
894 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900895 Content-Type: application/json; charset=UTF-8
Edwin Kempin32e3a522014-07-08 12:10:31 +0200896
897 )]}'
898 {
899 "id": "1e688bea",
900 "state": "SLEEPING",
901 "start_time": "2014-06-11 12:58:51.991000000",
902 "delay": 3453,
903 "command": "Reload Submit Queue"
904 }
905----
906
Edwin Kempin7e283812014-07-08 12:49:03 +0200907[[delete-task]]
908=== Delete Task
909--
910'DELETE /config/server/tasks/link:#task-id[\{task-id\}]'
911--
912
913Kills a task from the background work queue that the Gerrit daemon
914is currently performing, or will perform in the near future.
915
Dave Borowitz664d0402015-06-11 15:35:48 -0400916The caller must be a member of a group that is granted one of the
917following capabilities:
918
919* link:access-control.html#capability_kill[Kill Task]
920* link:access-control.html#capability_maintainServer[Maintain Server]
921* link:access-control.html#capability_administrateServer[Administrate Server]
Edwin Kempin7e283812014-07-08 12:49:03 +0200922
923End-users may see a task only if they can also see the project the task
924is associated with. Tasks operating on other projects, or that do not
925have a specific project, are hidden.
926
Dave Borowitz664d0402015-06-11 15:35:48 -0400927Members of a group granted one of the following capabilities may view
928all tasks:
929
930* link:access-control.html#capability_viewQueue[View Queue]
931* link:access-control.html#capability_maintainServer[Maintain Server]
932* link:access-control.html#capability_administrateServer[Administrate Server]
Edwin Kempin7e283812014-07-08 12:49:03 +0200933
934.Request
935----
936 DELETE /config/server/tasks/1e688bea HTTP/1.0
937----
938
939.Response
940----
941 HTTP/1.1 204 No Content
942----
943
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +0200944[[get-top-menus]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800945=== Get Top Menus
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800946--
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +0200947'GET /config/server/top-menus'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800948--
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +0200949
950Returns the list of additional top menu entries.
951
952.Request
953----
954 GET /config/server/top-menus HTTP/1.0
955----
956
957As response a list of the additional top menu entries as
958link:#top-menu-entry-info[TopMenuEntryInfo] entities is returned.
959
960.Response
961----
962 HTTP/1.1 200 OK
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900963 Content-Type: application/json; charset=UTF-8
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +0200964
965 )]}'
966 [
967 {
968 "name": "Top Menu Entry",
969 "items": [
970 {
971 "url": "http://gerrit.googlecode.com/",
972 "name": "Gerrit",
973 "target": "_blank"
974 }
975 ]
976 }
977 ]
978----
979
Edwin Kempine9f5da32016-06-03 17:08:34 +0200980[[get-user-preferences]]
981=== Get Default User Preferences
982--
983'GET /config/server/preferences'
984--
985
986Returns the default user preferences for the server.
987
988.Request
989----
990 GET /a/config/server/preferences HTTP/1.0
991----
992
993As response a link:rest-api-accounts.html#preferences-info[
994PreferencesInfo] is returned.
995
996.Response
997----
998 HTTP/1.1 200 OK
999 Content-Type: application/json; charset=UTF-8
1000
1001 )]}'
1002 {
1003 "changes_per_page": 25,
1004 "show_site_header": true,
1005 "use_flash_clipboard": true,
1006 "download_command": "CHECKOUT",
1007 "date_format": "STD",
1008 "time_format": "HHMM_12",
1009 "diff_view": "SIDE_BY_SIDE",
1010 "size_bar_in_change_table": true,
1011 "review_category_strategy": "NONE",
1012 "mute_common_path_prefixes": true,
Dave Borowitzd6ee48e2017-04-27 10:32:42 -04001013 "publish_comments_on_push": true,
Edwin Kempine9f5da32016-06-03 17:08:34 +02001014 "my": [
1015 {
1016 "url": "#/dashboard/self",
1017 "name": "Changes"
1018 },
1019 {
Edwin Kempine9f5da32016-06-03 17:08:34 +02001020 "url": "#/q/has:draft",
1021 "name": "Draft Comments"
1022 },
1023 {
1024 "url": "#/q/has:edit",
1025 "name": "Edits"
1026 },
1027 {
1028 "url": "#/q/is:watched+is:open",
1029 "name": "Watched Changes"
1030 },
1031 {
1032 "url": "#/q/is:starred",
1033 "name": "Starred Changes"
1034 },
1035 {
1036 "url": "#/groups/self",
1037 "name": "Groups"
1038 }
1039 ],
1040 "email_strategy": "ENABLED"
1041 }
1042----
1043
1044[[set-user-preferences]]
1045=== Set Default User Preferences
1046
1047--
1048'PUT /config/server/preferences'
1049--
1050
1051Sets the default user preferences for the server.
1052
1053The new user preferences must be provided in the request body as a
1054link:rest-api-accounts.html#preferences-input[PreferencesInput]
1055entity.
1056
1057To be allowed to set default preferences, a user must be a member of
1058a group that is granted the
1059link:access-control.html#capability_administrateServer[
1060Administrate Server] capability.
1061
1062.Request
1063----
1064 PUT /a/config/server/preferences HTTP/1.0
1065 Content-Type: application/json; charset=UTF-8
1066
1067 {
1068 "changes_per_page": 50
1069 }
1070----
1071
1072As response a link:rest-api-accounts.html#preferences-info[
1073PreferencesInfo] is returned.
1074
1075.Response
1076----
1077 HTTP/1.1 200 OK
1078 Content-Type: application/json; charset=UTF-8
1079
1080 )]}'
1081 {
1082 "changes_per_page": 50,
1083 "show_site_header": true,
1084 "use_flash_clipboard": true,
1085 "download_command": "CHECKOUT",
1086 "date_format": "STD",
1087 "time_format": "HHMM_12",
1088 "diff_view": "SIDE_BY_SIDE",
1089 "size_bar_in_change_table": true,
1090 "review_category_strategy": "NONE",
1091 "mute_common_path_prefixes": true,
Dave Borowitzd6ee48e2017-04-27 10:32:42 -04001092 "publish_comments_on_push": true,
Edwin Kempine9f5da32016-06-03 17:08:34 +02001093 "my": [
1094 {
1095 "url": "#/dashboard/self",
1096 "name": "Changes"
1097 },
1098 {
Edwin Kempine9f5da32016-06-03 17:08:34 +02001099 "url": "#/q/has:draft",
1100 "name": "Draft Comments"
1101 },
1102 {
1103 "url": "#/q/has:edit",
1104 "name": "Edits"
1105 },
1106 {
1107 "url": "#/q/is:watched+is:open",
1108 "name": "Watched Changes"
1109 },
1110 {
1111 "url": "#/q/is:starred",
1112 "name": "Starred Changes"
1113 },
1114 {
1115 "url": "#/groups/self",
1116 "name": "Groups"
1117 }
1118 ],
1119 "email_strategy": "ENABLED"
1120 }
1121----
1122
Sven Selbergc60abbd2016-05-17 15:26:33 +02001123[[get-diff-preferences]]
Edwin Kempinc8b90342016-06-23 13:20:52 +02001124=== Get Default Diff Preferences
Sven Selbergc60abbd2016-05-17 15:26:33 +02001125
1126--
1127'GET /config/server/preferences.diff'
1128--
1129
1130Returns the default diff preferences for the server.
1131
1132.Request
1133----
1134 GET /a/config/server/preferences.diff HTTP/1.0
1135----
1136
1137As response a link:rest-api-accounts.html#diff-preferences-info[
1138DiffPreferencesInfo] is returned.
1139
1140.Response
1141----
1142 HTTP/1.1 200 OK
1143 Content-Type: application/json; charset=UTF-8
1144
1145 )]}'
1146 {
1147 "context": 10,
1148 "tab_size": 8,
1149 "line_length": 100,
1150 "cursor_blink_rate": 0,
1151 "intraline_difference": true,
1152 "show_line_endings": true,
1153 "show_tabs": true,
1154 "show_whitespace_errors": true,
1155 "syntax_highlighting": true,
1156 "auto_hide_diff_table_header": true,
1157 "theme": "DEFAULT",
1158 "ignore_whitespace": "IGNORE_NONE"
1159 }
1160----
1161
1162[[set-diff-preferences]]
Edwin Kempinc8b90342016-06-23 13:20:52 +02001163=== Set Default Diff Preferences
Sven Selbergc60abbd2016-05-17 15:26:33 +02001164
1165--
1166'PUT /config/server/preferences.diff'
1167--
1168
Edwin Kempinc8b90342016-06-23 13:20:52 +02001169Sets the default diff preferences for the server.
1170
1171The new diff preferences must be provided in the request body as a
1172link:rest-api-accounts.html#diff-preferences-input[
1173DiffPreferencesInput] entity.
1174
1175To be allowed to set default diff preferences, a user must be a member
1176of a group that is granted the
1177link:access-control.html#capability_administrateServer[
1178Administrate Server] capability.
Sven Selbergc60abbd2016-05-17 15:26:33 +02001179
1180.Request
1181----
1182 PUT /a/config/server/preferences.diff HTTP/1.0
1183 Content-Type: application/json; charset=UTF-8
1184
1185 {
1186 "context": 10,
1187 "tab_size": 8,
1188 "line_length": 80,
1189 "cursor_blink_rate": 0,
1190 "intraline_difference": true,
1191 "show_line_endings": true,
1192 "show_tabs": true,
1193 "show_whitespace_errors": true,
1194 "syntax_highlighting": true,
1195 "auto_hide_diff_table_header": true,
1196 "theme": "DEFAULT",
1197 "ignore_whitespace": "IGNORE_NONE"
1198 }
1199----
1200
1201As response a link:rest-api-accounts.html#diff-preferences-info[
1202DiffPreferencesInfo] is returned.
1203
1204.Response
1205----
1206 HTTP/1.1 200 OK
1207 Content-Type: application/json; charset=UTF-8
1208
1209 )]}'
1210 {
1211 "context": 10,
1212 "tab_size": 8,
1213 "line_length": 80,
1214 "cursor_blink_rate": 0,
1215 "intraline_difference": true,
1216 "show_line_endings": true,
1217 "show_tabs": true,
1218 "show_whitespace_errors": true,
1219 "syntax_highlighting": true,
1220 "auto_hide_diff_table_header": true,
1221 "theme": "DEFAULT",
1222 "ignore_whitespace": "IGNORE_NONE"
1223 }
1224----
1225
Edwin Kempin1e01692e2018-01-17 11:01:00 +01001226[[get-edit-preferences]]
1227=== Get Default Edit Preferences
1228
1229--
1230'GET /config/server/preferences.edit'
1231--
1232
1233Returns the default edit preferences for the server.
1234
1235.Request
1236----
1237 GET /a/config/server/preferences.edit HTTP/1.0
1238----
1239
1240As response a link:rest-api-accounts.html#edit-preferences-info[
1241EditPreferencesInfo] is returned.
1242
1243.Response
1244----
1245 HTTP/1.1 200 OK
1246 Content-Type: application/json; charset=UTF-8
1247
1248 )]}'
1249 {
1250 "tab_size": 8,
1251 "line_length": 100,
1252 "indent_unit": 2,
1253 "cursor_blink_rate": 0,
1254 "show_tabs": true,
1255 "syntax_highlighting": true,
1256 "match_brackets": true,
1257 "auto_close_brackets": true,
1258 "theme": "DEFAULT",
1259 "key_map_type": "DEFAULT"
1260 }
1261----
1262
1263[[set-edit-preferences]]
1264=== Set Default Edit Preferences
1265
1266--
1267'PUT /config/server/preferences.edit'
1268--
1269
1270Sets the default edit preferences for the server.
1271
1272The new edit preferences must be provided in the request body as a
1273link:rest-api-accounts.html#edit-preferences-input[
1274EditPreferencesInput] entity.
1275
1276To be allowed to set default edit preferences, a user must be a member
1277of a group that is granted the
1278link:access-control.html#capability_administrateServer[
1279Administrate Server] capability.
1280
1281.Request
1282----
1283 PUT /a/config/server/preferences.edit HTTP/1.0
1284 Content-Type: application/json; charset=UTF-8
1285
1286 {
1287 "tab_size": 8,
1288 "line_length": 80,
1289 "indent_unit": 2,
1290 "cursor_blink_rate": 0,
1291 "show_tabs": true,
1292 "syntax_highlighting": true,
1293 "match_brackets": true,
1294 "auto_close_brackets": true,
1295 "theme": "DEFAULT",
1296 "key_map_type": "DEFAULT"
1297 }
1298----
1299
1300As response a link:rest-api-accounts.html#edit-preferences-info[
1301EditPreferencesInfo] is returned.
1302
1303.Response
1304----
1305 HTTP/1.1 200 OK
1306 Content-Type: application/json; charset=UTF-8
1307
1308 )]}'
1309 {
1310 "tab_size": 8,
1311 "line_length": 80,
1312 "indent_unit": 2,
1313 "cursor_blink_rate": 0,
1314 "show_tabs": true,
1315 "syntax_highlighting": true,
1316 "match_brackets": true,
1317 "auto_close_brackets": true,
1318 "theme": "DEFAULT",
1319 "key_map_type": "DEFAULT"
1320 }
1321----
1322
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001323
Edwin Kempin57a46822014-05-23 10:24:41 +02001324[[ids]]
1325== IDs
1326
1327[[cache-name]]
1328=== \{cache-name\}
1329The name of the cache.
1330
1331If the cache is defined by a plugin the cache name must include the
1332plugin name: "<plugin-name>-<cache-name>".
1333
1334Gerrit core caches can optionally be prefixed with "gerrit":
1335"gerrit-<cache-name>".
1336
Edwin Kempin32e3a522014-07-08 12:10:31 +02001337[[task-id]]
1338=== \{task-id\}
1339The ID of the task (hex string).
1340
Edwin Kempin57a46822014-05-23 10:24:41 +02001341
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001342[[json-entities]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001343== JSON Entities
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001344
Edwin Kempinf0dacbd2017-08-30 16:17:17 +02001345[[accounts-config-info]]
1346=== AccountsConfigInfo
1347The `AccountsConfigInfo` entity contains information about Gerrit
1348configuration from the link:config-gerrit.html#accounts[accounts]
1349section.
1350
1351[options="header",cols="1,6"]
1352|=============================
1353|Field Name |Description
1354|`visibility` |
1355link:config-gerrit.html#accounts.visibility[Visibility setting for
1356accounts].
1357|=============================
Han-Wen Nienhuyse04df7e2017-04-25 17:41:58 +02001358
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001359[[auth-info]]
1360=== AuthInfo
1361The `AuthInfo` entity contains information about the authentication
1362configuration of the Gerrit server.
1363
1364[options="header",cols="1,^1,5"]
1365|==========================================
1366|Field Name ||Description
1367|`type` ||
1368The link:config-gerrit.html#auth.type[authentication type] that is
1369configured on the server. Can be `OPENID`, `OPENID_SSO`, `OAUTH`,
1370`HTTP`, `HTTP_LDAP`, `CLIENT_SSL_CERT_LDAP`, `LDAP`, `LDAP_BIND`,
1371`CUSTOM_EXTENSION` or `DEVELOPMENT_BECOME_ANY_ACCOUNT`.
1372|`use_contributor_agreements` |not set if `false`|
1373Whether link:config-gerrit.html#auth.contributorAgreements[contributor
1374agreements] are required.
David Pursehousecc046732016-08-22 20:08:52 +09001375|`contributor_agreements` |not set if `use_contributor_agreements` is `false`|
1376List of contributor agreements as link:rest-api-accounts.html#contributor-agreement-info[
1377ContributorAgreementInfo] entities.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001378|`editable_account_fields` ||
1379List of account fields that are editable. Possible values are
1380`FULL_NAME`, `USER_NAME` and `REGISTER_NEW_EMAIL`.
Edwin Kempin5a8c9e92015-05-08 10:59:01 +02001381|`login_url` |optional|
1382The link:config-gerrit.html#auth.loginUrl[login URL]. Only set if
1383link:config-gerrit.html#auth.type[authentication type] is `HTTP` or
1384`HTTP_LDAP`.
1385|`login_text` |optional|
1386The link:config-gerrit.html#auth.loginText[login text]. Only set if
1387link:config-gerrit.html#auth.type[authentication type] is `HTTP` or
1388`HTTP_LDAP`.
1389|`switch_account_url` |optional|
1390The link:config-gerrit.html#auth.switchAccountUrl[URL to switch
1391accounts].
1392|`register_url` |optional|
1393The link:config-gerrit.html#auth.registerUrl[register URL]. Only set if
1394link:config-gerrit.html#auth.type[authentication type] is `LDAP`,
1395`LDAP_BIND` or `CUSTOM_EXTENSION`.
1396|`register_text` |optional|
1397The link:config-gerrit.html#auth.registerText[register text]. Only set
1398if link:config-gerrit.html#auth.type[authentication type] is `LDAP`,
1399`LDAP_BIND` or `CUSTOM_EXTENSION`.
1400|`edit_full_name_url` |optional|
1401The link:config-gerrit.html#auth.editFullNameUrl[URL to edit the full
1402name]. Only set if link:config-gerrit.html#auth.type[authentication
1403type] is `LDAP`, `LDAP_BIND` or `CUSTOM_EXTENSION`.
1404|`http_password_url` |optional|
1405The link:config-gerrit.html#auth.httpPasswordUrl[URL to obtain an HTTP
1406password]. Only set if link:config-gerrit.html#auth.type[authentication
1407type] is `CUSTOM_EXTENSION`.
Hector Oswaldo Caballero2a9ad1f2016-09-15 18:24:42 -04001408|`git_basic_auth_policy` |optional|
1409The link:config-gerrit.html#auth.gitBasicAuthPolicy[policy] to authenticate
1410Git over HTTP and REST API requests when
David Pursehousecdc381e2017-03-01 17:42:06 +09001411link:config-gerrit.html#auth.type[authentication type] is `LDAP`.
Hector Oswaldo Caballero2a9ad1f2016-09-15 18:24:42 -04001412Can be `HTTP`, `LDAP` or `HTTP_LDAP`.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001413|==========================================
1414
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001415[[cache-info]]
1416=== CacheInfo
1417The `CacheInfo` entity contains information about a cache.
1418
David Pursehouseae367192014-11-25 17:24:47 +09001419[options="header",cols="1,^1,5"]
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001420|==================================
1421|Field Name ||Description
1422|`name` |
1423not set if returned in a map where the cache name is used as map key|
1424The cache name. If the cache is defined by a plugin the cache name
1425includes the plugin name: "<plugin-name>-<cache-name>".
Edwin Kempinf11eadc2014-06-24 15:23:52 +02001426|`type` ||
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001427The type of the cache (`MEM`: in memory cache, `DISK`: disk cache).
1428|`entries` ||
1429Information about the entries in the cache as a
1430link:#entries-info[EntriesInfo] entity.
1431|`average_get` |optional|
1432The average duration of getting one entry from the cache. The value is
1433returned with a standard time unit abbreviation (`ns`: nanoseconds,
1434`us`: microseconds, `ms`: milliseconds, `s`: seconds).
1435|`hit_ratio` ||
1436Information about the hit ratio as a link:#hit-ration-info[
1437HitRatioInfo] entity.
1438|==================================
1439
Edwin Kempina4286832014-05-28 14:17:22 +02001440[[cache-operation-input]]
1441=== CacheOperationInput
1442The `CacheOperationInput` entity contains information about an
1443operation that should be executed on caches.
1444
David Pursehouseae367192014-11-25 17:24:47 +09001445[options="header",cols="1,^1,5"]
Edwin Kempina3c6d032014-05-28 14:46:44 +02001446|==================================
1447|Field Name ||Description
1448|`operation` ||
Edwin Kempina4286832014-05-28 14:17:22 +02001449The cache operation that should be executed:
1450
1451`FLUSH_ALL`: Flushes all caches, except the `web_sessions` cache.
Edwin Kempina3c6d032014-05-28 14:46:44 +02001452
1453`FLUSH`: Flushes the specified caches.
1454|`caches` |optional|
1455A list of cache names. This list defines the caches on which the
1456specified operation should be executed. Whether this list must be
1457specified depends on the operation being executed.
1458|==================================
Edwin Kempina4286832014-05-28 14:17:22 +02001459
Edwin Kempin521c1242015-01-23 12:44:44 +01001460[[capability-info]]
1461=== CapabilityInfo
1462The `CapabilityInfo` entity contains information about a capability.
1463
1464[options="header",cols="1,6"]
1465|=================================
1466|Field Name |Description
1467|`id` |capability ID
1468|`name` |capability name
1469|=================================
1470
Edwin Kempin50570542015-05-08 15:31:56 +02001471[[change-config-info]]
1472=== ChangeConfigInfo
1473The `ChangeConfigInfo` entity contains information about Gerrit
1474configuration from the link:config-gerrit.html#change[change]
1475section.
1476
1477[options="header",cols="1,^1,5"]
1478|=============================
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001479|Field Name ||Description
Gabor Somossyb72d4c62015-10-20 23:40:07 +01001480|`allow_blame` |not set if `false`|
1481link:config-gerrit.html#change.allowBlame[Whether blame on side by side diff is
1482allowed].
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001483|`large_change` ||
Edwin Kempin50570542015-05-08 15:31:56 +02001484link:config-gerrit.html#change.largeChange[Number of changed lines from
1485which on a change is considered as a large change].
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001486|`reply_label` ||
Edwin Kempin50570542015-05-08 15:31:56 +02001487link:config-gerrit.html#change.replyTooltip[Label name for the reply
1488button].
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001489|`reply_tooltip` ||
Edwin Kempin50570542015-05-08 15:31:56 +02001490link:config-gerrit.html#change.replyTooltip[Tooltip for the reply
1491button].
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001492|`update_delay` ||
Edwin Kempin50570542015-05-08 15:31:56 +02001493link:config-gerrit.html#change.updateDelay[How often in seconds the web
1494interface should poll for updates to the currently open change].
Stefan Bellerbf2767c2015-06-29 16:02:28 -07001495|`submit_whole_topic` ||
1496link:config-gerrit.html#change.submitWholeTopic[A configuration if
1497the whole topic is submitted].
Changcheng Xiao16095352017-12-18 10:03:08 +01001498|`disable_private_changes` |not set if `false`|
1499Returns true if private changes are disabled.
Edwin Kempin50570542015-05-08 15:31:56 +02001500|=============================
1501
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001502[[check-account-external-ids-input]]
1503=== CheckAccountExternalIdsInput
1504The `CheckAccountExternalIdsInput` entity contains input for the
Edwin Kempine6bf3242018-01-12 13:29:24 +01001505account external ID consistency check.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001506
1507Currently this entity contains no fields.
1508
1509[[check-account-external-ids-result-info]]
1510=== CheckAccountExternalIdsResultInfo
1511The `CheckAccountExternalIdsResultInfo` entity contains the result of
Edwin Kempine6bf3242018-01-12 13:29:24 +01001512running the account external ID consistency check.
1513
1514[options="header",cols="1,6"]
1515|======================
1516|Field Name|Description
1517|`problems`|A list of link:#consistency-problem-info[
1518ConsistencyProblemInfo] entities.
1519|======================
1520
1521[[check-accounts-input]]
1522=== CheckAccountsInput
1523The `CheckAccountsInput` entity contains input for the account consistency
1524check.
1525
1526Currently this entity contains no fields.
1527
1528[[check-accounts-result-info]]
1529=== CheckAccountsResultInfo
1530The `CheckAccountsResultInfo` entity contains the result of running the
1531account consistency check.
1532
1533[options="header",cols="1,6"]
1534|======================
1535|Field Name|Description
1536|`problems`|A list of link:#consistency-problem-info[
1537ConsistencyProblemInfo] entities.
1538|======================
1539
1540[[check-groups-input]]
1541=== CheckGroupsInput
1542The `CheckGroupsInput` entity contains input for the group consistency
1543check.
1544
1545Currently this entity contains no fields.
1546
1547[[check-groups-result-info]]
1548=== CheckGroupsResultInfo
1549The `CheckGroupsResultInfo` entity contains the result of running the
1550group consistency check.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001551
1552[options="header",cols="1,6"]
1553|======================
1554|Field Name|Description
1555|`problems`|A list of link:#consistency-problem-info[
1556ConsistencyProblemInfo] entities.
1557|======================
1558
1559[[consistency-check-info]]
1560=== ConsistencyCheckInfo
1561The `ConsistencyCheckInfo` entity contains the results of running
1562consistency checks.
1563
1564[options="header",cols="1,^1,5"]
1565|================================================
1566|Field Name ||Description
Edwin Kempin6396d6d2017-05-30 10:41:28 +02001567|`check_accounts_result` |optional|
1568The result of running the account consistency check as a
1569link:#check-accounts-result-info[CheckAccountsResultInfo] entity.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001570|`check_account_external_ids_result`|optional|
1571The result of running the account external ID consistency check as a
1572link:#check-account-external-ids-result-info[
1573CheckAccountExternalIdsResultInfo] entity.
Edwin Kempine6bf3242018-01-12 13:29:24 +01001574|`check_groups_result` |optional|
1575The result of running the group consistency check as a
1576link:#check-groups-result-info[CheckGroupsResultInfo] entity.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001577|================================================
1578
1579[[consistency-check-input]]
1580=== ConsistencyCheckInput
1581The `ConsistencyCheckInput` entity contains information about which
1582consistency checks should be run.
1583
1584[options="header",cols="1,^1,5"]
1585|=========================================
1586|Field Name ||Description
Edwin Kempin6396d6d2017-05-30 10:41:28 +02001587|`check_accounts` |optional|
1588Input for the account consistency check as
1589link:#check-accounts-input[CheckAccountsInput] entity.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001590|`check_account_external_ids`|optional|
1591Input for the account external ID consistency check as
1592link:#check-account-external-ids-input[CheckAccountExternalIdsInput]
1593entity.
Edwin Kempine6bf3242018-01-12 13:29:24 +01001594|`check_groups` |optional|
1595Input for the group consistency check as link:#check-groups-input[
1596CheckGroupsInput] entity.
Edwin Kempin54fd1d32017-03-24 15:32:03 +01001597|=========================================
1598
1599[[consistency-problem-info]]
1600=== ConsistencyProblemInfo
1601The `ConsistencyProblemInfo` entity contains information about a
1602consistency problem.
1603
1604[options="header",cols="1,6"]
1605|======================
1606|Field Name|Description
1607|`status` |The status of the consistency problem. +
1608Possible values are `ERROR` and `WARNING`.
1609|`message` |Message describing the consistency problem.
1610|======================
1611
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001612[[download-info]]
1613=== DownloadInfo
1614The `DownloadInfo` entity contains information about supported download
1615options.
1616
1617[options="header",cols="1,6"]
1618|=======================
1619|Field Name |Description
1620|`schemes` |
Edwin Kempin132d28e2015-05-07 15:30:35 +02001621The supported download schemes as a map which maps the scheme name to a
1622of link:#download-scheme-info[DownloadSchemeInfo] entity.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001623|`archives` |
Edwin Kempinf5c88792015-05-20 09:20:30 +02001624List of supported archive formats. Possible values are `tgz`, `tar`,
1625`tbz2` and `txz`.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001626|=======================
1627
1628[[download-scheme-info]]
1629=== DownloadSchemeInfo
1630The `DownloadSchemeInfo` entity contains information about a supported
1631download scheme and its commands.
1632
1633[options="header",cols="1,^1,5"]
1634|=================================
1635|Field Name ||Description
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001636|`url` ||
1637The URL of the download scheme, where '${project}' is used as
1638placeholder for the project name.
1639|`is_auth_required` |not set if `false`|
1640Whether this download scheme requires authentication.
1641|`is_auth_supported` |not set if `false`|
1642Whether this download scheme supports authentication.
1643|`commands` ||
Edwin Kempina9554a52015-05-07 15:19:54 +02001644Download commands as a map which maps the command name to the download
1645command. In the download command '${project}' is used as
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001646placeholder for the project name, and '${ref}' is used as
1647placeholder for the (change) ref.
1648
1649Empty, if accessed anonymously and the download scheme requires
1650authentication.
Edwin Kempineafde882015-05-11 15:40:44 +02001651|`clone_commands` ||
1652Clone commands as a map which maps the command name to the clone
1653command. In the clone command '${project}' is used as
Edwin Kempin4bf36ef2015-06-23 09:44:19 +02001654placeholder for the project name and '${project-base-name}' as name
1655for the project base name (e.g. for a project 'foo/bar' '${project}'
1656is a placeholder for 'foo/bar' and '${project-base-name}' is a
1657placeholder for 'bar').
Edwin Kempineafde882015-05-11 15:40:44 +02001658
1659Empty, if accessed anonymously and the download scheme requires
1660authentication.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001661|=================================
1662
Edwin Kempined846572015-07-24 14:17:11 +02001663[[email-confirmation-input]]
1664=== EmailConfirmationInput
1665The `EmailConfirmationInput` entity contains information for confirming
1666an email address.
1667
1668[options="header",cols="1,6"]
1669|=======================
1670|Field Name |Description
1671|`token` |
1672The token that was sent by mail to a newly registered email address.
1673|=======================
1674
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001675[[entries-info]]
1676=== EntriesInfo
1677The `EntriesInfo` entity contains information about the entries in a
1678cache.
1679
David Pursehouseae367192014-11-25 17:24:47 +09001680[options="header",cols="1,^1,5"]
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001681|==================================
1682|Field Name ||Description
1683|`mem` |optional|Number of cache entries that are held in memory.
1684|`disk` |optional|Number of cache entries on the disk. For non-disk
1685caches this value is not set; for disk caches it is only set if there
1686are entries in the cache.
1687|`space` |optional|
1688The space that is consumed by the cache on disk. The value is returned
1689with a unit abbreviation (`k`: kilobytes, `m`: megabytes,
1690`g`: gigabytes). Only set for disk caches.
1691|==================================
1692
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001693[[gerrit-info]]
1694=== GerritInfo
1695The `GerritInfo` entity contains information about Gerrit
1696configuration from the link:config-gerrit.html#gerrit[gerrit] section.
1697
Edwin Kempin50570542015-05-08 15:31:56 +02001698[options="header",cols="1,^1,5"]
1699|=================================
1700|Field Name ||Description
1701|`all_projects_name` ||
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001702Name of the link:config-gerrit.html#gerrit.allProjects[root project].
Edwin Kempin50570542015-05-08 15:31:56 +02001703|`all_users_name` ||
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001704Name of the link:config-gerrit.html#gerrit.allUsers[project in which
1705meta data of all users is stored].
Yuxuan 'fishy' Wanged1596b2015-11-09 16:32:45 -08001706|`doc_search` ||
1707Whether documentation search is available.
Dave Borowitza5d3fec2015-07-09 14:24:02 -07001708|`doc_url` |optional|
1709Custom base URL where Gerrit server documentation is located.
1710(Documentation may still be available at /Documentation relative to the
1711Gerrit base path even if this value is unset.)
Dave Borowitza17a9842015-09-15 09:58:17 -04001712|`edit_gpg_keys` |not set if `false`|
1713Whether to enable the web UI for editing GPG keys.
Edwin Kempin50570542015-05-08 15:31:56 +02001714|`report_bug_url` |optional|
1715link:config-gerrit.html#gerrit.reportBugUrl[URL to report bugs].
1716|`report_bug_text` |optional, not set if default|
1717link:config-gerrit.html#gerrit.reportBugText[Display text for report
1718bugs link].
Dave Borowitzf4599a02016-09-19 21:51:51 +02001719|`web_uis` ||
1720List of web UIs supported by the HTTP server. Possible values are `GWT`
1721and `POLYGERRIT`.
Edwin Kempin50570542015-05-08 15:31:56 +02001722|=================================
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001723
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001724[[hit-ration-info]]
1725=== HitRatioInfo
1726The `HitRatioInfo` entity contains information about the hit ratio of a
1727cache.
1728
David Pursehouseae367192014-11-25 17:24:47 +09001729[options="header",cols="1,^1,5"]
Edwin Kempin42c9cf62014-05-23 08:45:56 +02001730|==================================
1731|Field Name ||Description
1732|`mem` ||
1733Hit ratio for cache entries that are held in memory (0 \<= value \<= 100).
1734|`disk` |optional|
1735Hit ratio for cache entries that are held on disk (0 \<= value \<= 100).
1736Only set for disk caches.
1737|==================================
1738
Edwin Kempind905e582014-05-28 16:54:36 +02001739[[jvm-summary-info]]
1740=== JvmSummaryInfo
1741The `JvmSummaryInfo` entity contains information about the JVM.
1742
David Pursehouseae367192014-11-25 17:24:47 +09001743[options="header",cols="1,^1,5"]
Edwin Kempind905e582014-05-28 16:54:36 +02001744|========================================
1745|Field Name ||Description
1746|`vm_vendor` ||The vendor of the virtual machine.
1747|`vm_name` ||The name of the virtual machine.
1748|`vm_version` ||The version of the virtual machine.
1749|`os_name` ||The name of the operating system.
1750|`os_version` ||The version of the operating system.
1751|`os_arch` ||The architecture of the operating system.
1752|`user` ||The user that is running Gerrit.
1753|`host` |optional|
1754The host on which Gerrit is running.
1755|`current_working_directory`||The current working directory.
1756|`site` ||The path to the review site.
1757|========================================
1758
1759[[mem-summary-info]]
1760=== MemSummaryInfo
1761The `MemSummaryInfo` entity contains information about the current
1762memory usage.
1763
David Pursehouseae367192014-11-25 17:24:47 +09001764[options="header",cols="1,^1,5"]
Edwin Kempind905e582014-05-28 16:54:36 +02001765|============================
1766|Field Name ||Description
1767|`total` ||
1768The total size of the memory. The value is returned with a unit
1769abbreviation (`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1770|`used` ||
1771The size of used memory. The value is returned with a unit abbreviation
1772(`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1773|`free` ||
1774The size of free memory. The value is returned with a unit abbreviation
1775(`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1776|`buffers` ||
1777The size of memory used for JGit buffers. The value is returned with a
1778unit abbreviation (`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1779|`max` ||
1780The maximal memory size. The value is returned with a unit abbreviation
1781(`k`: kilobytes, `m`: megabytes, `g`: gigabytes).
1782|`open_files` |optional|
1783The number of open files.
1784|============================
1785
Edwin Kempin7754d0c2015-07-09 15:11:49 +02001786[[plugin-config-info]]
1787=== PluginConfigInfo
1788The `PluginConfigInfo` entity contains information about Gerrit
1789extensions by plugins.
1790
1791[options="header",cols="1,^1,5"]
1792|===========================
1793|Field Name ||Description
1794|`has_avatars` |not set if `false`|
1795Whether an avatar provider is registered.
1796|===========================
1797
Dave Borowitz5170e0f2015-06-18 21:05:29 -04001798[[receive-info]]
1799=== ReceiveInfo
1800The `ReceiveInfo` entity contains information about the configuration
1801of git-receive-pack behavior on the server.
1802
1803[options="header",cols="1,^1,5"]
1804|=======================================
1805|Field Name ||Description
1806|`enableSignedPush`|optional|
1807Whether signed push validation support is enabled on the server; see the
1808link:config-gerrit.html#receive.certNonceSeed[global configuration] for
1809details.
1810|=======================================
1811
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001812[[server-info]]
1813=== ServerInfo
1814The `ServerInfo` entity contains information about the configuration of
1815the Gerrit server.
1816
1817[options="header",cols="1,^1,5"]
1818|=======================================
1819|Field Name ||Description
Edwin Kempinf0dacbd2017-08-30 16:17:17 +02001820|`accounts` ||
1821Information about the configuration from the
1822link:config-gerrit.html#accounts[accounts] section as
1823link:#accounts-config-info[AccountsConfigInfo] entity.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001824|`auth` ||
1825Information about the authentication configuration as
1826link:#auth-info[AuthInfo] entity.
Edwin Kempin50570542015-05-08 15:31:56 +02001827|`change` ||
1828Information about the configuration from the
1829link:config-gerrit.html#change[change] section as
1830link:#change-config-info[ChangeConfigInfo] entity.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001831|`download` ||
1832Information about the configured download options as
1833link:#download-info[DownloadInfo] entity.
1834information about Gerrit
1835|`gerrit` ||
1836Information about the configuration from the
1837link:config-gerrit.html#gerrit[gerrit] section as link:#gerrit-info[
1838GerritInfo] entity.
Edwin Kempin7c044322016-06-21 07:29:43 +02001839|`note_db_enabled` |not set if `false`|
David Pursehousea61ee502016-09-06 16:27:09 +09001840Whether the NoteDb storage backend is fully enabled.
Edwin Kempin7754d0c2015-07-09 15:11:49 +02001841|`plugin ` ||
1842Information about Gerrit extensions by plugins as
1843link:#plugin-config-info[PluginConfigInfo] entity.
Dave Borowitz5170e0f2015-06-18 21:05:29 -04001844|`receive` |optional|
1845Information about the receive-pack configuration as a
1846link:#receive-info[ReceiveInfo] entity.
Edwin Kempina3188e12015-05-12 13:34:42 +02001847|`sshd` |optional|
1848Information about the configuration from the
1849link:config-gerrit.html#sshd[sshd] section as link:#sshd-info[SshdInfo]
1850entity. Not set if SSHD is disabled.
Edwin Kempin50570542015-05-08 15:31:56 +02001851|`suggest` ||
1852Information about the configuration from the
1853link:config-gerrit.html#suggest[suggest] section as link:#suggest-info[
1854SuggestInfo] entity.
Edwin Kempinfa0d4942015-07-16 12:38:52 +02001855|`url_aliases` |optional|
1856A map of URL aliases, where a regular expression for an URL token is
1857mapped to a target URL token. The target URL token can contain
1858placeholders for the groups matched by the regular expression: `$1` for
1859the first matched group, `$2` for the second matched group, etc.
Edwin Kempin50570542015-05-08 15:31:56 +02001860|`user` ||
1861Information about the configuration from the
1862link:config-gerrit.html#user[user] section as link:#user-config-info[
1863UserConfigInfo] entity.
Viktar Donich38252c52017-07-20 16:20:09 -07001864|`default_theme` |optional|
1865URL to a default PolyGerrit UI theme plugin, if available.
1866Located in `/static/gerrit-theme.html` by default.
Edwin Kempinb8590bd2015-04-30 12:55:34 +02001867|=======================================
1868
Edwin Kempina3188e12015-05-12 13:34:42 +02001869[[sshd-info]]
1870=== SshdInfo
1871The `SshdInfo` entity contains information about Gerrit
1872configuration from the link:config-gerrit.html#sshd[sshd]
1873section.
1874
1875This entity doesn't contain any data, but the presence of this (empty)
1876entity in the link:#server-info[ServerInfo] entity means that SSHD is
1877enabled on the server.
1878
Edwin Kempin50570542015-05-08 15:31:56 +02001879[[suggest-info]]
1880=== SuggestInfo
1881The `SuggestInfo` entity contains information about Gerrit
1882configuration from the link:config-gerrit.html#suggest[suggest]
1883section.
1884
1885[options="header",cols="1,6"]
1886|=======================
1887|Field Name |Description
1888|`from` |
1889The link:config-gerrit.html#suggest.from[number of characters] that a
1890user must have typed before suggestions are provided.
1891|=======================
1892
Edwin Kempind905e582014-05-28 16:54:36 +02001893[[summary-info]]
1894=== SummaryInfo
1895The `SummaryInfo` entity contains information about the current state
1896of the server.
1897
David Pursehouseae367192014-11-25 17:24:47 +09001898[options="header",cols="1,^1,5"]
Edwin Kempind905e582014-05-28 16:54:36 +02001899|============================
1900|Field Name ||Description
1901|`task_summary` ||
1902Summary about current tasks as a link:#task-summary-info[
1903TaskSummaryInfo] entity.
1904|`mem_summary` ||
1905Summary about current memory usage as a link:#mem-summary-info[
1906MemSummaryInfo] entity.
1907|`thread_summary` ||
1908Summary about current threads as a link:#thread-summary-info[
1909ThreadSummaryInfo] entity.
1910|`jvm_summary` |optional|
1911Summary about the JVM link:#jvm-summary-info[JvmSummaryInfo] entity.
1912Only set if the `jvm` option was set.
1913|============================
1914
Edwin Kempin49098b82014-06-10 22:55:13 +02001915[[task-info]]
1916=== TaskInfo
1917The `TaskInfo` entity contains information about a task in a background
1918work queue.
1919
David Pursehouseae367192014-11-25 17:24:47 +09001920[options="header",cols="1,^1,5"]
Edwin Kempin49098b82014-06-10 22:55:13 +02001921|====================================
1922|Field Name ||Description
1923|`id` ||The ID of the task.
1924|`state` ||
1925The state of the task, can be `DONE`, `CANCELLED`, `RUNNING`, `READY`,
1926`SLEEPING` and `OTHER`.
1927|`start_time` ||The start time of the task.
1928|`delay` ||The remaining delay of the task.
1929|`command` ||The command of the task.
1930|`remote_name`|optional|
1931The remote name. May only be set for tasks that are associated with a
1932project.
1933|`project` |optional|The project the task is associated with.
1934|====================================
1935
Edwin Kempind905e582014-05-28 16:54:36 +02001936[[task-summary-info]]
1937=== TaskSummaryInfo
1938The `TaskSummaryInfo` entity contains information about the current
1939tasks.
1940
David Pursehouseae367192014-11-25 17:24:47 +09001941[options="header",cols="1,^1,5"]
Edwin Kempind905e582014-05-28 16:54:36 +02001942|============================
1943|Field Name ||Description
1944|`total` |optional|
1945Total number of current tasks.
1946|`running` |optional|
1947Number of currently running tasks.
1948|`ready` |optional|
1949Number of currently ready tasks.
1950|`sleeping` |optional|
1951Number of currently sleeping tasks.
1952|============================
1953
1954[[thread-summary-info]]
1955=== ThreadSummaryInfo
1956The `ThreadSummaryInfo` entity contains information about the current
1957threads.
1958
David Pursehouseae367192014-11-25 17:24:47 +09001959[options="header",cols="1,6"]
Edwin Kempind905e582014-05-28 16:54:36 +02001960|===========================
1961|Field Name |Description
1962|`cpus` |
1963The number of available processors.
1964|`threads` |
1965The total number of current threads.
1966|`counts` |
1967Detailed thread counts as a map that maps a thread kind to a map that
1968maps a thread state to the thread count. The thread kinds group the
David Pursehousee9ccf872017-02-24 12:39:36 +09001969counts by threads that have the same name prefix (`H2`, `HTTP`,
Edwin Kempind905e582014-05-28 16:54:36 +02001970`IntraLineDiff`, `ReceiveCommits`, `SSH git-receive-pack`,
1971`SSH git-upload-pack`, `SSH-Interactive-Worker`, `SSH-Stream-Worker`,
David Pursehousee9ccf872017-02-24 12:39:36 +09001972`SshCommandStart`, `sshd-SshServer`). The counts for other threads are
1973available under the thread kind `Other`. Counts for the following thread
1974states can be included: `NEW`, `RUNNABLE`, `BLOCKED`, `WAITING`,
1975`TIMED_WAITING` and `TERMINATED`.
Edwin Kempind905e582014-05-28 16:54:36 +02001976|===========================
1977
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001978[[top-menu-entry-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001979=== TopMenuEntryInfo
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001980The `TopMenuEntryInfo` entity contains information about a top menu
1981entry.
1982
David Pursehouseae367192014-11-25 17:24:47 +09001983[options="header",cols="1,6"]
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001984|=================================
1985|Field Name |Description
1986|`name` |Name of the top menu entry.
1987|`items` |List of link:#top-menu-item-info[menu items].
1988|=================================
1989
1990[[top-menu-item-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001991=== TopMenuItemInfo
Dariusz Luksza589ba00aa2013-05-07 17:21:23 +02001992The `TopMenuItemInfo` entity contains information about a menu item in
1993a top menu entry.
1994
David Pursehouseae367192014-11-25 17:24:47 +09001995[options="header",cols="1,^1,5"]
Edwin Kempin002c9cb2013-11-06 09:10:47 +01001996|========================
1997|Field Name ||Description
1998|`url` ||The URL of the menu item link.
1999|`name` ||The name of the menu item.
2000|`target` ||Target attribute of the menu item link.
2001|`id` |optional|The `id` attribute of the menu item link.
2002|========================
David Ostrovsky28b8ea62013-06-09 02:16:57 +02002003
Edwin Kempin50570542015-05-08 15:31:56 +02002004[[user-config-info]]
2005=== UserConfigInfo
2006The `UserConfigInfo` entity contains information about Gerrit
2007configuration from the link:config-gerrit.html#user[user] section.
2008
2009[options="header",cols="1,6"]
2010|====================================
2011|Field Name |Description
2012|`anonymous_coward_name` |
2013link:config-gerrit.html#user.anonymousCoward[Username] that is
2014displayed in the Gerrit Web UI and in e-mail notifications if the full
2015name of the user is not set.
2016|====================================
2017
2018
David Ostrovsky28b8ea62013-06-09 02:16:57 +02002019GERRIT
2020------
2021Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -07002022
2023SEARCHBOX
2024---------