blob: e4bc8f053a78422ba3258be24c0c7e4d086ab0ef [file] [log] [blame]
Marian Harbachebeb1542019-12-13 10:42:46 +01001:linkattrs:
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002= Gerrit Code Review - /accounts/ REST API
Edwin Kempind0a63922013-01-23 16:32:59 +01003
4This page describes the account related REST endpoints.
5Please also take note of the general information on the
6link:rest-api.html[REST API].
7
Edwin Kempin90af5482013-09-03 10:47:14 +02008[[account-endpoints]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08009== Account Endpoints
Edwin Kempind0a63922013-01-23 16:32:59 +010010
Edwin Kempinc2361402016-06-30 11:33:47 +020011[[query-account]]
12=== Query Account
Shawn Pearce3f4fe612014-12-26 19:37:07 -050013--
14'GET /accounts/'
15--
16
Edwin Kempinc2361402016-06-30 11:33:47 +020017Queries accounts visible to the caller. The
18link:user-search-accounts.html#_search_operators[query string] must be
19provided by the `q` parameter. The `n` parameter can be used to limit
20the returned results.
21
22As result a list of link:#account-info[AccountInfo] entities is
23returned.
Shawn Pearce3f4fe612014-12-26 19:37:07 -050024
25.Request
26----
Edwin Kempin7bb93e42016-06-30 15:29:05 +020027 GET /accounts/?q=name:John+email:example.com&n=2 HTTP/1.0
Edwin Kempinc2361402016-06-30 11:33:47 +020028----
29
30.Response
31----
32 HTTP/1.1 200 OK
33 Content-Disposition: attachment
34 Content-Type: application/json; charset=UTF-8
35
36 )]}'
37 [
38 {
39 "_account_id": 1000096,
Edwin Kempinc2361402016-06-30 11:33:47 +020040 },
41 {
42 "_account_id": 1001439,
Edwin Kempin7bb93e42016-06-30 15:29:05 +020043 "_more_accounts": true
Edwin Kempinc2361402016-06-30 11:33:47 +020044 }
45 ]
46----
47
Edwin Kempin7bb93e42016-06-30 15:29:05 +020048If the number of accounts matching the query exceeds either the
49internal limit or a supplied `n` query parameter, the last account
50object has a `_more_accounts: true` JSON field set.
51
Edwin Kempin6115eae2016-06-30 14:21:19 +020052The `S` or `start` query parameter can be supplied to skip a number
53of accounts from the list.
54
Edwin Kempin4ae4d612020-05-13 14:35:02 +020055[[query-options]]
Edwin Kempin2e8e9dc2016-07-01 11:03:57 +020056Additional fields can be obtained by adding `o` parameters, each
57option slows down the query response time to the client so they are
58generally disabled by default. Optional fields are:
59
60[[details]]
61--
Ben Rohlfs9c960cb2020-02-02 22:12:30 +010062* `DETAILS`: Includes full name, preferred email, username, display
Patrick Hiesel90d26fd2020-08-07 16:15:54 +020063name, avatars, status, state and tags for each account.
Edwin Kempin2e8e9dc2016-07-01 11:03:57 +020064--
65
Edwin Kempin2eadde42016-07-01 13:33:32 +020066[[all-emails]]
67--
Edwin Kempined777162017-11-15 08:23:40 -080068* `ALL_EMAILS`: Includes all registered emails. Requires the caller
69to have the link:access-control.html#capability_modifyAccount[Modify
70Account] global capability.
Edwin Kempin2eadde42016-07-01 13:33:32 +020071--
72
Edwin Kempinc2361402016-06-30 11:33:47 +020073[[suggest-account]]
74To get account suggestions set the parameter `suggest` and provide the
75typed substring as query `q`. If a result limit `n` is not specified,
76then the default 10 is used.
77
Edwin Kempin2eadde42016-07-01 13:33:32 +020078For account suggestions link:#details[account details] and
79link:#all-emails[all emails] are always returned.
Edwin Kempin2e8e9dc2016-07-01 11:03:57 +020080
Edwin Kempinc2361402016-06-30 11:33:47 +020081.Request
82----
83 GET /accounts/?suggest&q=John HTTP/1.0
Shawn Pearce3f4fe612014-12-26 19:37:07 -050084----
85
Edwin Kempined777162017-11-15 08:23:40 -080086Secondary emails are only included if the calling user has the
87link:access-control.html#capability_modifyAccount[Modify Account]
88capability.
89
Shawn Pearce3f4fe612014-12-26 19:37:07 -050090.Response
91----
92 HTTP/1.1 200 OK
93 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +090094 Content-Type: application/json; charset=UTF-8
Shawn Pearce3f4fe612014-12-26 19:37:07 -050095
96 )]}'
97 [
98 {
99 "_account_id": 1000096,
100 "name": "John Doe",
101 "email": "john.doe@example.com",
102 "username": "john"
Ben Rohlfs9c960cb2020-02-02 22:12:30 +0100103 "display_name": "John D"
Shawn Pearce3f4fe612014-12-26 19:37:07 -0500104 },
105 {
106 "_account_id": 1001439,
107 "name": "John Smith",
108 "email": "john.smith@example.com",
109 "username": "jsmith"
Ben Rohlfs9c960cb2020-02-02 22:12:30 +0100110 "display_name": "Johnny"
Shawn Pearce3f4fe612014-12-26 19:37:07 -0500111 },
112 ]
113----
114
Edwin Kempin431873e2013-03-20 15:17:54 +0100115[[get-account]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800116=== Get Account
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800117--
Edwin Kempin431873e2013-03-20 15:17:54 +0100118'GET /accounts/link:#account-id[\{account-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800119--
Edwin Kempin431873e2013-03-20 15:17:54 +0100120
121Returns an account as an link:#account-info[AccountInfo] entity.
122
123.Request
124----
125 GET /accounts/self HTTP/1.0
126----
127
128.Response
129----
130 HTTP/1.1 200 OK
131 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900132 Content-Type: application/json; charset=UTF-8
Edwin Kempin431873e2013-03-20 15:17:54 +0100133
134 )]}'
135 {
136 "_account_id": 1000096,
137 "name": "John Doe",
James Ring8e342722013-05-01 01:40:53 -0700138 "email": "john.doe@example.com",
139 "username": "john"
Ben Rohlfs9c960cb2020-02-02 22:12:30 +0100140 "display_name": "Super John"
Edwin Kempin431873e2013-03-20 15:17:54 +0100141 }
142----
143
Edwin Kempin1967a6d2013-05-02 09:24:34 +0200144[[create-account]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800145=== Create Account
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800146--
Edwin Kempin1967a6d2013-05-02 09:24:34 +0200147'PUT /accounts/link:#username[\{username\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800148--
Edwin Kempin1967a6d2013-05-02 09:24:34 +0200149
150Creates a new account.
151
152In the request body additional data for the account can be provided as
153link:#account-input[AccountInput].
154
155.Request
156----
157 PUT /accounts/john HTTP/1.0
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900158 Content-Type: application/json; charset=UTF-8
Edwin Kempin1967a6d2013-05-02 09:24:34 +0200159
160 {
161 "name": "John Doe",
Ben Rohlfs9c960cb2020-02-02 22:12:30 +0100162 "display_name": "Super John",
Edwin Kempin1967a6d2013-05-02 09:24:34 +0200163 "email": "john.doe@example.com",
164 "ssh_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw==",
165 "http_password": "19D9aIn7zePb",
166 "groups": [
167 "MyProject-Owners"
168 ]
169 }
170----
171
172As response a detailed link:#account-info[AccountInfo] entity is
173returned that describes the created account.
174
175.Response
176----
177 HTTP/1.1 201 Created
178 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900179 Content-Type: application/json; charset=UTF-8
Edwin Kempin1967a6d2013-05-02 09:24:34 +0200180
181 )]}'
182 {
183 "_account_id": 1000195,
184 "name": "John Doe",
185 "email": "john.doe@example.com"
186 }
187----
188
Edwin Kempincf77a692015-07-28 11:02:40 +0200189[[get-detail]]
190=== Get Account Details
191--
192'GET /accounts/link:#account-id[\{account-id\}]/detail'
193--
194
Sebastian Schuberthe3d2d832016-01-14 09:47:39 +0100195Retrieves the details of an account as an link:#account-detail-info[
Edwin Kempincf77a692015-07-28 11:02:40 +0200196AccountDetailInfo] entity.
197
198.Request
199----
200 GET /accounts/self/detail HTTP/1.0
201----
202
203.Response
204----
205 HTTP/1.1 200 OK
206 Content-Disposition: attachment
207 Content-Type: application/json; charset=UTF-8
208
209 )]}'
210 {
211 "registered_on": "2015-07-23 07:01:09.296000000",
212 "_account_id": 1000096,
213 "name": "John Doe",
214 "email": "john.doe@example.com",
215 "username": "john"
Ben Rohlfs9c960cb2020-02-02 22:12:30 +0100216 "display_name": "Super John"
Edwin Kempincf77a692015-07-28 11:02:40 +0200217 }
218----
219
Edwin Kempinb6df0392013-05-16 10:36:44 +0200220[[get-account-name]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800221=== Get Account Name
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800222--
Edwin Kempinb6df0392013-05-16 10:36:44 +0200223'GET /accounts/link:#account-id[\{account-id\}]/name'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800224--
Edwin Kempinb6df0392013-05-16 10:36:44 +0200225
226Retrieves the full name of an account.
227
228.Request
229----
230 GET /accounts/self/name HTTP/1.0
231----
232
233.Response
234----
235 HTTP/1.1 200 OK
236 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900237 Content-Type: application/json; charset=UTF-8
Edwin Kempinb6df0392013-05-16 10:36:44 +0200238
239 )]}'
240 "John Doe"
241----
242
243If the account does not have a name an empty string is returned.
244
245[[set-account-name]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800246=== Set Account Name
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800247--
Edwin Kempinb6df0392013-05-16 10:36:44 +0200248'PUT /accounts/link:#account-id[\{account-id\}]/name'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800249--
Edwin Kempinb6df0392013-05-16 10:36:44 +0200250
251Sets the full name of an account.
252
253The new account name must be provided in the request body inside
David Pursehouse3af56992014-02-21 12:30:53 +0900254an link:#account-name-input[AccountNameInput] entity.
Edwin Kempinb6df0392013-05-16 10:36:44 +0200255
256.Request
257----
258 PUT /accounts/self/name HTTP/1.0
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900259 Content-Type: application/json; charset=UTF-8
Edwin Kempinb6df0392013-05-16 10:36:44 +0200260
261 {
262 "name": "John F. Doe"
263 }
264----
265
266As response the new account name is returned.
267
268.Response
269----
270 HTTP/1.1 200 OK
271 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900272 Content-Type: application/json; charset=UTF-8
Edwin Kempinb6df0392013-05-16 10:36:44 +0200273
274 )]}'
275 "John F. Doe"
276----
277
278If the name was deleted the response is "`204 No Content`".
279
280Some realms may not allow to modify the account name. In this case the
281request is rejected with "`405 Method Not Allowed`".
282
283[[delete-account-name]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800284=== Delete Account Name
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800285--
Edwin Kempinb6df0392013-05-16 10:36:44 +0200286'DELETE /accounts/link:#account-id[\{account-id\}]/name'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800287--
Edwin Kempinb6df0392013-05-16 10:36:44 +0200288
289Deletes the name of an account.
290
291.Request
292----
293 DELETE /accounts/self/name HTTP/1.0
294----
295
296.Response
297----
298 HTTP/1.1 204 No Content
299----
300
Kasper Nilssoneb64a0a2017-01-27 13:51:07 -0800301[[get-account-status]]
302=== Get Account Status
303--
304'GET /accounts/link:#account-id[\{account-id\}]/status'
305--
306
307Retrieves the status of an account.
308
309.Request
310----
311 GET /accounts/self/status HTTP/1.0
312----
313
314.Response
315----
316 HTTP/1.1 200 OK
317 Content-Disposition: attachment
318 Content-Type: application/json; charset=UTF-8
319
320 )]}'
321 "Available"
322----
323
324If the account does not have a status an empty string is returned.
325
326[[set-account-status]]
327=== Set Account Status
328--
329'PUT /accounts/link:#account-id[\{account-id\}]/status'
330--
331
332Sets the status of an account.
333
334The new account status must be provided in the request body inside
335an link:#account-status-input[AccountStatusInput] entity.
336
337.Request
338----
339 PUT /accounts/self/status HTTP/1.0
340 Content-Type: application/json; charset=UTF-8
341
342 {
343 "status": "Out Of Office"
344 }
345----
346
347As response the new account status is returned.
348
349.Response
350----
351 HTTP/1.1 200 OK
352 Content-Disposition: attachment
353 Content-Type: application/json; charset=UTF-8
354
355 )]}'
356 "Out Of Office"
357----
358
359If the name was deleted the response is "`204 No Content`".
360
Edwin Kempin9f9ec652013-06-04 08:28:15 +0200361[[get-username]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800362=== Get Username
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800363--
Edwin Kempin9f9ec652013-06-04 08:28:15 +0200364'GET /accounts/link:#account-id[\{account-id\}]/username'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800365--
Edwin Kempin9f9ec652013-06-04 08:28:15 +0200366
367Retrieves the username of an account.
368
369.Request
370----
371 GET /accounts/self/username HTTP/1.0
372----
373
374.Response
375----
376 HTTP/1.1 200 OK
377 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900378 Content-Type: application/json; charset=UTF-8
Edwin Kempin9f9ec652013-06-04 08:28:15 +0200379
380 )]}'
381 "john.doe"
382----
383
David Pursehouse10829f642015-01-21 11:42:32 +0900384If the account does not have a username the response is "`404 Not Found`".
Edwin Kempin9f9ec652013-06-04 08:28:15 +0200385
Edwin Kempinf07e98b2015-07-24 11:47:57 +0200386[[set-username]]
387=== Set Username
388--
389'PUT /accounts/link:#account-id[\{account-id\}]/username'
390--
391
392The new username must be provided in the request body inside
393a link:#username-input[UsernameInput] entity.
394
395Once set, the username cannot be changed or deleted. If attempted this
396fails with "`405 Method Not Allowed`".
397
398.Request
399----
Wyatt Allend2750002016-06-16 10:58:57 -0700400 PUT /accounts/self/username HTTP/1.0
Edwin Kempinf07e98b2015-07-24 11:47:57 +0200401 Content-Type: application/json; charset=UTF-8
402
403 {
404 "username": "jdoe"
405 }
406----
407
408As response the new username is returned.
409
Ben Rohlfs9c960cb2020-02-02 22:12:30 +0100410[[set-display-name]]
411=== Set Display Name
412--
413'PUT /accounts/link:#account-id[\{account-id\}]/displayname'
414--
415
416The new display name must be provided in the request body inside
417a link:#display-name-input[DisplayNameInput] entity.
418
419.Request
420----
421 PUT /accounts/self/displayname HTTP/1.0
422 Content-Type: application/json; charset=UTF-8
423
424 {
425 "display_name": "John"
426 }
427----
428
429As response the new display name is returned.
430
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200431[[get-active]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800432=== Get Active
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800433--
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200434'GET /accounts/link:#account-id[\{account-id\}]/active'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800435--
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200436
437Checks if an account is active.
438
439.Request
440----
441 GET /accounts/john.doe@example.com/active HTTP/1.0
442----
443
Colby Rangerb1253382013-11-06 09:24:47 -0800444If the account is active the string `ok` is returned.
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200445
446.Response
447----
448 HTTP/1.1 200 OK
David Pursehouseee91b772018-09-03 15:15:04 +0900449 Content-Disposition: attachment
450 Content-Type: application/json; charset=UTF-8
Colby Rangerb1253382013-11-06 09:24:47 -0800451
David Pursehouseee91b772018-09-03 15:15:04 +0900452 )]}'
Colby Rangerb1253382013-11-06 09:24:47 -0800453 ok
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200454----
455
David Pursehouse10829f642015-01-21 11:42:32 +0900456If the account is inactive the response is "`204 No Content`".
Colby Rangerb1253382013-11-06 09:24:47 -0800457
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200458[[set-active]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800459=== Set Active
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800460--
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200461'PUT /accounts/link:#account-id[\{account-id\}]/active'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800462--
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200463
464Sets the account state to active.
465
466.Request
467----
468 PUT /accounts/john.doe@example.com/active HTTP/1.0
469----
470
471.Response
472----
473 HTTP/1.1 201 Created
474----
475
David Pursehouse10829f642015-01-21 11:42:32 +0900476If the account was already active the response is "`200 OK`".
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200477
478[[delete-active]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800479=== Delete Active
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800480--
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200481'DELETE /accounts/link:#account-id[\{account-id\}]/active'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800482--
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200483
484Sets the account state to inactive.
485
486.Request
487----
488 DELETE /accounts/john.doe@example.com/active HTTP/1.0
489----
490
491.Response
492----
493 HTTP/1.1 204 No Content
494----
495
David Pursehouseb59fe952016-09-06 10:26:22 +0900496If the account was already inactive the response is "`409 Conflict`".
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200497
Edwin Kempind9cdf5e2013-05-28 11:23:10 +0200498[[set-http-password]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800499=== Set/Generate HTTP Password
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800500--
Edwin Kempind9cdf5e2013-05-28 11:23:10 +0200501'PUT /accounts/link:#account-id[\{account-id\}]/password.http'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800502--
Edwin Kempind9cdf5e2013-05-28 11:23:10 +0200503
504Sets/Generates the HTTP password of an account.
505
506The options for setting/generating the HTTP password must be provided
507in the request body inside a link:#http-password-input[
508HttpPasswordInput] entity.
509
David Pursehoused95b1f12019-05-10 11:55:16 +0900510The account must have a username.
511
Edwin Kempind9cdf5e2013-05-28 11:23:10 +0200512.Request
513----
514 PUT /accounts/self/password.http HTTP/1.0
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900515 Content-Type: application/json; charset=UTF-8
Edwin Kempind9cdf5e2013-05-28 11:23:10 +0200516
517 {
518 "generate": true
519 }
520----
521
522As response the new HTTP password is returned.
523
524.Response
525----
526 HTTP/1.1 200 OK
527 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900528 Content-Type: application/json; charset=UTF-8
Edwin Kempind9cdf5e2013-05-28 11:23:10 +0200529
530 )]}'
531 "ETxgpih8xrNs"
532----
533
534If the HTTP password was deleted the response is "`204 No Content`".
535
536[[delete-http-password]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800537=== Delete HTTP Password
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800538--
Edwin Kempind9cdf5e2013-05-28 11:23:10 +0200539'DELETE /accounts/link:#account-id[\{account-id\}]/password.http'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800540--
Edwin Kempind9cdf5e2013-05-28 11:23:10 +0200541
542Deletes the HTTP password of an account.
543
544.Request
545----
546 DELETE /accounts/self/password.http HTTP/1.0
547----
548
549.Response
550----
551 HTTP/1.1 204 No Content
552----
553
Michael Ochmanne56acd62015-12-15 15:59:42 +0100554[[get-oauth-token]]
555=== Get OAuth Access Token
556--
557'GET /accounts/link:#account-id[\{account-id\}]/oauthtoken'
558--
559
560Returns a previously obtained OAuth access token.
561
562.Request
563----
564 GET /accounts/self/oauthtoken HTTP/1.1
565----
566
567As a response, an link:#oauth-token-info[OAuthTokenInfo] entity is returned
568that describes the OAuth access token.
569
570.Response
571----
572 HTTP/1.1 200 OK
573 Content-Disposition: attachment
574 Content-Type: application/json; charset=UTF-8
575
576 )]}'
577 {
578 "username": "johndow",
579 "resource_host": "gerrit.example.org",
580 "access_token": "eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOi",
581 "provider_id": "oauth-plugin:oauth-provider",
582 "expires_at": "922337203775807",
583 "type": "bearer"
584 }
585----
586
587If there is no token available, or the token has already expired,
588"`404 Not Found`" is returned as response. Requests to obtain an access
589token of another user are rejected with "`403 Forbidden`".
590
Edwin Kempina1be4c22013-05-16 13:00:11 +0200591[[list-account-emails]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800592=== List Account Emails
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800593--
Edwin Kempina1be4c22013-05-16 13:00:11 +0200594'GET /accounts/link:#account-id[\{account-id\}]/emails'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800595--
Edwin Kempina1be4c22013-05-16 13:00:11 +0200596
597Returns the email addresses that are configured for the specified user.
598
Gal Paikinaf96e012020-04-22 17:03:15 +0200599link:access-control.html#capability_modifyAccount[ModifyAccount]
600capability is required to view emails of other users.
601
Edwin Kempina1be4c22013-05-16 13:00:11 +0200602.Request
603----
604 GET /accounts/self/emails HTTP/1.0
605----
606
607As response the email addresses of the user are returned as a list of
608link:#email-info[EmailInfo] entities.
609
610.Response
611----
612 HTTP/1.1 200 OK
613 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900614 Content-Type: application/json; charset=UTF-8
Edwin Kempina1be4c22013-05-16 13:00:11 +0200615
616 )]}'
617 [
618 {
619 "email": "john.doe@example.com",
620 "preferred": true
621 },
622 {
623 "email": "j.doe@example.com"
624 }
625 ]
626----
627
Edwin Kempin493efd52013-05-16 13:32:17 +0200628[[get-account-email]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800629=== Get Account Email
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800630--
Edwin Kempin493efd52013-05-16 13:32:17 +0200631'GET /accounts/link:#account-id[\{account-id\}]/emails/link:#email-id[\{email-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800632--
Edwin Kempin493efd52013-05-16 13:32:17 +0200633
634Retrieves an email address of a user.
635
636.Request
637----
638 GET /accounts/self/emails/john.doe@example.com HTTP/1.0
639----
640
641As response an link:#email-info[EmailInfo] entity is returned that
642describes the email address.
643
644.Response
645----
646 HTTP/1.1 200 OK
647 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900648 Content-Type: application/json; charset=UTF-8
Edwin Kempin493efd52013-05-16 13:32:17 +0200649
650 )]}'
651 {
652 "email": "john.doe@example.com",
653 "preferred": true
654 }
655----
656
Edwin Kempin315066a2013-05-16 16:41:24 +0200657[[create-account-email]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800658=== Create Account Email
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800659--
Edwin Kempin315066a2013-05-16 16:41:24 +0200660'PUT /accounts/link:#account-id[\{account-id\}]/emails/link:#email-id[\{email-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800661--
Edwin Kempin315066a2013-05-16 16:41:24 +0200662
663Registers a new email address for the user. A verification email is
664sent with a link that needs to be visited to confirm the email address,
665unless `DEVELOPMENT_BECOME_ANY_ACCOUNT` is used as authentication type.
666For the development mode email addresses are directly added without
Edwin Kempinc99e5a62013-05-17 11:21:27 +0200667confirmation. A Gerrit administrator may add an email address without
668confirmation by setting `no_confirmation` in the
669link:#email-input[EmailInput].
David Pursehouse649515c2016-02-10 10:16:11 +0900670If link:config-gerrit.html#sendemail.allowrcpt[sendemail.allowrcpt] is
671configured, the added email address must belong to a domain that is
672allowed, unless `no_confirmation` is set.
Rikard Almgren5b9de1c2019-03-12 17:55:16 +0100673If link:config-gerrit.html#sendemail.denyrcpt[sendemail.denyrcpt]
674is configured, make sure that the added email address is *not* disallowed or
675belongs to a domain that is disallowed.
Edwin Kempin315066a2013-05-16 16:41:24 +0200676
Shawn Pearce384a4a62016-06-03 18:37:28 -0700677The link:#email-input[EmailInput] object in the request body may
678contain additional options for the email address.
Edwin Kempin3f48c242013-05-17 10:55:07 +0200679
Edwin Kempin315066a2013-05-16 16:41:24 +0200680.Request
681----
682 PUT /accounts/self/emails/john.doe@example.com HTTP/1.0
Shawn Pearce384a4a62016-06-03 18:37:28 -0700683 Content-Type: application/json; charset=UTF-8
684 Content-Length: 3
685
686 {}
Edwin Kempin315066a2013-05-16 16:41:24 +0200687----
688
689As response the new email address is returned as
690link:#email-info[EmailInfo] entity.
691
692.Response
693----
694 HTTP/1.1 201 Created
695 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900696 Content-Type: application/json; charset=UTF-8
Edwin Kempin315066a2013-05-16 16:41:24 +0200697
698 )]}'
699 {
Edwin Kempin3f48c242013-05-17 10:55:07 +0200700 "email": "john.doe@example.com",
Edwin Kempin4c454e62013-05-27 11:21:55 +0200701 "pending_confirmation": true
Edwin Kempin315066a2013-05-16 16:41:24 +0200702 }
703----
704
Edwin Kempin4fbf70f2013-05-17 14:15:16 +0200705[[delete-account-email]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800706=== Delete Account Email
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800707--
Edwin Kempin4fbf70f2013-05-17 14:15:16 +0200708'DELETE /accounts/link:#account-id[\{account-id\}]/emails/link:#email-id[\{email-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800709--
Edwin Kempin4fbf70f2013-05-17 14:15:16 +0200710
711Deletes an email address of an account.
712
713.Request
714----
715 DELETE /accounts/self/emails/john.doe@example.com HTTP/1.0
716----
717
718.Response
719----
720 HTTP/1.1 204 No Content
721----
722
Edwin Kempine1f82882013-05-16 15:02:45 +0200723[[set-preferred-email]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800724=== Set Preferred Email
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800725--
Edwin Kempine1f82882013-05-16 15:02:45 +0200726'PUT /accounts/link:#account-id[\{account-id\}]/emails/link:#email-id[\{email-id\}]/preferred'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800727--
Edwin Kempine1f82882013-05-16 15:02:45 +0200728
729Sets an email address as preferred email address for an account.
730
731.Request
732----
733 PUT /accounts/self/emails/john.doe@example.com/preferred HTTP/1.0
734----
735
736.Response
737----
738 HTTP/1.1 201 Created
739----
740
741If the email address was already the preferred email address of the
742account the response is "`200 OK`".
743
Edwin Kempinebccb842013-05-29 13:33:06 +0200744[[list-ssh-keys]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800745=== List SSH Keys
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800746--
Edwin Kempinebccb842013-05-29 13:33:06 +0200747'GET /accounts/link:#account-id[\{account-id\}]/sshkeys'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800748--
Edwin Kempinebccb842013-05-29 13:33:06 +0200749
750Returns the SSH keys of an account.
751
752.Request
753----
754 GET /accounts/self/sshkeys HTTP/1.0
755----
756
757As response the SSH keys of the account are returned as a list of
758link:#ssh-key-info[SshKeyInfo] entities.
759
760.Response
761----
762 HTTP/1.1 200 OK
763 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900764 Content-Type: application/json; charset=UTF-8
Edwin Kempinebccb842013-05-29 13:33:06 +0200765
766 )]}'
767 [
768 {
769 "seq": 1,
Orgad Shanehcdd65b52019-11-29 12:16:19 +0200770 "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw== john.doe@example.com",
771 "encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw==",
Edwin Kempinebccb842013-05-29 13:33:06 +0200772 "algorithm": "ssh-rsa",
773 "comment": "john.doe@example.com",
774 "valid": true
775 }
776 ]
777----
778
Edwin Kempinc6824ee2013-05-29 16:18:39 +0200779[[get-ssh-key]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800780=== Get SSH Key
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800781--
Edwin Kempinc6824ee2013-05-29 16:18:39 +0200782'GET /accounts/link:#account-id[\{account-id\}]/sshkeys/link:#ssh-key-id[\{ssh-key-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800783--
Edwin Kempinc6824ee2013-05-29 16:18:39 +0200784
785Retrieves an SSH key of a user.
786
787.Request
788----
789 GET /accounts/self/sshkeys/1 HTTP/1.0
790----
791
792As response an link:#ssh-key-info[SshKeyInfo] entity is returned that
793describes the SSH key.
794
795.Response
796----
797 HTTP/1.1 200 OK
798 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900799 Content-Type: application/json; charset=UTF-8
Edwin Kempinc6824ee2013-05-29 16:18:39 +0200800
801 )]}'
802 {
803 "seq": 1,
Orgad Shanehcdd65b52019-11-29 12:16:19 +0200804 "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw== john.doe@example.com",
805 "encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw==",
Edwin Kempinc6824ee2013-05-29 16:18:39 +0200806 "algorithm": "ssh-rsa",
807 "comment": "john.doe@example.com",
808 "valid": true
809 }
810----
811
Edwin Kempin4e2e5212013-05-31 15:11:10 +0200812[[add-ssh-key]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800813=== Add SSH Key
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800814--
Edwin Kempin4e2e5212013-05-31 15:11:10 +0200815'POST /accounts/link:#account-id[\{account-id\}]/sshkeys'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800816--
Edwin Kempin4e2e5212013-05-31 15:11:10 +0200817
818Adds an SSH key for a user.
819
820The SSH public key must be provided as raw content in the request body.
821
Edwin Kempinea37c782016-04-11 14:25:46 +0200822Trying to add an SSH key that already exists succeeds, but no new SSH
823key is persisted.
824
Edwin Kempin4e2e5212013-05-31 15:11:10 +0200825.Request
826----
827 POST /accounts/self/sshkeys HTTP/1.0
Orgad Shanehfd808eb2019-11-29 11:41:54 +0200828 Content-Type: text/plain
Edwin Kempin4e2e5212013-05-31 15:11:10 +0200829
Orgad Shanehcdd65b52019-11-29 12:16:19 +0200830 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw== john.doe@example.com
Edwin Kempin4e2e5212013-05-31 15:11:10 +0200831----
832
833As response an link:#ssh-key-info[SshKeyInfo] entity is returned that
834describes the new SSH key.
835
836.Response
837----
838 HTTP/1.1 200 OK
839 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +0900840 Content-Type: application/json; charset=UTF-8
Edwin Kempin4e2e5212013-05-31 15:11:10 +0200841
842 )]}'
843 {
844 "seq": 2,
Orgad Shanehcdd65b52019-11-29 12:16:19 +0200845 "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw== john.doe@example.com",
846 "encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw==",
Edwin Kempin4e2e5212013-05-31 15:11:10 +0200847 "algorithm": "ssh-rsa",
848 "comment": "john.doe@example.com",
849 "valid": true
850 }
851----
852
Edwin Kempin5a02ffd2013-06-03 15:33:53 +0200853[[delete-ssh-key]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800854=== Delete SSH Key
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800855--
Edwin Kempin5a02ffd2013-06-03 15:33:53 +0200856'DELETE /accounts/link:#account-id[\{account-id\}]/sshkeys/link:#ssh-key-id[\{ssh-key-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800857--
Edwin Kempin5a02ffd2013-06-03 15:33:53 +0200858
859Deletes an SSH key of a user.
860
861.Request
862----
863 DELETE /accounts/self/sshkeys/2 HTTP/1.0
864----
865
866.Response
867----
868 HTTP/1.1 204 No Content
869----
870
Dave Borowitzed170f32015-07-27 17:31:49 -0700871[[list-gpg-keys]]
872=== List GPG Keys
873--
874'GET /accounts/link:#account-id[\{account-id\}]/gpgkeys'
875--
876
877Returns the GPG keys of an account.
878
879.Request
880----
881 GET /accounts/self/gpgkeys HTTP/1.0
882----
883
884As a response, the GPG keys of the account are returned as a map of
885link:#gpg-key-info[GpgKeyInfo] entities, keyed by ID.
886
887.Response
888----
889 HTTP/1.1 200 OK
890 Content-Disposition: attachment
891 Content-Type: application/json; charset=UTF-8
892
893 )]}'
894 {
895 "AFC8A49B": {
896 "fingerprint": "0192 723D 42D1 0C5B 32A6 E1E0 9350 9E4B AFC8 A49B",
897 "user_ids": [
898 "John Doe \u003cjohn.doe@example.com\u003e"
899 ],
Dave Borowitz36b35b92015-09-14 12:34:13 -0400900 "key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: BCPG v1.52\n\nmQENBFXUpNcBCACv4paCiyKxZ0EcKy8VaWVNkJlNebRBiyw9WxU85wPOq5Gz/3GT\nRQwKqeY0SxVdQT8VNBw2sBe2m6eqcfZ2iKmesSlbXMe15DA7k8Bg4zEpQ0tXNG1L\nhceZDVQ1Xk06T2sgkunaiPsXi82nwN3UWYtDXxX4is5e6xBNL48Jgz4lbqo6+8D5\nvsVYiYMx4AwRkJyt/oA3IZAtSlY8Yd445nY14VPcnsGRwGWTLyZv9gxKHRUppVhQ\nE3o6ePXKEVgmONnQ4CjqmkGwWZvjMF2EPtAxvQLAuFa8Hqtkq5cgfgVkv/Vrcln4\nnQZVoMm3a3f5ODii2tQzNh6+7LL1bpqAmVEtABEBAAG0H0pvaG4gRG9lIDxqb2hu\nLmRvZUBleGFtcGxlLmNvbT6JATgEEwECACIFAlXUpNcCGwMGCwkIBwMCBhUIAgkK\nCwQWAgMBAh4BAheAAAoJEJNQnkuvyKSbfjoH/2OcSQOu1kJ20ndjhgY2yNChm7gd\ntU7TEBbB0TsLeazkrrLtKvrpW5+CRe07ZAG9HOtp3DikwAyrhSxhlYgVsQDhgB8q\nG0tYiZtQ88YyYrncCQ4hwknrcWXVW9bK3V4ZauxzPv3ADSloyR9tMURw5iHCIeL5\nfIw/pLvA3RjPMx4Sfow/bqRCUELua39prGw5Tv8a2ZRFbj2sgP5j8lUFegyJPQ4z\ntJhe6zZvKOzvIyxHO8llLmdrImsXRL9eqroWGs0VYqe6baQpY6xpSjbYK0J5HYcg\nTO+/u80JI+ROTMHE6unGp5Pgh/xIz6Wd34E0lWL1eOyNfGiPLyRWn1d0",
901 "status": "TRUSTED",
902 "problems": [],
Dave Borowitzeab3aff2015-08-04 14:15:50 -0700903 },
Dave Borowitzed170f32015-07-27 17:31:49 -0700904 }
905----
906
907[[get-gpg-key]]
908=== Get GPG Key
909--
910'GET /accounts/link:#account-id[\{account-id\}]/gpgkeys/link:#gpg-key-id[\{gpg-key-id\}]'
911--
912
913Retrieves a GPG key of a user.
914
915.Request
916----
917 GET /accounts/self/gpgkeys/AFC8A49B HTTP/1.0
918----
919
920As a response, a link:#gpg-key-info[GpgKeyInfo] entity is returned that
921describes the GPG key.
922
923.Response
924----
925 HTTP/1.1 200 OK
926 Content-Disposition: attachment
927 Content-Type: application/json; charset=UTF-8
928
929 )]}'
930 {
931 "id": "AFC8A49B",
932 "fingerprint": "0192 723D 42D1 0C5B 32A6 E1E0 9350 9E4B AFC8 A49B",
933 "user_ids": [
934 "John Doe \u003cjohn.doe@example.com\u003e"
935 ],
Dave Borowitz36b35b92015-09-14 12:34:13 -0400936 "key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: BCPG v1.52\n\nmQENBFXUpNcBCACv4paCiyKxZ0EcKy8VaWVNkJlNebRBiyw9WxU85wPOq5Gz/3GT\nRQwKqeY0SxVdQT8VNBw2sBe2m6eqcfZ2iKmesSlbXMe15DA7k8Bg4zEpQ0tXNG1L\nhceZDVQ1Xk06T2sgkunaiPsXi82nwN3UWYtDXxX4is5e6xBNL48Jgz4lbqo6+8D5\nvsVYiYMx4AwRkJyt/oA3IZAtSlY8Yd445nY14VPcnsGRwGWTLyZv9gxKHRUppVhQ\nE3o6ePXKEVgmONnQ4CjqmkGwWZvjMF2EPtAxvQLAuFa8Hqtkq5cgfgVkv/Vrcln4\nnQZVoMm3a3f5ODii2tQzNh6+7LL1bpqAmVEtABEBAAG0H0pvaG4gRG9lIDxqb2hu\nLmRvZUBleGFtcGxlLmNvbT6JATgEEwECACIFAlXUpNcCGwMGCwkIBwMCBhUIAgkK\nCwQWAgMBAh4BAheAAAoJEJNQnkuvyKSbfjoH/2OcSQOu1kJ20ndjhgY2yNChm7gd\ntU7TEBbB0TsLeazkrrLtKvrpW5+CRe07ZAG9HOtp3DikwAyrhSxhlYgVsQDhgB8q\nG0tYiZtQ88YyYrncCQ4hwknrcWXVW9bK3V4ZauxzPv3ADSloyR9tMURw5iHCIeL5\nfIw/pLvA3RjPMx4Sfow/bqRCUELua39prGw5Tv8a2ZRFbj2sgP5j8lUFegyJPQ4z\ntJhe6zZvKOzvIyxHO8llLmdrImsXRL9eqroWGs0VYqe6baQpY6xpSjbYK0J5HYcg\nTO+/u80JI+ROTMHE6unGp5Pgh/xIz6Wd34E0lWL1eOyNfGiPLyRWn1d0",
937 "status": "TRUSTED",
938 "problems": [],
Dave Borowitzed170f32015-07-27 17:31:49 -0700939 }
940----
941
Dave Borowitzeab3aff2015-08-04 14:15:50 -0700942[[add-delete-gpg-keys]]
943=== Add/Delete GPG Keys
Dave Borowitzed170f32015-07-27 17:31:49 -0700944--
945'POST /accounts/link:#account-id[\{account-id\}]/gpgkeys'
946--
947
Dave Borowitzeab3aff2015-08-04 14:15:50 -0700948Add or delete one or more GPG keys for a user.
Dave Borowitzed170f32015-07-27 17:31:49 -0700949
Dave Borowitzeab3aff2015-08-04 14:15:50 -0700950The changes must be provided in the request body as a
Dave Borowitz73cfbe62015-08-27 16:36:41 -0400951link:#gpg-keys-input[GpgKeysInput] entity. Each new GPG key is provided in
Dave Borowitzed170f32015-07-27 17:31:49 -0700952ASCII armored format, and must contain a self-signed certification
953matching a registered email or other identity of the user.
954
955.Request
956----
957 POST /accounts/link:#account-id[\{account-id\}]/gpgkeys
958 Content-Type: application/json
959
960 {
961 "add": [
962 "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: GnuPG v1\n\nmQENBFXUpNcBCACv4paCiyKxZ0EcKy8VaWVNkJlNebRBiyw9WxU85wPOq5Gz/3GT\nRQwKqeY0SxVdQT8VNBw2sBe2m6eqcfZ2iKmesSlbXMe15DA7k8Bg4zEpQ0tXNG1L\nhceZDVQ1Xk06T2sgkunaiPsXi82nwN3UWYtDXxX4is5e6xBNL48Jgz4lbqo6+8D5\nvsVYiYMx4AwRkJyt/oA3IZAtSlY8Yd445nY14VPcnsGRwGWTLyZv9gxKHRUppVhQ\nE3o6ePXKEVgmONnQ4CjqmkGwWZvjMF2EPtAxvQLAuFa8Hqtkq5cgfgVkv/Vrcln4\nnQZVoMm3a3f5ODii2tQzNh6+7LL1bpqAmVEtABEBAAG0H0pvaG4gRG9lIDxqb2hu\nLmRvZUBleGFtcGxlLmNvbT6JATgEEwECACIFAlXUpNcCGwMGCwkIBwMCBhUIAgkK\nCwQWAgMBAh4BAheAAAoJEJNQnkuvyKSbfjoH/2OcSQOu1kJ20ndjhgY2yNChm7gd\ntU7TEBbB0TsLeazkrrLtKvrpW5+CRe07ZAG9HOtp3DikwAyrhSxhlYgVsQDhgB8q\nG0tYiZtQ88YyYrncCQ4hwknrcWXVW9bK3V4ZauxzPv3ADSloyR9tMURw5iHCIeL5\nfIw/pLvA3RjPMx4Sfow/bqRCUELua39prGw5Tv8a2ZRFbj2sgP5j8lUFegyJPQ4z\ntJhe6zZvKOzvIyxHO8llLmdrImsXRL9eqroWGs0VYqe6baQpY6xpSjbYK0J5HYcg\nTO+/u80JI+ROTMHE6unGp5Pgh/xIz6Wd34E0lWL1eOyNfGiPLyRWn1d0yZO5AQ0E\nVdSk1wEIALUycrH2HK9zQYdR/KJo1yJJuaextLWsYYn881yDQo/p06U5vXOZ28lG\nAq/Xs96woVZPbgME6FyQzhf20Z2sbr+5bNo3OcEKaKX3Eo/sWwSJ7bXbGLDxMf4S\netfY1WDC+4rTqE30JuC++nQviPRdCcZf0AEgM6TxVhYEMVYwV787YO1IH62EBICM\nSkIONOfnusNZ4Skgjq9OzakOOpROZ4tki5cH/5oSDgdcaGPy1CFDpL9fG6er2zzk\nsw3qCbraqZrrlgpinWcAduiao67U/dV18O6OjYzrt33fTKZ0+bXhk1h1gloC21MQ\nya0CXlnfR/FOQhvuK0RlbR3cMfhZQscAEQEAAYkBHwQYAQIACQUCVdSk1wIbDAAK\nCRCTUJ5Lr8ikm8+QB/4uE+AlvFQFh9W8koPdfk7CJF7wdgZZ2NDtktvLL71WuMK8\nPOmf9f5JtcLCX4iJxGzcWogAR5ed20NgUoHUg7jn9Xm3fvP+kiqL6WqPhjazd89h\nk06v9hPE65kp4wb0fQqDrtWfP1lFGuh77rQgISt3Y4QutDl49vXS183JAfGPxFxx\n8FgGcfNwL2LVObvqCA0WLqeIrQVbniBPFGocE3yA/0W9BB/xtolpKfgMMsqGRMeu\n9oIsNxB2oE61OsqjUtGsnKQi8k5CZbhJaql4S89vwS+efK0R+mo+0N55b0XxRlCS\nfaURgAcjarQzJnG0hUps2GNO/+nM7UyyJAGfHlh5\n=EdXO\n-----END PGP PUBLIC KEY BLOCK-----\n"
Dave Borowitzeab3aff2015-08-04 14:15:50 -0700963 ],
964 "delete": [
965 "DEADBEEF",
Dave Borowitzed170f32015-07-27 17:31:49 -0700966 ]
967 }'
968----
969
Dave Borowitzeab3aff2015-08-04 14:15:50 -0700970As a response, the modified GPG keys are returned as a map of
971link:#gpg-key-info[GpgKeyInfo] entities, keyed by ID. Deleted keys are
972represented by an empty object.
Dave Borowitzed170f32015-07-27 17:31:49 -0700973
974.Response
975----
976 HTTP/1.1 200 OK
977 Content-Disposition: attachment
978 Content-Type: application/json; charset=UTF-8
979
980 )]}'
981 {
982 "AFC8A49B": {
983 "fingerprint": "0192 723D 42D1 0C5B 32A6 E1E0 9350 9E4B AFC8 A49B",
984 "user_ids": [
985 "John Doe \u003cjohn.doe@example.com\u003e"
986 ],
987 "key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: BCPG v1.52\n\nmQENBFXUpNcBCACv4paCiyKxZ0EcKy8VaWVNkJlNebRBiyw9WxU85wPOq5Gz/3GT\nRQwKqeY0SxVdQT8VNBw2sBe2m6eqcfZ2iKmesSlbXMe15DA7k8Bg4zEpQ0tXNG1L\nhceZDVQ1Xk06T2sgkunaiPsXi82nwN3UWYtDXxX4is5e6xBNL48Jgz4lbqo6+8D5\nvsVYiYMx4AwRkJyt/oA3IZAtSlY8Yd445nY14VPcnsGRwGWTLyZv9gxKHRUppVhQ\nE3o6ePXKEVgmONnQ4CjqmkGwWZvjMF2EPtAxvQLAuFa8Hqtkq5cgfgVkv/Vrcln4\nnQZVoMm3a3f5ODii2tQzNh6+7LL1bpqAmVEtABEBAAG0H0pvaG4gRG9lIDxqb2hu\nLmRvZUBleGFtcGxlLmNvbT6JATgEEwECACIFAlXUpNcCGwMGCwkIBwMCBhUIAgkK\nCwQWAgMBAh4BAheAAAoJEJNQnkuvyKSbfjoH/2OcSQOu1kJ20ndjhgY2yNChm7gd\ntU7TEBbB0TsLeazkrrLtKvrpW5+CRe07ZAG9HOtp3DikwAyrhSxhlYgVsQDhgB8q\nG0tYiZtQ88YyYrncCQ4hwknrcWXVW9bK3V4ZauxzPv3ADSloyR9tMURw5iHCIeL5\nfIw/pLvA3RjPMx4Sfow/bqRCUELua39prGw5Tv8a2ZRFbj2sgP5j8lUFegyJPQ4z\ntJhe6zZvKOzvIyxHO8llLmdrImsXRL9eqroWGs0VYqe6baQpY6xpSjbYK0J5HYcg\nTO+/u80JI+ROTMHE6unGp5Pgh/xIz6Wd34E0lWL1eOyNfGiPLyRWn1d0"
Dave Borowitz36b35b92015-09-14 12:34:13 -0400988 "status": "TRUSTED",
989 "problems": [],
Dave Borowitzed170f32015-07-27 17:31:49 -0700990 }
Dave Borowitzeab3aff2015-08-04 14:15:50 -0700991 "DEADBEEF": {}
Dave Borowitzed170f32015-07-27 17:31:49 -0700992 }
993----
994
Dave Borowitz70daef52015-08-03 10:53:06 -0700995[[delete-gpg-key]]
996=== Delete GPG Key
997--
998'DELETE /accounts/link:#account-id[\{account-id\}]/gpgkeys/link:#gpg-key-id[\{gpg-key-id\}]'
999--
1000
1001Deletes a GPG key of a user.
1002
1003.Request
1004----
1005 DELETE /accounts/self/gpgkeys/AFC8A49B HTTP/1.0
1006----
1007
1008.Response
1009----
1010 HTTP/1.1 204 No Content
1011----
1012
Edwin Kempinf502dd02013-02-14 14:22:25 +01001013[[list-account-capabilities]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001014=== List Account Capabilities
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001015--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001016'GET /accounts/link:#account-id[\{account-id\}]/capabilities'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001017--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001018
Edwin Kempin5944d642013-02-15 09:31:42 +01001019Returns the global capabilities that are enabled for the specified
1020user.
Edwin Kempinf502dd02013-02-14 14:22:25 +01001021
1022If the global capabilities for the calling user should be listed,
1023`self` can be used as account-id. This can be used by UI tools to
1024discover if administrative features are available to the caller, so
1025they can hide (or show) relevant UI actions.
Edwin Kempind0a63922013-01-23 16:32:59 +01001026
Edwin Kempin37440832013-02-06 11:36:00 +01001027.Request
Edwin Kempind0a63922013-01-23 16:32:59 +01001028----
1029 GET /accounts/self/capabilities HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +01001030----
1031
Edwin Kempin5944d642013-02-15 09:31:42 +01001032As response the global capabilities of the user are returned as a
1033link:#capability-info[CapabilityInfo] entity.
1034
Edwin Kempin37440832013-02-06 11:36:00 +01001035.Response
1036----
1037 HTTP/1.1 200 OK
1038 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +09001039 Content-Type: application/json; charset=UTF-8
Edwin Kempind0a63922013-01-23 16:32:59 +01001040
1041 )]}'
1042 {
1043 "queryLimit": {
1044 "min": 0,
1045 "max": 500
Edwin Kempin830d9b82013-02-14 15:03:26 +01001046 },
1047 "emailReviewers": true
Edwin Kempind0a63922013-01-23 16:32:59 +01001048 }
1049----
1050
Han-Wen Nienhuys84d830b2017-02-15 16:36:04 +01001051Administrator that has authenticated with basic authentication:
Edwin Kempin37440832013-02-06 11:36:00 +01001052
1053.Request
Edwin Kempind0a63922013-01-23 16:32:59 +01001054----
1055 GET /a/accounts/self/capabilities HTTP/1.0
Han-Wen Nienhuys84d830b2017-02-15 16:36:04 +01001056 Authorization: Basic ABCDECF..
Edwin Kempin37440832013-02-06 11:36:00 +01001057----
1058
1059.Response
1060----
1061 HTTP/1.1 200 OK
1062 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +09001063 Content-Type: application/json; charset=UTF-8
Edwin Kempind0a63922013-01-23 16:32:59 +01001064
1065 )]}'
1066 {
1067 "administrateServer": true,
1068 "queryLimit": {
1069 "min": 0,
1070 "max": 500
1071 },
1072 "createAccount": true,
1073 "createGroup": true,
1074 "createProject": true,
Edwin Kempin830d9b82013-02-14 15:03:26 +01001075 "emailReviewers": true,
Edwin Kempind0a63922013-01-23 16:32:59 +01001076 "killTask": true,
1077 "viewCaches": true,
1078 "flushCaches": true,
1079 "viewConnections": true,
Edwin Kempin362b14d12014-05-09 14:18:12 +02001080 "viewPlugins": true,
Edwin Kempind0a63922013-01-23 16:32:59 +01001081 "viewQueue": true,
David Ostrovsky99fc2532013-06-16 17:50:35 +02001082 "runGC": true
Edwin Kempind0a63922013-01-23 16:32:59 +01001083 }
1084----
1085
Edwin Kempina64c4b92013-01-23 11:30:40 +01001086.Get your own capabilities
1087****
1088get::/accounts/self/capabilities
1089****
1090
Edwin Kempind0a63922013-01-23 16:32:59 +01001091To filter the set of global capabilities the `q` parameter can be used.
1092Filtering may decrease the response time by avoiding looking at every
1093possible alternative for the caller.
1094
Edwin Kempin37440832013-02-06 11:36:00 +01001095.Request
Edwin Kempind0a63922013-01-23 16:32:59 +01001096----
1097 GET /a/accounts/self/capabilities?q=createAccount&q=createGroup HTTP/1.0
Han-Wen Nienhuys84d830b2017-02-15 16:36:04 +01001098 Authorization: Basic ABCDEF...
Edwin Kempin37440832013-02-06 11:36:00 +01001099----
1100
1101.Response
1102----
1103 HTTP/1.1 200 OK
1104 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +09001105 Content-Type: application/json; charset=UTF-8
Edwin Kempind0a63922013-01-23 16:32:59 +01001106
1107 )]}'
1108 {
1109 "createAccount": true,
1110 "createGroup": true
1111 }
1112----
1113
Edwin Kempina64c4b92013-01-23 11:30:40 +01001114.Check if you can create groups
1115****
1116get::/accounts/self/capabilities?q=createGroup
1117****
1118
Edwin Kempin91444792013-02-15 10:09:49 +01001119[[check-account-capability]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001120=== Check Account Capability
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001121--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001122'GET /accounts/link:#account-id[\{account-id\}]/capabilities/link:#capability-id[\{capability-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001123--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001124
Edwin Kempin91444792013-02-15 10:09:49 +01001125Checks if a user has a certain global capability.
1126
1127.Request
1128----
1129 GET /a/accounts/self/capabilities/createGroup HTTP/1.0
1130----
1131
1132If the user has the global capability the string `ok` is returned.
1133
1134.Response
1135----
1136 HTTP/1.1 200 OK
1137
1138 ok
1139----
1140
1141If the user doesn't have the global capability the response is
David Pursehouse10829f642015-01-21 11:42:32 +09001142"`404 Not Found`".
Edwin Kempin91444792013-02-15 10:09:49 +01001143
1144.Check if you can create groups
1145****
1146get::/accounts/self/capabilities/createGroup
1147****
1148
Edwin Kempinb0a9b2b2013-02-15 13:25:54 +01001149[[list-groups]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001150=== List Groups
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001151--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001152'GET /accounts/link:#account-id[\{account-id\}]/groups/'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001153--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001154
Edwin Kempinb0a9b2b2013-02-15 13:25:54 +01001155Lists all groups that contain the specified user as a member.
1156
1157.Request
1158----
1159 GET /a/accounts/self/groups/ HTTP/1.0
1160----
1161
1162As result a list of link:rest-api-groups.html#group-info[GroupInfo]
1163entries is returned.
1164
1165.Response
1166----
1167 HTTP/1.1 200 OK
1168 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +09001169 Content-Type: application/json; charset=UTF-8
Edwin Kempinb0a9b2b2013-02-15 13:25:54 +01001170
1171 )]}'
1172 [
1173 {
Edwin Kempinb0a9b2b2013-02-15 13:25:54 +01001174 "id": "global%3AAnonymous-Users",
1175 "url": "#/admin/groups/uuid-global%3AAnonymous-Users",
1176 "options": {
1177 },
1178 "description": "Any user, signed-in or not",
1179 "group_id": 2,
1180 "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
1181 },
1182 {
Edwin Kempinb0a9b2b2013-02-15 13:25:54 +01001183 "id": "834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7",
1184 "url": "#/admin/groups/uuid-834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7",
1185 "options": {
1186 "visible_to_all": true,
1187 },
1188 "group_id": 6,
1189 "owner_id": "834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7"
1190 },
1191 {
Edwin Kempinb0a9b2b2013-02-15 13:25:54 +01001192 "id": "global%3ARegistered-Users",
1193 "url": "#/admin/groups/uuid-global%3ARegistered-Users",
1194 "options": {
1195 },
1196 "description": "Any signed-in user",
1197 "group_id": 3,
1198 "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
1199 }
1200 ]
1201----
1202
1203.List all groups that contain you as a member
1204****
1205get::/accounts/self/groups/
1206****
1207
Edwin Kempin76de2132013-02-15 12:53:41 +01001208[[get-avatar]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001209=== Get Avatar
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001210--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001211'GET /accounts/link:#account-id[\{account-id\}]/avatar'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001212--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +01001213
Edwin Kempin76de2132013-02-15 12:53:41 +01001214Retrieves the avatar image of the user.
1215
1216With the `size` option (alias `s`) you can specify the preferred size
1217in pixels (height and width).
1218
1219.Request
1220----
1221 GET /a/accounts/john.doe@example.com/avatar?s=20 HTTP/1.0
1222----
1223
1224The response redirects to the URL of the avatar image.
1225
1226.Response
1227----
1228 HTTP/1.1 302 Found
1229 Location: https://profiles/avatar/john_doe.jpeg?s=20x20
1230----
1231
Edwin Kempincc01b0b2013-04-25 14:37:17 +02001232[[get-avatar-change-url]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001233=== Get Avatar Change URL
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001234--
Edwin Kempincc01b0b2013-04-25 14:37:17 +02001235'GET /accounts/link:#account-id[\{account-id\}]/avatar.change.url'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001236--
Edwin Kempincc01b0b2013-04-25 14:37:17 +02001237
1238Retrieves the URL where the user can change the avatar image.
1239
1240.Request
1241----
1242 GET /a/accounts/self/avatar.change.url HTTP/1.0
1243----
1244
1245.Response
1246----
1247 HTTP/1.1 200 OK
1248 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +09001249 Content-Type: text/plain; charset=UTF-8
Edwin Kempincc01b0b2013-04-25 14:37:17 +02001250
1251 https://profiles/pictures/john.doe
1252----
1253
Khai Do38ba5cc2014-07-10 20:23:20 -07001254[[get-user-preferences]]
1255=== Get User Preferences
1256--
1257'GET /accounts/link:#account-id[\{account-id\}]/preferences'
1258--
1259
1260Retrieves the user's preferences.
1261
1262.Request
1263----
1264 GET /a/accounts/self/preferences HTTP/1.0
1265----
1266
1267As result the account preferences of the user are returned as a
1268link:#preferences-info[PreferencesInfo] entity.
1269
Khai Do8dcf7012016-01-11 15:46:29 -08001270Users may only retrieve the preferences for their own account,
1271unless they are an
1272link:access-control.html#administrators[Administrator] or a member
1273of a group that is granted the
1274link:access-control.html#capability_modifyAccount[ModifyAccount]
1275capability, in which case they can retrieve the preferences for
1276any account.
1277
Khai Do38ba5cc2014-07-10 20:23:20 -07001278.Response
1279----
1280 HTTP/1.1 200 OK
1281 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +09001282 Content-Type: application/json; charset=UTF-8
Khai Do38ba5cc2014-07-10 20:23:20 -07001283
1284 )]}'
1285 {
1286 "changes_per_page": 25,
Milutin Kristofic8aea3752022-05-20 12:54:52 +02001287 "theme": "AUTO",
Khai Do38ba5cc2014-07-10 20:23:20 -07001288 "date_format": "STD",
1289 "time_format": "HHMM_12",
Doug Kelly9538d202016-04-28 09:28:39 -05001290 "diff_view": "SIDE_BY_SIDE",
Khai Do38ba5cc2014-07-10 20:23:20 -07001291 "size_bar_in_change_table": true,
Doug Kelly9538d202016-04-28 09:28:39 -05001292 "mute_common_path_prefixes": true,
Dave Borowitzd6ee48e2017-04-27 10:32:42 -04001293 "publish_comments_on_push": true,
David Ostrovsky821c5322018-06-10 16:36:42 +02001294 "work_in_progress_by_default": true,
Edwin Kempind540a252016-09-08 13:29:03 +02001295 "default_base_for_merges": "FIRST_PARENT",
Khai Do38ba5cc2014-07-10 20:23:20 -07001296 "my": [
1297 {
1298 "url": "#/dashboard/self",
1299 "name": "Changes"
1300 },
1301 {
Khai Do38ba5cc2014-07-10 20:23:20 -07001302 "url": "#/q/has:draft",
1303 "name": "Draft Comments"
1304 },
1305 {
1306 "url": "#/q/is:watched+is:open",
1307 "name": "Watched Changes"
1308 },
1309 {
1310 "url": "#/q/is:starred",
1311 "name": "Starred Changes"
1312 },
1313 {
1314 "url": "#/groups/self",
1315 "name": "Groups"
Becky Siegele450a312016-12-16 10:30:50 -08001316 },
1317 change_table: []
Khai Do38ba5cc2014-07-10 20:23:20 -07001318 ]
1319 }
1320----
1321
1322[[set-user-preferences]]
1323=== Set User Preferences
1324--
1325'PUT /accounts/link:#account-id[\{account-id\}]/preferences'
1326--
1327
1328Sets the user's preferences.
1329
1330The new preferences must be provided in the request body as a
1331link:#preferences-input[PreferencesInput] entity.
1332
1333.Request
1334----
David Pursehouse037d0622014-10-20 16:51:50 +09001335 PUT /a/accounts/self/preferences HTTP/1.0
David Pursehouse56bf1cb2015-01-06 15:44:00 +09001336 Content-Type: application/json; charset=UTF-8
Khai Do38ba5cc2014-07-10 20:23:20 -07001337
1338 {
1339 "changes_per_page": 50,
Paladox none4a597702020-07-03 13:55:59 +00001340 "theme": "DARK",
Becky Siegele450a312016-12-16 10:30:50 -08001341 "expand_inline_diffs": true,
Khai Do38ba5cc2014-07-10 20:23:20 -07001342 "date_format": "STD",
1343 "time_format": "HHMM_12",
1344 "size_bar_in_change_table": true,
paladoxa8dc6152021-04-11 16:07:53 +01001345 "disable_keyboard_shortcuts": true,
Chris Poucet8c47d562021-09-17 22:47:32 +00001346 "disable_token_highlighting": true,
Khai Do38ba5cc2014-07-10 20:23:20 -07001347 "diff_view": "SIDE_BY_SIDE",
Doug Kelly9538d202016-04-28 09:28:39 -05001348 "mute_common_path_prefixes": true,
Khai Do38ba5cc2014-07-10 20:23:20 -07001349 "my": [
1350 {
1351 "url": "#/dashboard/self",
1352 "name": "Changes"
1353 },
1354 {
Khai Do38ba5cc2014-07-10 20:23:20 -07001355 "url": "#/q/has:draft",
1356 "name": "Draft Comments"
1357 },
1358 {
1359 "url": "#/q/is:watched+is:open",
1360 "name": "Watched Changes"
1361 },
1362 {
1363 "url": "#/q/is:starred",
1364 "name": "Starred Changes"
1365 },
1366 {
1367 "url": "#/groups/self",
1368 "name": "Groups"
1369 }
Becky Siegele450a312016-12-16 10:30:50 -08001370 ],
1371 "change_table": [
1372 "Subject",
1373 "Owner"
Khai Do38ba5cc2014-07-10 20:23:20 -07001374 ]
1375 }
1376----
1377
1378As result the new preferences of the user are returned as a
1379link:#preferences-info[PreferencesInfo] entity.
1380
1381.Response
1382----
1383 HTTP/1.1 200 OK
1384 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +09001385 Content-Type: application/json; charset=UTF-8
Khai Do38ba5cc2014-07-10 20:23:20 -07001386
1387 )]}'
1388 {
1389 "changes_per_page": 50,
Paladox none4a597702020-07-03 13:55:59 +00001390 "theme" "DARK",
Becky Siegele450a312016-12-16 10:30:50 -08001391 "expand_inline_diffs": true,
Khai Do38ba5cc2014-07-10 20:23:20 -07001392 "date_format": "STD",
1393 "time_format": "HHMM_12",
1394 "size_bar_in_change_table": true,
Khai Do38ba5cc2014-07-10 20:23:20 -07001395 "diff_view": "SIDE_BY_SIDE",
Dave Borowitzd6ee48e2017-04-27 10:32:42 -04001396 "publish_comments_on_push": true,
paladoxa8dc6152021-04-11 16:07:53 +01001397 "disable_keyboard_shortcuts": true,
Chris Poucet8c47d562021-09-17 22:47:32 +00001398 "disable_token_highlighting": true,
David Ostrovsky821c5322018-06-10 16:36:42 +02001399 "work_in_progress_by_default": true,
Doug Kelly9538d202016-04-28 09:28:39 -05001400 "mute_common_path_prefixes": true,
Khai Do38ba5cc2014-07-10 20:23:20 -07001401 "my": [
1402 {
1403 "url": "#/dashboard/self",
1404 "name": "Changes"
1405 },
1406 {
Khai Do38ba5cc2014-07-10 20:23:20 -07001407 "url": "#/q/has:draft",
1408 "name": "Draft Comments"
1409 },
1410 {
1411 "url": "#/q/is:watched+is:open",
1412 "name": "Watched Changes"
1413 },
1414 {
1415 "url": "#/q/is:starred",
1416 "name": "Starred Changes"
1417 },
1418 {
1419 "url": "#/groups/self",
1420 "name": "Groups"
1421 }
Becky Siegele450a312016-12-16 10:30:50 -08001422 ],
1423 "change_table": [
1424 "Subject",
1425 "Owner"
Khai Do38ba5cc2014-07-10 20:23:20 -07001426 ]
1427 }
1428----
1429
Edwin Kempine5d563f52013-03-21 09:35:38 +01001430[[get-diff-preferences]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001431=== Get Diff Preferences
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001432--
Edwin Kempine5d563f52013-03-21 09:35:38 +01001433'GET /accounts/link:#account-id[\{account-id\}]/preferences.diff'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001434--
Edwin Kempine5d563f52013-03-21 09:35:38 +01001435
1436Retrieves the diff preferences of a user.
1437
1438.Request
1439----
1440 GET /a/accounts/self/preferences.diff HTTP/1.0
1441----
1442
1443As result the diff preferences of the user are returned as a
1444link:#diff-preferences-info[DiffPreferencesInfo] entity.
1445
1446.Response
1447----
1448 HTTP/1.1 200 OK
1449 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +09001450 Content-Type: application/json; charset=UTF-8
Edwin Kempine5d563f52013-03-21 09:35:38 +01001451
1452 )]}'
1453 {
1454 "context": 10,
David Ostrovsky09caa542015-10-24 13:03:34 +02001455 "ignore_whitespace": "IGNORE_ALL",
Edwin Kempine5d563f52013-03-21 09:35:38 +01001456 "intraline_difference": true,
1457 "line_length": 100,
David Ostrovskyca09f472015-06-20 13:19:34 +02001458 "cursor_blink_rate": 500,
Edwin Kempine5d563f52013-03-21 09:35:38 +01001459 "show_tabs": true,
1460 "show_whitespace_errors": true,
1461 "syntax_highlighting": true,
Becky Siegeld7dbed62016-10-12 10:55:26 -07001462 "tab_size": 8,
1463 "font_size": 12
Edwin Kempine5d563f52013-03-21 09:35:38 +01001464 }
1465----
1466
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001467[[set-diff-preferences]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001468=== Set Diff Preferences
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001469--
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001470'PUT /accounts/link:#account-id[\{account-id\}]/preferences.diff'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001471--
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001472
1473Sets the diff preferences of a user.
1474
1475The new diff preferences must be provided in the request body as a
1476link:#diff-preferences-input[DiffPreferencesInput] entity.
1477
1478.Request
1479----
David Pursehouseb331dbd2016-05-12 20:45:52 +09001480 PUT /a/accounts/self/preferences.diff HTTP/1.0
David Pursehouse56bf1cb2015-01-06 15:44:00 +09001481 Content-Type: application/json; charset=UTF-8
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001482
1483 {
1484 "context": 10,
David Ostrovsky09caa542015-10-24 13:03:34 +02001485 "ignore_whitespace": "IGNORE_ALL",
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001486 "intraline_difference": true,
1487 "line_length": 100,
David Ostrovskyca09f472015-06-20 13:19:34 +02001488 "cursor_blink_rate": 500,
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001489 "show_line_endings": true,
1490 "show_tabs": true,
1491 "show_whitespace_errors": true,
1492 "syntax_highlighting": true,
Becky Siegeld7dbed62016-10-12 10:55:26 -07001493 "tab_size": 8,
1494 "font_size": 12
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001495 }
1496----
1497
1498As result the new diff preferences of the user are returned as a
1499link:#diff-preferences-info[DiffPreferencesInfo] entity.
1500
1501.Response
1502----
1503 HTTP/1.1 200 OK
1504 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +09001505 Content-Type: application/json; charset=UTF-8
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001506
1507 )]}'
1508 {
1509 "context": 10,
David Ostrovsky09caa542015-10-24 13:03:34 +02001510 "ignore_whitespace": "IGNORE_ALL",
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001511 "intraline_difference": true,
1512 "line_length": 100,
1513 "show_line_endings": true,
1514 "show_tabs": true,
1515 "show_whitespace_errors": true,
1516 "syntax_highlighting": true,
Becky Siegeld7dbed62016-10-12 10:55:26 -07001517 "tab_size": 8,
1518 "font_size": 12
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001519 }
1520----
1521
David Ostrovsky0ca01822014-11-14 20:16:57 +01001522[[get-edit-preferences]]
1523=== Get Edit Preferences
1524--
1525'GET /accounts/link:#account-id[\{account-id\}]/preferences.edit'
1526--
1527
1528Retrieves the edit preferences of a user.
1529
1530.Request
1531----
1532 GET /a/accounts/self/preferences.edit HTTP/1.0
1533----
1534
1535As result the edit preferences of the user are returned as a
1536link:#edit-preferences-info[EditPreferencesInfo] entity.
1537
1538.Response
1539----
1540 HTTP/1.1 200 OK
1541 Content-Disposition: attachment
1542 Content-Type: application/json;charset=UTF-8
1543
1544 )]}'
1545 {
David Ostrovsky0ca01822014-11-14 20:16:57 +01001546 "tab_size": 4,
1547 "line_length": 80,
Björn Pedersendc050382016-04-13 11:04:24 +02001548 "indent_unit": 2,
David Ostrovsky85f843a2015-05-14 23:25:06 +02001549 "cursor_blink_rate": 530,
David Ostrovsky0ca01822014-11-14 20:16:57 +01001550 "hide_top_menu": true,
1551 "show_whitespace_errors": true,
David Ostrovskyc2328402015-05-15 00:00:48 +02001552 "hide_line_numbers": true,
David Ostrovsky3cd7a192015-05-15 00:28:40 +02001553 "match_brackets": true,
Paladoxee24b3c2016-09-05 23:51:02 +01001554 "line_wrapping": false,
Paladox none6406b2c2017-06-28 17:03:33 +00001555 "indent_with_tabs": false,
David Ostrovsky3cd7a192015-05-15 00:28:40 +02001556 "auto_close_brackets": true
David Ostrovsky0ca01822014-11-14 20:16:57 +01001557 }
1558----
1559
1560[[set-edit-preferences]]
1561=== Set Edit Preferences
1562--
1563'PUT /accounts/link:#account-id[\{account-id\}]/preferences.edit'
1564--
1565
1566Sets the edit preferences of a user.
1567
1568The new edit preferences must be provided in the request body as a
1569link:#edit-preferences-info[EditPreferencesInfo] entity.
1570
1571.Request
1572----
1573 PUT /a/accounts/self/preferences.edit HTTP/1.0
1574 Content-Type: application/json;charset=UTF-8
1575
1576 {
David Ostrovsky0ca01822014-11-14 20:16:57 +01001577 "tab_size": 4,
1578 "line_length": 80,
Björn Pedersendc050382016-04-13 11:04:24 +02001579 "indent_unit": 2,
David Ostrovsky85f843a2015-05-14 23:25:06 +02001580 "cursor_blink_rate": 530,
David Ostrovsky0ca01822014-11-14 20:16:57 +01001581 "hide_top_menu": true,
1582 "show_tabs": true,
1583 "show_whitespace_errors": true,
1584 "syntax_highlighting": true,
David Ostrovskyc2328402015-05-15 00:00:48 +02001585 "hide_line_numbers": true,
David Ostrovsky3cd7a192015-05-15 00:28:40 +02001586 "match_brackets": true,
Paladoxee24b3c2016-09-05 23:51:02 +01001587 "line_wrapping": false,
David Ostrovsky3cd7a192015-05-15 00:28:40 +02001588 "auto_close_brackets": true
David Ostrovsky0ca01822014-11-14 20:16:57 +01001589 }
1590----
1591
David Ostrovskyfc833982016-04-04 21:59:13 +02001592As result the new edit preferences of the user are returned as a
1593link:#edit-preferences-info[EditPreferencesInfo] entity.
David Ostrovsky0ca01822014-11-14 20:16:57 +01001594
1595.Response
1596----
David Ostrovskyfc833982016-04-04 21:59:13 +02001597 HTTP/1.1 200 OK
1598 Content-Disposition: attachment
1599 Content-Type: application/json;charset=UTF-8
1600
1601 )]}'
1602 {
David Ostrovskyfc833982016-04-04 21:59:13 +02001603 "tab_size": 4,
1604 "line_length": 80,
1605 "cursor_blink_rate": 530,
1606 "hide_top_menu": true,
1607 "show_whitespace_errors": true,
1608 "hide_line_numbers": true,
1609 "match_brackets": true,
1610 "auto_close_brackets": true
1611 }
David Ostrovsky0ca01822014-11-14 20:16:57 +01001612----
1613
Patrick Hiesel79230f72016-04-27 17:05:17 +02001614[[get-watched-projects]]
1615=== Get Watched Projects
1616--
1617'GET /accounts/link:#account-id[\{account-id\}]/watched.projects'
1618--
1619
1620Retrieves all projects a user is watching.
1621
1622.Request
1623----
1624 GET /a/accounts/self/watched.projects HTTP/1.0
1625----
1626
1627As result the watched projects of the user are returned as a list of
1628link:#project-watch-info[ProjectWatchInfo] entities.
1629The result is sorted by project name in ascending order.
1630
1631.Response
1632----
1633 HTTP/1.1 200 OK
1634 Content-Disposition: attachment
1635 Content-Type: application/json; charset=UTF-8
1636
1637 )]}'
1638 [
1639 {
1640 "project": "Test Project 1",
1641 "notify_new_changes": true,
1642 "notify_new_patch_sets": true,
1643 "notify_all_comments": true,
1644 },
1645 {
1646 "project": "Test Project 2",
1647 "filter": "branch:experimental",
1648 "notify_all_comments": true,
1649 "notify_submitted_changes": true,
1650 "notify_abandoned_changes": true
1651 }
1652 ]
1653----
1654
Patrick Hieselbed6d982016-04-28 10:51:47 +02001655[[set-watched-projects]]
1656=== Add/Update a List of Watched Project Entities
1657--
1658'POST /accounts/link:#account-id[\{account-id\}]/watched.projects'
1659--
1660
1661Add new projects to watch or update existing watched projects.
1662Projects that are already watched by a user will be updated with
1663the provided configuration. All other projects in the request
1664will be watched using the provided configuration. The posted body
1665can contain link:#project-watch-info[ProjectWatchInfo] entities.
1666Omitted boolean values will be set to false.
1667
1668.Request
1669----
1670 POST /a/accounts/self/watched.projects HTTP/1.0
1671 Content-Type: application/json;charset=UTF-8
1672
1673 [
1674 {
1675 "project": "Test Project 1",
1676 "notify_new_changes": true,
1677 "notify_new_patch_sets": true,
1678 "notify_all_comments": true,
1679 }
1680 ]
1681----
1682
1683As result the watched projects of the user are returned as a list of
1684link:#project-watch-info[ProjectWatchInfo] entities.
1685The result is sorted by project name in ascending order.
1686
1687.Response
1688----
1689 HTTP/1.1 200 OK
1690 Content-Disposition: attachment
1691 Content-Type: application/json; charset=UTF-8
1692
1693 )]}'
1694 [
1695 {
1696 "project": "Test Project 1",
1697 "notify_new_changes": true,
1698 "notify_new_patch_sets": true,
1699 "notify_all_comments": true,
1700 },
1701 {
1702 "project": "Test Project 2",
1703 "notify_new_changes": true,
1704 "notify_new_patch_sets": true,
1705 "notify_all_comments": true,
1706 }
1707 ]
1708----
1709
1710[[delete-watched-projects]]
1711=== Delete Watched Projects
1712--
1713'POST /accounts/link:#account-id[\{account-id\}]/watched.projects:delete'
1714--
1715
1716Projects posted to this endpoint will no longer be watched. The posted body
Patrick Hiesel57d50752016-05-17 17:32:42 -07001717can contain a list of link:#project-watch-info[ProjectWatchInfo] entities.
Patrick Hieselbed6d982016-04-28 10:51:47 +02001718
1719.Request
1720----
1721 POST /a/accounts/self/watched.projects:delete HTTP/1.0
1722 Content-Type: application/json;charset=UTF-8
1723
1724 [
Patrick Hiesel57d50752016-05-17 17:32:42 -07001725 {
1726 "project": "Test Project 1",
1727 "filter": "branch:master"
1728 }
Patrick Hieselbed6d982016-04-28 10:51:47 +02001729 ]
1730----
1731
Patrick Hieselbed6d982016-04-28 10:51:47 +02001732.Response
1733----
Edwin Kempin40206642016-07-07 11:03:36 +02001734 HTTP/1.1 204 No Content
Patrick Hieselbed6d982016-04-28 10:51:47 +02001735----
1736
Changcheng Xiao0748e742017-01-10 13:03:53 +01001737[[get-account-external-ids]]
1738=== Get Account External IDs
1739--
1740'GET /accounts/link:#account-id[\{account-id\}]/external.ids'
1741--
1742
1743Retrieves the external ids of a user account.
1744
Patrick Hieseldb627ec2020-02-26 13:02:19 +01001745Only external ids belonging to the caller may be requested. Users that have
1746link:access-control.html#capability_modifyAccount[Modify Account] can request
1747external ids that belong to other accounts.
1748
Changcheng Xiao0748e742017-01-10 13:03:53 +01001749.Request
1750----
1751 GET /a/accounts/self/external.ids HTTP/1.0
1752----
1753
1754As result the external ids of the user are returned as a list of
1755link:#account-external-id-info[AccountExternalIdInfo] entities.
1756
1757.Response
1758----
1759 HTTP/1.1 200 OK
1760 Content-Disposition: attachment
1761 Content-Type: application/json; charset=UTF-8
1762
1763 )]}'
1764 [
1765 {
1766 "identity": "username:john",
Paladox nonec691a0672021-07-10 01:00:10 +00001767 "email_address": "john.doe@example.com",
Edwin Kempinc044e742017-01-13 08:23:16 +01001768 "trusted": true
Changcheng Xiao0748e742017-01-10 13:03:53 +01001769 }
1770 ]
1771----
1772
Changcheng Xiao402c2492017-01-16 11:38:03 +01001773[[delete-account-external-ids]]
1774=== Delete Account External IDs
1775--
1776'POST /accounts/link:#account-id[\{account-id\}]/external.ids:delete'
1777--
1778
1779Delete a list of external ids for a user account. The target external ids must
1780be provided as a list in the request body.
1781
Patrick Hieseldb627ec2020-02-26 13:02:19 +01001782Only external ids belonging to the caller may be deleted. Users that have
1783link:access-control.html#capability_modifyAccount[Modify Account] can delete
Matthias Sohn5bf213c2021-04-08 14:58:50 +02001784external ids that belong to other accounts. External ids in the 'username:'
1785scheme can only be deleted by users that have
1786link:access-control.html#capability_administrateServer[Administrate Server]
1787or both
1788link:access-control.html#capability_maintainServer[Maintain Server] and
1789link:access-control.html#capability__modifyAccount[Modify Account]
1790since the user may not be able to login anymore, after the removal of the
1791external id with scheme 'username:'. Users cannot delete their own external id
1792with scheme 'username:' in order to prevent they can lock themselves out
1793since they may not be able to login anymore.
Changcheng Xiao402c2492017-01-16 11:38:03 +01001794
1795.Request
1796----
1797 POST /a/accounts/self/external.ids:delete HTTP/1.0
1798 Content-Type: application/json;charset=UTF-8
1799
Aaron Gable6a6285d2017-07-05 11:46:19 -07001800 [
Changcheng Xiao402c2492017-01-16 11:38:03 +01001801 "mailto:john.doe@example.com"
Aaron Gable6a6285d2017-07-05 11:46:19 -07001802 ]
Changcheng Xiao402c2492017-01-16 11:38:03 +01001803----
1804
1805.Response
1806----
1807 HTTP/1.1 204 No Content
1808----
1809
Edwin Kempin2e88bb822018-04-10 09:33:22 +02001810[[list-contributor-agreements]]
1811=== List Contributor Agreements
1812--
1813'GET /accounts/link:#account-id[\{account-id\}]/agreements'
1814--
1815
1816Gets a list of the user's signed contributor agreements.
1817
1818.Request
1819----
1820 GET /a/accounts/self/agreements HTTP/1.0
1821----
1822
1823As response the user's signed agreements are returned as a list
1824of link:#contributor-agreement-info[ContributorAgreementInfo] entities.
1825
1826.Response
1827----
1828 HTTP/1.1 200 OK
1829 Content-Disposition: attachment
1830 Content-Type: application/json; charset=UTF-8
1831
1832 )]}'
1833 [
1834 {
1835 "name": "Individual",
1836 "description": "If you are going to be contributing code on your own, this is the one you want. You can sign this one online.",
1837 "url": "static/cla_individual.html"
1838 }
1839 ]
1840----
1841
Dave Borowitz6f3ee4b2018-09-07 13:18:10 -07001842[delete-draft-comments]
1843=== Delete Draft Comments
1844--
1845'POST /accounts/link:#account-id[\{account-id\}]/drafts:delete'
1846--
1847
1848Deletes some or all of a user's draft comments. The set of comments to delete is
1849specified as a link:#delete-draft-comments-input[DeleteDraftCommentsInput]
1850entity. An empty input entity deletes all comments.
1851
1852Only drafts belonging to the caller may be deleted.
1853
1854.Request
1855----
1856 POST /accounts/self/drafts.delete HTTP/1.0
1857 Content-Type: application/json; charset=UTF-8
1858
1859 {
1860 "query": "is:abandoned"
1861 }
1862----
1863
1864As a response, a list of
1865link:#deleted-draft-comment-info[DeletedDraftCommentInfo] entities is returned.
1866
1867.Response
1868----
1869 HTTP/1.1 200 OK
1870 Content-Disposition: attachment
1871 Content-Type: application/json; charset=UTF-8
1872
1873 )]}'
1874 [
1875 {
1876 "change": {
1877 "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940",
1878 "project": "myProject",
1879 "branch": "master",
1880 "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940",
1881 "subject": "Implementing Feature X",
1882 "status": "ABANDONED",
1883 "created": "2013-02-01 09:59:32.126000000",
1884 "updated": "2013-02-21 11:16:36.775000000",
1885 "insertions": 34,
1886 "deletions": 101,
1887 "_number": 3965,
1888 "owner": {
1889 "name": "John Doe"
1890 }
1891 },
1892 "deleted": [
1893 {
1894 "id": "TvcXrmjM",
1895 "path": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java",
1896 "line": 23,
1897 "message": "[nit] trailing whitespace",
1898 "updated": "2013-02-26 15:40:43.986000000"
1899 }
1900 ]
1901 }
1902 ]
1903----
1904
Edwin Kempin2e88bb822018-04-10 09:33:22 +02001905[[sign-contributor-agreement]]
1906=== Sign Contributor Agreement
1907--
1908'PUT /accounts/link:#account-id[\{account-id\}]/agreements'
1909--
1910
1911Signs a contributor agreement.
1912
1913The contributor agreement must be provided in the request body as
1914a link:#contributor-agreement-input[ContributorAgreementInput].
1915
1916.Request
1917----
1918 PUT /accounts/self/agreements HTTP/1.0
1919 Content-Type: application/json; charset=UTF-8
1920
1921 {
1922 "name": "Individual"
1923 }
1924----
1925
1926As response the contributor agreement name is returned.
1927
1928.Response
1929----
1930 HTTP/1.1 200 OK
1931 Content-Disposition: attachment
1932 Content-Type: application/json; charset=UTF-8
1933
1934 )]}'
1935 "Individual"
1936----
1937
1938[[index-account]]
1939=== Index Account
1940--
1941'POST /accounts/link:#account-id[\{account-id\}]/index'
1942--
1943
1944Adds or updates the account in the secondary index.
1945
1946.Request
1947----
1948 POST /accounts/1000096/index HTTP/1.0
1949----
1950
1951.Response
1952----
1953 HTTP/1.1 204 No Content
1954----
1955
Edwin Kempin9e972cc2016-04-15 10:39:13 +02001956[[default-star-endpoints]]
1957== Default Star Endpoints
1958
1959[[get-changes-with-default-star]]
1960=== Get Changes With Default Star
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001961--
Shawn Pearced4765db2013-11-08 19:19:45 -08001962'GET /accounts/link:#account-id[\{account-id\}]/starred.changes'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001963--
Shawn Pearced4765db2013-11-08 19:19:45 -08001964
Edwin Kempin9e972cc2016-04-15 10:39:13 +02001965Gets the changes that were starred with the default star by the
1966identified user account. This URL endpoint is functionally identical
1967to the changes query `GET /changes/?q=is:starred`. The result is a list
1968of link:rest-api-changes.html#change-info[ChangeInfo] entities.
Shawn Pearced4765db2013-11-08 19:19:45 -08001969
1970.Request
1971----
1972 GET /a/accounts/self/starred.changes
1973----
1974
1975.Response
1976----
1977 HTTP/1.1 200 OK
1978 Content-Disposition: attachment
David Pursehouse56bf1cb2015-01-06 15:44:00 +09001979 Content-Type: application/json; charset=UTF-8
Shawn Pearced4765db2013-11-08 19:19:45 -08001980
1981 )]}'
1982 [
1983 {
Shawn Pearced4765db2013-11-08 19:19:45 -08001984 "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940",
1985 "project": "myProject",
1986 "branch": "master",
1987 "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940",
1988 "subject": "Implementing Feature X",
1989 "status": "NEW",
1990 "created": "2013-02-01 09:59:32.126000000",
1991 "updated": "2013-02-21 11:16:36.775000000",
Edwin Kempincb19d4e2015-11-19 18:02:18 -08001992 "starred": true,
Edwin Kempin9e972cc2016-04-15 10:39:13 +02001993 "stars": [
1994 "star"
1995 ],
Shawn Pearced4765db2013-11-08 19:19:45 -08001996 "mergeable": true,
Edwin Kempincb19d4e2015-11-19 18:02:18 -08001997 "submittable": false,
1998 "insertions": 145,
1999 "deletions": 12,
Shawn Pearced4765db2013-11-08 19:19:45 -08002000 "_number": 3965,
2001 "owner": {
2002 "name": "John Doe"
2003 }
2004 }
2005 ]
2006----
2007
David Ostrovsky210e4d42013-11-11 08:35:28 +01002008[[star-change]]
Edwin Kempin9e972cc2016-04-15 10:39:13 +02002009=== Put Default Star On Change
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08002010--
Shawn Pearced4765db2013-11-08 19:19:45 -08002011'PUT /accounts/link:#account-id[\{account-id\}]/starred.changes/link:rest-api-changes.html#change-id[\{change-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08002012--
Shawn Pearced4765db2013-11-08 19:19:45 -08002013
Edwin Kempin9e972cc2016-04-15 10:39:13 +02002014Star a change with the default label. Changes starred with the default
Gal Paikin1da4db82021-08-27 12:28:49 +02002015label are returned for the search query `is:starred` or `has:star`
Edwin Kempin9e972cc2016-04-15 10:39:13 +02002016and automatically notify the user whenever updates are made to the
2017change.
Shawn Pearced4765db2013-11-08 19:19:45 -08002018
2019.Request
2020----
2021 PUT /a/accounts/self/starred.changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940 HTTP/1.0
2022----
2023
2024.Response
2025----
2026 HTTP/1.1 204 No Content
2027----
2028
David Ostrovsky210e4d42013-11-11 08:35:28 +01002029[[unstar-change]]
Edwin Kempin9e972cc2016-04-15 10:39:13 +02002030=== Remove Default Star From Change
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08002031--
Christian Aistleitnerfbf5f2c2015-06-05 01:37:11 +02002032'DELETE /accounts/link:#account-id[\{account-id\}]/starred.changes/link:rest-api-changes.html#change-id[\{change-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08002033--
Shawn Pearced4765db2013-11-08 19:19:45 -08002034
Edwin Kempin9e972cc2016-04-15 10:39:13 +02002035Remove the default star label from a change. This stops notifications.
Shawn Pearced4765db2013-11-08 19:19:45 -08002036
2037.Request
2038----
2039 DELETE /a/accounts/self/starred.changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940 HTTP/1.0
2040----
2041
2042.Response
2043----
2044 HTTP/1.1 204 No Content
2045----
Edwin Kempind0a63922013-01-23 16:32:59 +01002046
Edwin Kempinf502dd02013-02-14 14:22:25 +01002047[[ids]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002048== IDs
Edwin Kempinf502dd02013-02-14 14:22:25 +01002049
2050[[account-id]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002051=== \{account-id\}
Edwin Kempinf502dd02013-02-14 14:22:25 +01002052Identifier that uniquely identifies one account.
2053
2054This can be:
2055
Dave Borowitz540f4b42019-01-29 12:07:00 -08002056* `self` or `me` for the calling user
2057* a bare account ID ("18419")
2058* an account ID following a name in parentheses ("Full Name (18419)")
Edwin Kempinf502dd02013-02-14 14:22:25 +01002059* a string of the format "Full Name <email@example.com>"
2060* just the email address ("email@example")
Dave Borowitz540f4b42019-01-29 12:07:00 -08002061* a full name ("Full Name")
Edwin Kempinf502dd02013-02-14 14:22:25 +01002062* a user name ("username")
Dave Borowitz540f4b42019-01-29 12:07:00 -08002063
2064In all cases, accounts that are not
Gal Paikin44fbfe62019-11-15 15:09:47 -08002065link:config-gerrit.html#accounts.visibility[visible] to the calling user are not
Dave Borowitz540f4b42019-01-29 12:07:00 -08002066considered.
2067
Dave Borowitz9f46d2e2019-02-08 15:01:44 -08002068In all cases _except_ a bare account ID and `self`/`me`, inactive accounts are
2069not considered. Inactive accounts should only be referenced by bare ID.
Dave Borowitz540f4b42019-01-29 12:07:00 -08002070
2071If the input is a bare account ID, this will always resolve to exactly
2072one account if there is a visible account with that ID, and zero accounts
2073otherwise. (This is true even in corner cases like a user having a full name
2074which is exactly a numeric account ID belonging to a different user; such a user
2075cannot be identified by this number.)
2076
2077If the identifier is ambiguous or only refers to inactive accounts, the error
2078message from the API should contain a human-readable description of how to
2079disambiguate the request.
2080
2081*Note*: Except as noted above, callers should not rely on the particular
2082priorities of any of the identifiers in the account resolution algorithm. Any
2083other formats may be subject to future deprecation. If callers require specific
2084searching semantics, they should use the link:#query-account[Query Account]
2085endpoint to resolve a string to one or more accounts, then access the API using
2086the account ID.
Edwin Kempinf502dd02013-02-14 14:22:25 +01002087
Edwin Kempin91444792013-02-15 10:09:49 +01002088[[capability-id]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002089=== \{capability-id\}
Edwin Kempin91444792013-02-15 10:09:49 +01002090Identifier of a global capability. Valid values are all field names of
2091the link:#capability-info[CapabilityInfo] entity.
2092
Edwin Kempin493efd52013-05-16 13:32:17 +02002093[[email-id]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002094=== \{email-id\}
Edwin Kempin0ae7af02013-05-16 13:52:53 +02002095An email address, or `preferred` for the preferred email address of the
2096user.
Edwin Kempin493efd52013-05-16 13:32:17 +02002097
Edwin Kempin1967a6d2013-05-02 09:24:34 +02002098[[username]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002099=== \{username\}
Edwin Kempin1967a6d2013-05-02 09:24:34 +02002100The user name.
2101
Edwin Kempinc6824ee2013-05-29 16:18:39 +02002102[[ssh-key-id]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002103=== \{ssh-key-id\}
Edwin Kempinc6824ee2013-05-29 16:18:39 +02002104The sequence number of the SSH key.
2105
Dave Borowitzed170f32015-07-27 17:31:49 -07002106[[gpg-key-id]]
2107=== \{gpg-key-id\}
2108A GPG key identifier, either the 8-character hex key reported by
2109`gpg --list-keys`, or the 40-character hex fingerprint (whitespace is
2110ignored) reported by `gpg --list-keys --with-fingerprint`.
2111
Edwin Kempinf502dd02013-02-14 14:22:25 +01002112
Edwin Kempin5944d642013-02-15 09:31:42 +01002113[[json-entities]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002114== JSON Entities
Edwin Kempin5944d642013-02-15 09:31:42 +01002115
Edwin Kempincf77a692015-07-28 11:02:40 +02002116[[account-detail-info]]
2117=== AccountDetailInfo
Edwin Kempin21b2a3f2016-07-01 11:26:35 +02002118The `AccountDetailInfo` entity contains detailed information about an
Edwin Kempincf77a692015-07-28 11:02:40 +02002119account.
2120
2121`AccountDetailInfo` has the same fields as link:#account-info[
Edwin Kempincec70ccd2019-09-13 11:21:18 +02002122AccountInfo]. In addition `AccountDetailInfo` has the following field:
Edwin Kempincf77a692015-07-28 11:02:40 +02002123
2124[options="header",cols="1,^1,5"]
2125|=================================
2126|Field Name ||Description
2127|`registered_on` ||
2128The link:rest-api.html#timestamp[timestamp] of when the account was
2129registered.
Edwin Kempincf77a692015-07-28 11:02:40 +02002130|=================================
2131
Edwin Kempine8b63f02017-01-13 07:58:10 +01002132[[account-external-id-info]]
2133=== AccountExternalIdInfo
2134The `AccountExternalIdInfo` entity contains information for an external id of
2135an account.
2136
2137[options="header",cols="1,^1,5"]
2138|============================
2139|Field Name ||Description
2140|`identity` ||The account external id.
Paladox nonec691a0672021-07-10 01:00:10 +00002141|`email_address` |optional|The email address for the external id.
Edwin Kempine8b63f02017-01-13 07:58:10 +01002142|`trusted` |not set if `false`|
2143Whether the external id is trusted.
2144|`can_delete` |not set if `false`|
2145Whether the external id can be deleted by the calling user.
2146|============================
2147
Edwin Kempin963dfd02013-02-27 12:39:32 +01002148[[account-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002149=== AccountInfo
Edwin Kempin963dfd02013-02-27 12:39:32 +01002150The `AccountInfo` entity contains information about an account.
2151
David Pursehouseae367192014-11-25 17:24:47 +09002152[options="header",cols="1,^1,5"]
Edwin Kempin2eadde42016-07-01 13:33:32 +02002153|===============================
2154|Field Name ||Description
2155|`_account_id` ||The numeric ID of the account.
2156|`name` |optional|The full name of the user. +
Edwin Kempin2e8e9dc2016-07-01 11:03:57 +02002157Only set if detailed account information is requested. +
2158See option link:rest-api-changes.html#detailed-accounts[
2159DETAILED_ACCOUNTS] for change queries +
Edwin Kempinb5a80722016-07-01 16:26:54 +02002160and option link:#details[DETAILS] for account queries.
Ben Rohlfs9c960cb2020-02-02 22:12:30 +01002161|`display_name` |optional|The display name of the user. +
2162Only set if detailed account information is requested. +
2163See option link:rest-api-changes.html#detailed-accounts[
2164DETAILED_ACCOUNTS] for change queries +
2165and option link:#details[DETAILS] for account queries.
Edwin Kempin2eadde42016-07-01 13:33:32 +02002166|`email` |optional|
Edwin Kempin963dfd02013-02-27 12:39:32 +01002167The email address the user prefers to be contacted through. +
Edwin Kempin2e8e9dc2016-07-01 11:03:57 +02002168Only set if detailed account information is requested. +
2169See option link:rest-api-changes.html#detailed-accounts[
2170DETAILED_ACCOUNTS] for change queries +
Edwin Kempin2eadde42016-07-01 13:33:32 +02002171and options link:#details[DETAILS] and link:#all-emails[
2172ALL_EMAILS] for account queries.
2173|`secondary_emails`|optional|
2174A list of the secondary email addresses of the user. +
2175Only set for account queries when the link:#all-emails[ALL_EMAILS]
Edwin Kempined777162017-11-15 08:23:40 -08002176option or the link:#suggest-account[suggest] parameter is set. +
2177Secondary emails are only included if the calling user has the
2178link:access-control.html#capability_modifyAccount[Modify Account], and
2179hence is allowed to see secondary emails of other users.
Edwin Kempin2eadde42016-07-01 13:33:32 +02002180|`username` |optional|The username of the user. +
Edwin Kempin2e8e9dc2016-07-01 11:03:57 +02002181Only set if detailed account information is requested. +
2182See option link:rest-api-changes.html#detailed-accounts[
2183DETAILED_ACCOUNTS] for change queries +
Edwin Kempinb5a80722016-07-01 16:26:54 +02002184and option link:#details[DETAILS] for account queries.
Edwin Kempinc9b4c6c2019-09-13 10:42:06 +02002185|`avatars` |optional|List of link:#avatar-info[AvatarInfo] +
2186entities that provide information about avatar images of the account.
Edwin Kempin2eadde42016-07-01 13:33:32 +02002187|`_more_accounts` |optional, not set if `false`|
Edwin Kempin7bb93e42016-06-30 15:29:05 +02002188Whether the query would deliver more results if not limited. +
2189Only set on the last account that is returned.
Edwin Kempinc9b4c6c2019-09-13 10:42:06 +02002190|`status` |optional|Status message of the account.
Edwin Kempincec70ccd2019-09-13 11:21:18 +02002191|`inactive` |not set if `false`|
2192Whether the account is inactive.
Patrick Hiesel90d26fd2020-08-07 16:15:54 +02002193|`tags` |optional, not set if empty|
2194List of additional tags that this account has. The only +
2195current tag an account can have is `SERVICE_USER`. +
2196Only set if detailed account information is requested. +
2197See option link:rest-api-changes.html#detailed-accounts[
2198DETAILED_ACCOUNTS]
Edwin Kempin2eadde42016-07-01 13:33:32 +02002199|===============================
Edwin Kempin963dfd02013-02-27 12:39:32 +01002200
Edwin Kempin1967a6d2013-05-02 09:24:34 +02002201[[account-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002202=== AccountInput
Edwin Kempin1967a6d2013-05-02 09:24:34 +02002203The `AccountInput` entity contains information for the creation of
2204a new account.
2205
David Pursehouseae367192014-11-25 17:24:47 +09002206[options="header",cols="1,^2,4"]
Edwin Kempin1967a6d2013-05-02 09:24:34 +02002207|============================
2208|Field Name ||Description
2209|`username` |optional|
2210The user name. If provided, must match the user name from the URL.
2211|`name` |optional|The full name of the user.
Ben Rohlfs9c960cb2020-02-02 22:12:30 +01002212|`display_name` |optional|The display name of the user.
Edwin Kempin1967a6d2013-05-02 09:24:34 +02002213|`email` |optional|The email address of the user.
2214|`ssh_key` |optional|The public SSH key of the user.
2215|`http_password`|optional|The HTTP password of the user.
2216|`groups` |optional|
2217A list of link:rest-api-groups.html#group-id[group IDs] that identify
2218the groups to which the user should be added.
2219|============================
2220
Edwin Kempinb6df0392013-05-16 10:36:44 +02002221[[account-name-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002222=== AccountNameInput
Edwin Kempinb6df0392013-05-16 10:36:44 +02002223The `AccountNameInput` entity contains information for setting a name
2224for an account.
2225
David Pursehouseae367192014-11-25 17:24:47 +09002226[options="header",cols="1,^2,4"]
Edwin Kempinb6df0392013-05-16 10:36:44 +02002227|=============================
2228|Field Name ||Description
2229|`name` |optional|The new full name of the account. +
2230If not set or if set to an empty string, the account name is deleted.
2231|=============================
2232
Kasper Nilssoneb64a0a2017-01-27 13:51:07 -08002233[[account-status-input]]
2234=== AccountStatusInput
2235The `AccountStatusInput` entity contains information for setting a status
2236for an account.
2237
2238[options="header",cols="1,^2,4"]
2239|=============================
2240|Field Name ||Description
2241|`status` |optional|The new status of the account. +
2242If not set or if set to an empty string, the account status is deleted.
2243|=============================
2244
Edwin Kempinc9b4c6c2019-09-13 10:42:06 +02002245[[avatar-info]]
2246=== AvatarInfo
2247The `AccountInfo` entity contains information about an avatar image of
2248an account.
2249
2250[options="header",cols="1,6"]
2251|======================
2252|Field Name|Description
2253|`url` |The URL to the avatar image.
2254|`height` |The height of the avatar image in pixels.
2255|`width` |The width of the avatar image in pixels.
2256|======================
2257
Edwin Kempin5944d642013-02-15 09:31:42 +01002258[[capability-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002259=== CapabilityInfo
Edwin Kempin5944d642013-02-15 09:31:42 +01002260The `CapabilityInfo` entity contains information about the global
2261capabilities of a user.
2262
David Pursehouseae367192014-11-25 17:24:47 +09002263[options="header",cols="1,^1,5"]
Edwin Kempin5944d642013-02-15 09:31:42 +01002264|=================================
2265|Field Name ||Description
Edwin Kempin8f489a42013-11-15 16:26:51 +01002266|`accessDatabase` |not set if `false`|Whether the user has the
2267link:access-control.html#capability_accessDatabase[Access Database]
2268capability.
Edwin Kempin5944d642013-02-15 09:31:42 +01002269|`administrateServer`|not set if `false`|Whether the user has the
2270link:access-control.html#capability_administrateServer[Administrate
2271Server] capability.
Edwin Kempin5944d642013-02-15 09:31:42 +01002272|`createAccount` |not set if `false`|Whether the user has the
2273link:access-control.html#capability_createAccount[Create Account]
2274capability.
2275|`createGroup` |not set if `false`|Whether the user has the
2276link:access-control.html#capability_createGroup[Create Group]
2277capability.
2278|`createProject` |not set if `false`|Whether the user has the
2279link:access-control.html#capability_createProject[Create Project]
2280capability.
2281|`emailReviewers` |not set if `false`|Whether the user has the
2282link:access-control.html#capability_emailReviewers[Email Reviewers]
2283capability.
Edwin Kempin5944d642013-02-15 09:31:42 +01002284|`flushCaches` |not set if `false`|Whether the user has the
2285link:access-control.html#capability_flushCaches[Flush Caches]
2286capability.
Edwin Kempin8f489a42013-11-15 16:26:51 +01002287|`killTask` |not set if `false`|Whether the user has the
2288link:access-control.html#capability_kill[Kill Task] capability.
Dave Borowitz664d0402015-06-11 15:35:48 -04002289|`maintainServer` |not set if `false`|Whether the user has the
2290link:access-control.html#capability_maintainServer[Maintain
2291Server] capability.
Edwin Kempin8f489a42013-11-15 16:26:51 +01002292|`priority` |not set if `INTERACTIVE`|The name of the thread
2293pool used by the user, see link:access-control.html#capability_priority[
2294Priority] capability.
2295|`queryLimit` ||The link:access-control.html#capability_queryLimit[
2296Query Limit] of the user as link:#query-limit-info[QueryLimitInfo].
2297|`runAs` |not set if `false`|Whether the user has the
2298link:access-control.html#capability_runAs[Run As] capability.
2299|`runGC` |not set if `false`|Whether the user has the
2300link:access-control.html#capability_runGC[Run Garbage Collection]
2301capability.
2302|`streamEvents` |not set if `false`|Whether the user has the
2303link:access-control.html#capability_streamEvents[Stream Events]
2304capability.
Dave Borowitzf3548a92014-02-20 11:02:19 -08002305|`viewAllAccounts` |not set if `false`|Whether the user has the
2306link:access-control.html#capability_viewAllAccounts[View All Accounts]
2307capability.
Edwin Kempin8f489a42013-11-15 16:26:51 +01002308|`viewCaches` |not set if `false`|Whether the user has the
2309link:access-control.html#capability_viewCaches[View Caches] capability.
Edwin Kempin5944d642013-02-15 09:31:42 +01002310|`viewConnections` |not set if `false`|Whether the user has the
2311link:access-control.html#capability_viewConnections[View Connections]
2312capability.
Edwin Kempin362b14d12014-05-09 14:18:12 +02002313|`viewPlugins` |not set if `false`|Whether the user has the
2314link:access-control.html#capability_viewPlugins[View Plugins] capability.
Edwin Kempin5944d642013-02-15 09:31:42 +01002315|`viewQueue` |not set if `false`|Whether the user has the
2316link:access-control.html#capability_viewQueue[View Queue] capability.
Edwin Kempin5944d642013-02-15 09:31:42 +01002317|=================================
2318
David Pursehouse45787632016-05-02 22:30:59 +09002319[[contributor-agreement-info]]
2320=== ContributorAgreementInfo
2321
2322The `ContributorAgreementInfo` entity contains information about a
2323contributor agreement.
2324
Edwin Kempin54a0fad2019-12-30 13:21:28 +01002325[options="header",cols="1,^1,5"]
2326|================================
2327|Field Name ||Description
2328|`name` ||The unique name of the contributor agreement.
2329|`description` ||The description of the contributor agreement.
2330|`url` ||The URL of the contributor agreement.
2331|`auto_verify_group`|optional|
2332The group to which a user that signs the contributor agreement online
2333is added automatically as a link:rest-api-groups.html#group-info[
2334GroupInfo] entity. If not set, users cannot sign the contributor
2335agreement online.
2336|================================
David Pursehouse45787632016-05-02 22:30:59 +09002337
2338[[contributor-agreement-input]]
2339=== ContributorAgreementInput
2340The `ContributorAgreementInput` entity contains information about a
2341new contributor agreement.
2342
2343[options="header",cols="1,6"]
2344|=================================
2345|Field Name |Description
2346|`name` |The name of the agreement.
2347|=================================
2348
Dave Borowitz6f3ee4b2018-09-07 13:18:10 -07002349[[delete-draft-comments-input]]
2350=== DeleteDraftCommentsInput
2351The `DeleteDraftCommentsInput` entity contains information specifying a set of
2352draft comments that should be deleted.
2353
2354[options="header",cols="1,^1,5"]
2355|=================================
2356|Field Name ||Description
2357|`query` |optional|
2358A link:user-search.html[change query] limiting results to changes matching this
2359query; `has:draft` is implied and not necessary to list explicitly. If not set,
2360matches all changes with drafts.
2361|=================================
2362
2363[[deleted-draft-comment-info]]
2364=== DeletedDraftCommentInfo
2365The `DeletedDraftCommentInfo` entity contains information about draft comments
2366that were deleted.
2367
2368[options="header",cols="1,6"]
2369|=================================
2370|Field Name |Description
2371|`change` |
2372link:rest-api-changes.html#change-info[ChangeInfo] entity describing the change
Patrick Hiesela4824db2019-12-20 10:55:26 +01002373on which one or more comments was deleted. Populated with no change list
2374options.
Dave Borowitz6f3ee4b2018-09-07 13:18:10 -07002375|`deleted` |
2376List of link:rest-api-changes.html#comment-info[CommentInfo] entities for each
2377comment that was deleted.
2378|=================================
2379
Edwin Kempine5d563f52013-03-21 09:35:38 +01002380[[diff-preferences-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002381=== DiffPreferencesInfo
Edwin Kempine5d563f52013-03-21 09:35:38 +01002382The `DiffPreferencesInfo` entity contains information about the diff
2383preferences of a user.
2384
David Pursehouseae367192014-11-25 17:24:47 +09002385[options="header",cols="1,^1,5"]
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002386|===========================================
2387|Field Name ||Description
2388|`context` ||
Edwin Kempine5d563f52013-03-21 09:35:38 +01002389The number of lines of context when viewing a patch.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002390|`expand_all_comments` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01002391Whether all inline comments should be automatically expanded.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002392|`ignore_whitespace` ||
Edwin Kempine5d563f52013-03-21 09:35:38 +01002393Whether whitespace changes should be ignored and if yes, which
2394whitespace changes should be ignored. +
David Ostrovsky09caa542015-10-24 13:03:34 +02002395Allowed values are `IGNORE_NONE`, `IGNORE_TRAILING`,
2396`IGNORE_LEADING_AND_TRAILING`, `IGNORE_ALL`.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002397|`intraline_difference` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01002398Whether intraline differences should be highlighted.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002399|`line_length` ||
Edwin Kempine5d563f52013-03-21 09:35:38 +01002400Number of characters that should be displayed in one line.
David Ostrovskyca09f472015-06-20 13:19:34 +02002401|`cursor_blink_rate` ||
2402Half-period in milliseconds used for cursor blinking.
2403Setting it to 0 disables cursor blinking.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002404|`manual_review` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01002405Whether the 'Reviewed' flag should not be set automatically on a patch
2406when it is viewed.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002407|`retain_header` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01002408Whether the header that is displayed above the patch (that either shows
2409the commit message, the diff preferences, the patch sets or the files)
2410should be retained on file switch.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002411|`show_line_endings` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01002412Whether Windows EOL/Cr-Lf should be displayed as '\r' in a dotted-line
2413box.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002414|`show_tabs` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01002415Whether tabs should be shown.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002416|`show_whitespace_errors` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01002417Whether whitespace errors should be shown.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002418|`skip_deleted` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01002419Whether deleted files should be skipped on file switch.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002420|`skip_uncommented` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01002421Whether uncommented files should be skipped on file switch.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002422|`syntax_highlighting` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01002423Whether syntax highlighting should be enabled.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002424|`hide_top_menu` |not set if `false`|
David Ostrovsky0ca01822014-11-14 20:16:57 +01002425If true the top menu header and site header are hidden.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002426|`auto_hide_diff_table_header` |not set if `false`|
2427If true the diff table header is automatically hidden when
2428scrolling down more than half of a page.
2429|`hide_line_numbers` |not set if `false`|
Shawn Pearceba312d2e2013-12-12 16:36:03 -08002430If true the line numbers are hidden.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002431|`tab_size` ||
Edwin Kempine5d563f52013-03-21 09:35:38 +01002432Number of spaces that should be used to display one tab.
Becky Siegeld7dbed62016-10-12 10:55:26 -07002433|`font_size` ||
2434Default font size in pixels for change to be displayed in the diff view.
David Ostrovsky02142442014-11-24 08:52:14 +01002435|'hide_empty_pane' |not set if `false`|
2436Whether empty panes should be hidden. The left pane is empty when a
2437file was added; the right pane is empty when a file was deleted.
David Ostrovsky188b8232015-06-20 13:57:35 +02002438|`match_brackets` |not set if `false`|
2439Whether matching brackets should be highlighted.
Paladoxee24b3c2016-09-05 23:51:02 +01002440|`line_wrapping` |not set if `false`|
2441Whether to enable line wrapping or not.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002442|===========================================
Edwin Kempine5d563f52013-03-21 09:35:38 +01002443
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002444[[diff-preferences-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002445=== DiffPreferencesInput
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002446The `DiffPreferencesInput` entity contains information for setting the
2447diff preferences of a user. Fields which are not set will not be
2448updated.
2449
David Pursehouseae367192014-11-25 17:24:47 +09002450[options="header",cols="1,^1,5"]
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002451|===========================================
2452|Field Name ||Description
2453|`context` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002454The number of lines of context when viewing a patch.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002455|`expand_all_comments` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002456Whether all inline comments should be automatically expanded.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002457|`ignore_whitespace` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002458Whether whitespace changes should be ignored and if yes, which
2459whitespace changes should be ignored. +
David Ostrovsky09caa542015-10-24 13:03:34 +02002460Allowed values are `IGNORE_NONE`, `IGNORE_TRAILING`,
2461`IGNORE_LEADING_AND_TRAILING`, `IGNORE_ALL`.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002462|`intraline_difference` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002463Whether intraline differences should be highlighted.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002464|`line_length` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002465Number of characters that should be displayed in one line.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002466|`manual_review` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002467Whether the 'Reviewed' flag should not be set automatically on a patch
2468when it is viewed.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002469|`retain_header` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002470Whether the header that is displayed above the patch (that either shows
2471the commit message, the diff preferences, the patch sets or the files)
2472should be retained on file switch.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002473|`show_line_endings` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002474Whether Windows EOL/Cr-Lf should be displayed as '\r' in a dotted-line
2475box.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002476|`show_tabs` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002477Whether tabs should be shown.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002478|`show_whitespace_errors` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002479Whether whitespace errors should be shown.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002480|`skip_deleted` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002481Whether deleted files should be skipped on file switch.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002482|`skip_uncommented` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002483Whether uncommented files should be skipped on file switch.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002484|`syntax_highlighting` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002485Whether syntax highlighting should be enabled.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002486|`hide_top_menu` |optional|
Shawn Pearceba312d2e2013-12-12 16:36:03 -08002487True if the top menu header and site header should be hidden.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002488|`auto_hide_diff_table_header` |optional|
2489True if the diff table header is automatically hidden when
2490scrolling down more than half of a page.
2491|`hide_line_numbers` |optional|
Shawn Pearceba312d2e2013-12-12 16:36:03 -08002492True if the line numbers should be hidden.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002493|`tab_size` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002494Number of spaces that should be used to display one tab.
Becky Siegeld7dbed62016-10-12 10:55:26 -07002495|`font_size` |optional|
2496Default font size in pixels for change to be displayed in the diff view.
Paladoxee24b3c2016-09-05 23:51:02 +01002497|`line_wrapping` |optional|
2498Whether to enable line wrapping or not.
Paladox none6406b2c2017-06-28 17:03:33 +00002499|`indent_with_tabs` |optional|
2500Whether to enable indent with tabs or not.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02002501|===========================================
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01002502
David Ostrovsky0ca01822014-11-14 20:16:57 +01002503[[edit-preferences-info]]
2504=== EditPreferencesInfo
2505The `EditPreferencesInfo` entity contains information about the edit
2506preferences of a user.
2507
2508[options="header",cols="1,^1,5"]
2509|===========================================
2510|Field Name ||Description
David Ostrovsky0ca01822014-11-14 20:16:57 +01002511|`tab_size` ||
2512Number of spaces that should be used to display one tab.
2513|`line_length` ||
2514Number of characters that should be displayed per line.
Björn Pedersendc050382016-04-13 11:04:24 +02002515|`indent_unit` ||
2516Number of spaces that should be used for auto-indent.
David Ostrovsky85f843a2015-05-14 23:25:06 +02002517|`cursor_blink_rate` ||
2518Half-period in milliseconds used for cursor blinking.
2519Setting it to 0 disables cursor blinking.
David Ostrovsky0ca01822014-11-14 20:16:57 +01002520|`hide_top_menu` |not set if `false`|
2521If true the top menu header and site header is hidden.
2522|`show_tabs` |not set if `false`|
2523Whether tabs should be shown.
2524|`show_whitespace_errors` |not set if `false`|
2525Whether whitespace errors should be shown.
2526|`syntax_highlighting` |not set if `false`|
2527Whether syntax highlighting should be enabled.
2528|`hide_line_numbers` |not set if `false`|
2529Whether line numbers should be hidden.
David Ostrovskyc2328402015-05-15 00:00:48 +02002530|`match_brackets` |not set if `false`|
2531Whether matching brackets should be highlighted.
Paladoxee24b3c2016-09-05 23:51:02 +01002532|`line_wrapping` |not set if `false`|
2533Whether to enable line wrapping or not.
Paladox nonea22c5082017-12-30 16:45:46 +00002534|`indent_with_tabs` |not set if `false`|
2535Whether to indent with tabs or not.
David Ostrovsky3cd7a192015-05-15 00:28:40 +02002536|`auto_close_brackets` |not set if `false`|
2537Whether brackets and quotes should be auto-closed during typing.
Paladox nonea22c5082017-12-30 16:45:46 +00002538|`show_base` |not set if `false`|
2539Whether to show the inline edit base version or not.
David Ostrovsky0ca01822014-11-14 20:16:57 +01002540|===========================================
2541
Edwin Kempina1be4c22013-05-16 13:00:11 +02002542[[email-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002543=== EmailInfo
Edwin Kempina1be4c22013-05-16 13:00:11 +02002544The `EmailInfo` entity contains information about an email address of a
2545user.
2546
David Pursehouseae367192014-11-25 17:24:47 +09002547[options="header",cols="1,^1,5"]
Edwin Kempina1be4c22013-05-16 13:00:11 +02002548|========================
2549|Field Name ||Description
2550|`email` ||The email address.
2551|`preferred`|not set if `false`|
2552Whether this is the preferred email address of the user.
Shawn Pearce39820882013-05-23 08:00:58 -07002553|`pending_confirmation`|not set if `false`|
2554Set true if the user must confirm control of the email address
2555by following a verification link before Gerrit will permit use of
2556this address.
Edwin Kempina1be4c22013-05-16 13:00:11 +02002557|========================
2558
Edwin Kempin3f48c242013-05-17 10:55:07 +02002559[[email-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002560=== EmailInput
Edwin Kempin3f48c242013-05-17 10:55:07 +02002561The `EmailInput` entity contains information for registering a new
2562email address.
2563
David Pursehouseae367192014-11-25 17:24:47 +09002564[options="header",cols="1,^1,5"]
Edwin Kempinc99e5a62013-05-17 11:21:27 +02002565|==============================
2566|Field Name ||Description
2567|`email` ||
Edwin Kempin3f48c242013-05-17 10:55:07 +02002568The email address. If provided, must match the email address from the
2569URL.
Edwin Kempinc99e5a62013-05-17 11:21:27 +02002570|`preferred` |`false` if not set|
Edwin Kempin3f48c242013-05-17 10:55:07 +02002571Whether the new email address should become the preferred email address
Edwin Kempin4c454e62013-05-27 11:21:55 +02002572of the user (only supported if `no_confirmation` is set or if the
2573authentication type is `DEVELOPMENT_BECOME_ANY_ACCOUNT`).
Edwin Kempinc99e5a62013-05-17 11:21:27 +02002574|`no_confirmation`|`false` if not set|
2575Whether the email address should be added without confirmation. In this
2576case no verification email is sent to the user. +
2577Only Gerrit administrators are allowed to add email addresses without
2578confirmation.
2579|==============================
Edwin Kempin3f48c242013-05-17 10:55:07 +02002580
Dave Borowitzed170f32015-07-27 17:31:49 -07002581[[gpg-key-info]]
2582=== GpgKeyInfo
2583The `GpgKeyInfo` entity contains information about a GPG public key.
2584
2585[options="header",cols="1,^1,5"]
2586|========================
2587|Field Name ||Description
2588|`id` |Not set in map context|The 8-char hex GPG key ID.
Dave Borowitzeab3aff2015-08-04 14:15:50 -07002589|`fingerprint`|Not set for deleted keys|The 40-char (plus spaces) hex GPG key fingerprint.
2590|`user_ids` |Not set for deleted keys|
Marian Harbach34253372019-12-10 18:01:31 +01002591link:https://tools.ietf.org/html/rfc4880#section-5.11[OpenPGP User IDs,role=external,window=_blank]
Dave Borowitzed170f32015-07-27 17:31:49 -07002592associated with the public key.
Dave Borowitzeab3aff2015-08-04 14:15:50 -07002593|`key` |Not set for deleted keys|ASCII armored public key material.
Dave Borowitz36b35b92015-09-14 12:34:13 -04002594|`status` |Not set for deleted keys|
2595The result of server-side checks on the key; one of `BAD`, `OK`, or `TRUSTED`.
2596`BAD` keys have serious problems and should not be used. If a key is `OK,
2597inspecting only that key found no problems, but the system does not fully trust
2598the key's origin. A `TRUSTED` key is valid, and the system knows enough about
2599the key and its origin to trust it.
2600|`problems` |Not set for deleted keys|
2601A list of human-readable problem strings found in the course of checking whether
2602the key is valid and trusted.
Dave Borowitzed170f32015-07-27 17:31:49 -07002603|========================
2604
Dave Borowitz73cfbe62015-08-27 16:36:41 -04002605[[gpg-keys-input]]
2606=== GpgKeysInput
2607The `GpgKeysInput` entity contains information for adding/deleting GPG keys.
Dave Borowitzed170f32015-07-27 17:31:49 -07002608
2609[options="header",cols="1,6"]
2610|========================
2611|Field Name|Description
2612|`add` |List of ASCII armored public key strings to add.
Dave Borowitzeab3aff2015-08-04 14:15:50 -07002613|`delete` |List of link:#gpg-key-id[`\{gpg-key-id\}`]s to delete.
Dave Borowitzed170f32015-07-27 17:31:49 -07002614|========================
2615
Edwin Kempind9cdf5e2013-05-28 11:23:10 +02002616[[http-password-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002617=== HttpPasswordInput
Edwin Kempind9cdf5e2013-05-28 11:23:10 +02002618The `HttpPasswordInput` entity contains information for setting/generating
2619an HTTP password.
2620
David Pursehouseae367192014-11-25 17:24:47 +09002621[options="header",cols="1,^1,5"]
Edwin Kempind9cdf5e2013-05-28 11:23:10 +02002622|============================
2623|Field Name ||Description
2624|`generate` |`false` if not set|
2625Whether a new HTTP password should be generated
2626|`http_password`|optional|
2627The new HTTP password. Only Gerrit administrators may set the HTTP
2628password directly. +
2629If empty or not set and `generate` is false or not set, the HTTP
2630password is deleted.
2631|============================
2632
Michael Ochmanne56acd62015-12-15 15:59:42 +01002633[[oauth-token-info]]
2634=== OAuthTokenInfo
2635The `OAuthTokenInfo` entity contains information about an OAuth access token.
2636
2637[options="header",cols="1,^1,5"]
2638|========================
2639|Field Name ||Description
2640|`username` ||The owner of the OAuth access token.
2641|`resource_host` ||The host of the Gerrit instance.
2642|`access_token` ||The actual token value.
2643|`provider_id` |optional|
2644The identifier of the OAuth provider in the form `plugin-name:provider-name`.
2645|`expires_at` |optional|Time of expiration of this token in milliseconds.
2646|`type` ||The type of the OAuth access token, always `bearer`.
2647|========================
2648
Edwin Kempin521c1242015-01-23 12:44:44 +01002649[[preferences-info]]
2650=== PreferencesInfo
2651The `PreferencesInfo` entity contains information about a user's preferences.
2652
2653[options="header",cols="1,^1,5"]
Edwin Kempin66705cc2015-07-16 13:28:15 +02002654|============================================
2655|Field Name ||Description
2656|`changes_per_page` ||
Edwin Kempin521c1242015-01-23 12:44:44 +01002657The number of changes to show on each page.
2658Allowed values are `10`, `25`, `50`, `100`.
Paladox none4a597702020-07-03 13:55:59 +00002659|`theme` ||
2660Which theme to use.
Milutin Kristofic03527b22022-05-20 10:07:30 +02002661Allowed values are `AUTO` or `DARK` or `LIGHT`.
Becky Siegele450a312016-12-16 10:30:50 -08002662|`expand_inline_diffs` |not set if `false`|
2663Whether to expand diffs inline instead of opening as separate page
Ben Rohlfsda0a62b2021-04-26 17:02:19 +02002664(Gerrit web app UI only).
Marco Millera8614b72016-04-28 10:51:24 -04002665|`download_scheme` |optional|
Dave Borowitzb06b93f2015-09-03 16:38:54 -04002666The type of download URL the user prefers to use. May be any key from
2667the `schemes` map in
2668link:rest-api-config.html#download-info[DownloadInfo].
Edwin Kempin66705cc2015-07-16 13:28:15 +02002669|`date_format` ||
Edwin Kempin521c1242015-01-23 12:44:44 +01002670The format to display the date in.
2671Allowed values are `STD`, `US`, `ISO`, `EURO`, `UK`.
Edwin Kempin66705cc2015-07-16 13:28:15 +02002672|`time_format` ||
Edwin Kempin521c1242015-01-23 12:44:44 +01002673The format to display the time in.
2674Allowed values are `HHMM_12`, `HHMM_24`.
Edwin Kempin66705cc2015-07-16 13:28:15 +02002675|`relative_date_in_change_table`|not set if `false`|
Edwin Kempin521c1242015-01-23 12:44:44 +01002676Whether to show relative dates in the changes table.
Edwin Kempind0caa062016-09-16 14:04:12 +02002677|`diff_view` ||
2678The type of diff view to show.
2679Allowed values are `SIDE_BY_SIDE`, `UNIFIED_DIFF`.
Edwin Kempin66705cc2015-07-16 13:28:15 +02002680|`size_bar_in_change_table` |not set if `false`|
Edwin Kempin521c1242015-01-23 12:44:44 +01002681Whether to show the change sizes as colored bars in the change table.
Edwin Kempin66705cc2015-07-16 13:28:15 +02002682|`legacycid_in_change_table` |not set if `false`|
Edwin Kempin521c1242015-01-23 12:44:44 +01002683Whether to show change number in the change table.
Edwin Kempin66705cc2015-07-16 13:28:15 +02002684|`mute_common_path_prefixes` |not set if `false`|
David Pursehouse751441f2015-01-30 15:54:52 +09002685Whether to mute common path prefixes in file names in the file table.
David Ostrovsky5d8f62c2015-11-01 22:49:28 +01002686|`signed_off_by` |not set if `false`|
2687Whether to insert Signed-off-by footer in changes created with the
2688inline edit feature.
Edwin Kempin964ea932015-07-16 13:32:58 +02002689|`my` ||
2690The menu items of the `MY` top menu as a list of
2691link:rest-api-config.html#top-menu-item-info[TopMenuItemInfo] entities.
Becky Siegele450a312016-12-16 10:30:50 -08002692|`change_table` ||
Ben Rohlfsda0a62b2021-04-26 17:02:19 +02002693The columns to display in the change table (Gerrit web app UI only). The
2694default is empty, which will default columns as determined by the frontend.
Marco Millera8614b72016-04-28 10:51:24 -04002695|`email_strategy` ||
Mani Chandel207fa6e2014-07-08 17:13:12 +05302696The type of email strategy to use. On `ENABLED`, the user will receive emails
2697from Gerrit. On `CC_ON_OWN_COMMENTS` the user will also receive emails for
Gal Paikinfd238882020-10-09 18:40:52 +02002698their own comments. On `ATTENTION_SET_ONLY`, on emails about changes, the user
2699will receive emails only if they are in the attention set of that change.
2700On `DISABLED` the user will not receive any email notifications from Gerrit.
2701Allowed values are `ENABLED`, `CC_ON_OWN_COMMENTS`, `ATTENTION_SET_ONLY`,
2702`DISABLED`.
Edwin Kempind540a252016-09-08 13:29:03 +02002703|`default_base_for_merges` ||
2704The base which should be pre-selected in the 'Diff Against' drop-down
2705list when the change screen is opened for a merge commit.
2706Allowed values are `AUTO_MERGE` and `FIRST_PARENT`.
Dhruv Srivastavaa5867c02020-12-21 18:18:20 +01002707|`disable_keyboard_shortcuts` |not set if `false`|
2708Whether to disable all keyboard shortcuts.
Chris Poucet8c47d562021-09-17 22:47:32 +00002709|`disable_token_highlighting` [not set if `false`]
2710Whether to disable token highlighting on hover.
Dave Borowitzd6ee48e2017-04-27 10:32:42 -04002711|`publish_comments_on_push` |not set if `false`|
2712Whether to link:user-upload.html#publish-comments[publish draft comments] on
2713push by default.
David Ostrovsky821c5322018-06-10 16:36:42 +02002714|`work_in_progress_by_default` |not set if `false`|
2715Whether to link:user-upload.html#wip[set work-in-progress] on
2716push or on create changes online by default.
Edwin Kempin66705cc2015-07-16 13:28:15 +02002717|============================================
Edwin Kempin521c1242015-01-23 12:44:44 +01002718
2719[[preferences-input]]
2720=== PreferencesInput
2721The `PreferencesInput` entity contains information for setting the
2722user preferences. Fields which are not set will not be updated.
2723
2724[options="header",cols="1,^1,5"]
Edwin Kempin66705cc2015-07-16 13:28:15 +02002725|============================================
2726|Field Name ||Description
2727|`changes_per_page` |optional|
Edwin Kempin521c1242015-01-23 12:44:44 +01002728The number of changes to show on each page.
2729Allowed values are `10`, `25`, `50`, `100`.
Paladox none4a597702020-07-03 13:55:59 +00002730|`theme` |optional|
2731Which theme to use.
Milutin Kristofic03527b22022-05-20 10:07:30 +02002732Allowed values are `AUTO` or `DARK` or `LIGHT`.
Becky Siegele450a312016-12-16 10:30:50 -08002733|`expand_inline_diffs` |not set if `false`|
2734Whether to expand diffs inline instead of opening as separate page
Ben Rohlfsda0a62b2021-04-26 17:02:19 +02002735(Gerrit web app UI only).
Edwin Kempin66705cc2015-07-16 13:28:15 +02002736|`download_scheme` |optional|
Edwin Kempin521c1242015-01-23 12:44:44 +01002737The type of download URL the user prefers to use.
Edwin Kempin66705cc2015-07-16 13:28:15 +02002738|`date_format` |optional|
Edwin Kempin521c1242015-01-23 12:44:44 +01002739The format to display the date in.
2740Allowed values are `STD`, `US`, `ISO`, `EURO`, `UK`.
Edwin Kempin66705cc2015-07-16 13:28:15 +02002741|`time_format` |optional|
Edwin Kempin521c1242015-01-23 12:44:44 +01002742The format to display the time in.
2743Allowed values are `HHMM_12`, `HHMM_24`.
Edwin Kempin66705cc2015-07-16 13:28:15 +02002744|`relative_date_in_change_table`|optional|
Edwin Kempin521c1242015-01-23 12:44:44 +01002745Whether to show relative dates in the changes table.
Edwin Kempind0caa062016-09-16 14:04:12 +02002746|`diff_view` |optional|
2747The type of diff view to show.
2748Allowed values are `SIDE_BY_SIDE`, `UNIFIED_DIFF`.
Edwin Kempin66705cc2015-07-16 13:28:15 +02002749|`size_bar_in_change_table` |optional|
Edwin Kempin521c1242015-01-23 12:44:44 +01002750Whether to show the change sizes as colored bars in the change table.
Edwin Kempin66705cc2015-07-16 13:28:15 +02002751|`legacycid_in_change_table` |optional|
Edwin Kempin521c1242015-01-23 12:44:44 +01002752Whether to show change number in the change table.
Edwin Kempin66705cc2015-07-16 13:28:15 +02002753|`mute_common_path_prefixes` |optional|
David Pursehouse751441f2015-01-30 15:54:52 +09002754Whether to mute common path prefixes in file names in the file table.
David Ostrovsky5d8f62c2015-11-01 22:49:28 +01002755|`signed_off_by` |optional|
2756Whether to insert Signed-off-by footer in changes created with the
2757inline edit feature.
Edwin Kempin964ea932015-07-16 13:32:58 +02002758|`my` |optional|
2759The menu items of the `MY` top menu as a list of
2760link:rest-api-config.html#top-menu-item-info[TopMenuItemInfo] entities.
Becky Siegele450a312016-12-16 10:30:50 -08002761|`change_table` ||
Ben Rohlfsda0a62b2021-04-26 17:02:19 +02002762The columns to display in the change table (Gerrit web app UI only). The
2763default is empty, which will default columns as determined by the frontend.
Marco Millera8614b72016-04-28 10:51:24 -04002764|`email_strategy` |optional|
2765The type of email strategy to use. On `ENABLED`, the user will receive emails
2766from Gerrit. On `CC_ON_OWN_COMMENTS` the user will also receive emails for
Gal Paikinfd238882020-10-09 18:40:52 +02002767their own comments. On `ATTENTION_SET_ONLY`, on emails about changes, the user
2768will receive emails only if they are in the attention set of that change.
2769On `DISABLED` the user will not receive any email notifications from Gerrit.
2770Allowed values are `ENABLED`, `CC_ON_OWN_COMMENTS`, `ATTENTION_SET_ONLY`,
2771`DISABLED`.
Edwin Kempind540a252016-09-08 13:29:03 +02002772|`default_base_for_merges` |optional|
2773The base which should be pre-selected in the 'Diff Against' drop-down
2774list when the change screen is opened for a merge commit.
2775Allowed values are `AUTO_MERGE` and `FIRST_PARENT`.
paladoxa8dc6152021-04-11 16:07:53 +01002776|`disable_keyboard_shortcuts` |not set if `false`|
2777Whether to disable all keyboard shortcuts.
Edwin Kempin66705cc2015-07-16 13:28:15 +02002778|============================================
Edwin Kempin521c1242015-01-23 12:44:44 +01002779
Edwin Kempin5944d642013-02-15 09:31:42 +01002780[[query-limit-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002781=== QueryLimitInfo
Edwin Kempin5944d642013-02-15 09:31:42 +01002782The `QueryLimitInfo` entity contains information about the
2783link:access-control.html#capability_queryLimit[Query Limit] of a user.
2784
David Pursehouseae367192014-11-25 17:24:47 +09002785[options="header",cols="1,6"]
Edwin Kempin5944d642013-02-15 09:31:42 +01002786|================================
2787|Field Name |Description
2788|`min` |Lower limit.
2789|`max` |Upper limit.
2790|================================
2791
Edwin Kempinebccb842013-05-29 13:33:06 +02002792[[ssh-key-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002793=== SshKeyInfo
Edwin Kempinebccb842013-05-29 13:33:06 +02002794The `SshKeyInfo` entity contains information about an SSH key of a
2795user.
2796
David Pursehouseae367192014-11-25 17:24:47 +09002797[options="header",cols="1,^1,5"]
Edwin Kempinebccb842013-05-29 13:33:06 +02002798|=============================
2799|Field Name ||Description
2800|`seq` ||The sequence number of the SSH key.
2801|`ssh_public_key`||The complete public SSH key.
2802|`encoded_key` ||The encoded key.
2803|`algorithm` ||The algorithm of the SSH key.
2804|`comment` |optional|The comment of the SSH key.
2805|`valid` ||Whether the SSH key is valid.
2806|=============================
2807
Edwin Kempinf07e98b2015-07-24 11:47:57 +02002808[[username-input]]
2809=== UsernameInput
2810The `UsernameInput` entity contains information for setting the
2811username for an account.
2812
2813[options="header",cols="1,6"]
2814|=======================
2815|Field Name |Description
2816|`username` |The new username of the account.
2817|=======================
2818
Ben Rohlfs9c960cb2020-02-02 22:12:30 +01002819[[display-name-input]]
2820=== DisplayNameInput
2821The `DisplayNameInput` entity contains information for setting the
2822display name for an account.
2823
2824[options="header",cols="1,6"]
2825|=======================
2826|Field Name |Description
2827|`display_name` |The new display name of the account.
2828|=======================
2829
Patrick Hiesel79230f72016-04-27 17:05:17 +02002830[[project-watch-info]]
2831=== ProjectWatchInfo
2832The `WatchedProjectsInfo` entity contains information about a project watch
2833for a user.
2834
2835[options="header",cols="1,^1,5"]
2836|=======================
2837|Field Name | |Description
2838|`project` | |The name of the project.
2839|`filter` |optional|A filter string to be applied to the project.
2840|`notify_new_changes` |optional|Notify on new changes.
2841|`notify_new_patch_sets` |optional|Notify on new patch sets.
2842|`notify_all_comments` |optional|Notify on comments.
2843|`notify_submitted_changes` |optional|Notify on submitted changes.
2844|`notify_abandoned_changes` |optional|Notify on abandoned changes.
2845|=======================
Edwin Kempin5944d642013-02-15 09:31:42 +01002846
Edwin Kempind0a63922013-01-23 16:32:59 +01002847GERRIT
2848------
2849Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -07002850
2851SEARCHBOX
2852---------