blob: 24da5e410e8ebdc73a5802851579069cbbbe5fff [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= Gerrit Code Review - /accounts/ REST API
Edwin Kempind0a63922013-01-23 16:32:59 +01002
3This page describes the account related REST endpoints.
4Please also take note of the general information on the
5link:rest-api.html[REST API].
6
Edwin Kempin90af5482013-09-03 10:47:14 +02007[[account-endpoints]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08008== Account Endpoints
Edwin Kempind0a63922013-01-23 16:32:59 +01009
Edwin Kempin431873e2013-03-20 15:17:54 +010010[[get-account]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080011=== Get Account
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080012--
Edwin Kempin431873e2013-03-20 15:17:54 +010013'GET /accounts/link:#account-id[\{account-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080014--
Edwin Kempin431873e2013-03-20 15:17:54 +010015
16Returns an account as an link:#account-info[AccountInfo] entity.
17
18.Request
19----
20 GET /accounts/self HTTP/1.0
21----
22
23.Response
24----
25 HTTP/1.1 200 OK
26 Content-Disposition: attachment
27 Content-Type: application/json;charset=UTF-8
28
29 )]}'
30 {
31 "_account_id": 1000096,
32 "name": "John Doe",
James Ring8e342722013-05-01 01:40:53 -070033 "email": "john.doe@example.com",
34 "username": "john"
Edwin Kempin431873e2013-03-20 15:17:54 +010035 }
36----
37
Edwin Kempin1967a6d2013-05-02 09:24:34 +020038[[create-account]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080039=== Create Account
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080040--
Edwin Kempin1967a6d2013-05-02 09:24:34 +020041'PUT /accounts/link:#username[\{username\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080042--
Edwin Kempin1967a6d2013-05-02 09:24:34 +020043
44Creates a new account.
45
46In the request body additional data for the account can be provided as
47link:#account-input[AccountInput].
48
49.Request
50----
51 PUT /accounts/john HTTP/1.0
52 Content-Type: application/json;charset=UTF-8
53
54 {
55 "name": "John Doe",
56 "email": "john.doe@example.com",
57 "ssh_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw==",
58 "http_password": "19D9aIn7zePb",
59 "groups": [
60 "MyProject-Owners"
61 ]
62 }
63----
64
65As response a detailed link:#account-info[AccountInfo] entity is
66returned that describes the created account.
67
68.Response
69----
70 HTTP/1.1 201 Created
71 Content-Disposition: attachment
72 Content-Type: application/json;charset=UTF-8
73
74 )]}'
75 {
76 "_account_id": 1000195,
77 "name": "John Doe",
78 "email": "john.doe@example.com"
79 }
80----
81
Edwin Kempinb6df0392013-05-16 10:36:44 +020082[[get-account-name]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080083=== Get Account Name
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080084--
Edwin Kempinb6df0392013-05-16 10:36:44 +020085'GET /accounts/link:#account-id[\{account-id\}]/name'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080086--
Edwin Kempinb6df0392013-05-16 10:36:44 +020087
88Retrieves the full name of an account.
89
90.Request
91----
92 GET /accounts/self/name HTTP/1.0
93----
94
95.Response
96----
97 HTTP/1.1 200 OK
98 Content-Disposition: attachment
99 Content-Type: application/json;charset=UTF-8
100
101 )]}'
102 "John Doe"
103----
104
105If the account does not have a name an empty string is returned.
106
107[[set-account-name]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800108=== Set Account Name
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800109--
Edwin Kempinb6df0392013-05-16 10:36:44 +0200110'PUT /accounts/link:#account-id[\{account-id\}]/name'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800111--
Edwin Kempinb6df0392013-05-16 10:36:44 +0200112
113Sets the full name of an account.
114
115The new account name must be provided in the request body inside
David Pursehouse3af56992014-02-21 12:30:53 +0900116an link:#account-name-input[AccountNameInput] entity.
Edwin Kempinb6df0392013-05-16 10:36:44 +0200117
118.Request
119----
120 PUT /accounts/self/name HTTP/1.0
121 Content-Type: application/json;charset=UTF-8
122
123 {
124 "name": "John F. Doe"
125 }
126----
127
128As response the new account name is returned.
129
130.Response
131----
132 HTTP/1.1 200 OK
133 Content-Disposition: attachment
134 Content-Type: application/json;charset=UTF-8
135
136 )]}'
137 "John F. Doe"
138----
139
140If the name was deleted the response is "`204 No Content`".
141
142Some realms may not allow to modify the account name. In this case the
143request is rejected with "`405 Method Not Allowed`".
144
145[[delete-account-name]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800146=== Delete Account Name
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800147--
Edwin Kempinb6df0392013-05-16 10:36:44 +0200148'DELETE /accounts/link:#account-id[\{account-id\}]/name'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800149--
Edwin Kempinb6df0392013-05-16 10:36:44 +0200150
151Deletes the name of an account.
152
153.Request
154----
155 DELETE /accounts/self/name HTTP/1.0
156----
157
158.Response
159----
160 HTTP/1.1 204 No Content
161----
162
Edwin Kempin9f9ec652013-06-04 08:28:15 +0200163[[get-username]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800164=== Get Username
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800165--
Edwin Kempin9f9ec652013-06-04 08:28:15 +0200166'GET /accounts/link:#account-id[\{account-id\}]/username'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800167--
Edwin Kempin9f9ec652013-06-04 08:28:15 +0200168
169Retrieves the username of an account.
170
171.Request
172----
173 GET /accounts/self/username HTTP/1.0
174----
175
176.Response
177----
178 HTTP/1.1 200 OK
179 Content-Disposition: attachment
180 Content-Type: application/json;charset=UTF-8
181
182 )]}'
183 "john.doe"
184----
185
186If the account does not have a username the response is `404 Not Found`.
187
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200188[[get-active]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800189=== Get Active
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800190--
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200191'GET /accounts/link:#account-id[\{account-id\}]/active'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800192--
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200193
194Checks if an account is active.
195
196.Request
197----
198 GET /accounts/john.doe@example.com/active HTTP/1.0
199----
200
Colby Rangerb1253382013-11-06 09:24:47 -0800201If the account is active the string `ok` is returned.
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200202
203.Response
204----
205 HTTP/1.1 200 OK
Colby Rangerb1253382013-11-06 09:24:47 -0800206
207 ok
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200208----
209
Colby Rangerb1253382013-11-06 09:24:47 -0800210If the account is inactive the response is `204 No Content`.
211
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200212[[set-active]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800213=== Set Active
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800214--
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200215'PUT /accounts/link:#account-id[\{account-id\}]/active'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800216--
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200217
218Sets the account state to active.
219
220.Request
221----
222 PUT /accounts/john.doe@example.com/active HTTP/1.0
223----
224
225.Response
226----
227 HTTP/1.1 201 Created
228----
229
230If the account was already active the response is `200 OK`.
231
232[[delete-active]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800233=== Delete Active
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800234--
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200235'DELETE /accounts/link:#account-id[\{account-id\}]/active'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800236--
Edwin Kempinca3db6a2013-05-17 16:05:43 +0200237
238Sets the account state to inactive.
239
240.Request
241----
242 DELETE /accounts/john.doe@example.com/active HTTP/1.0
243----
244
245.Response
246----
247 HTTP/1.1 204 No Content
248----
249
250If the account was already inactive the response is `404 Not Found`.
251
Edwin Kempind9cdf5e2013-05-28 11:23:10 +0200252[[get-http-password]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800253=== Get HTTP Password
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800254--
Edwin Kempind9cdf5e2013-05-28 11:23:10 +0200255'GET /accounts/link:#account-id[\{account-id\}]/password.http'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800256--
Edwin Kempind9cdf5e2013-05-28 11:23:10 +0200257
258Retrieves the HTTP password of an account.
259
260.Request
261----
262 GET /accounts/john.doe@example.com/password.http HTTP/1.0
263----
264
265.Response
266----
267 HTTP/1.1 200 OK
268 Content-Disposition: attachment
269 Content-Type: application/json;charset=UTF-8
270
271 )]}'
272 "ETxgpih8xrNs"
273----
274
275If the account does not have an HTTP password the response is `404 Not Found`.
276
277[[set-http-password]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800278=== Set/Generate HTTP Password
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800279--
Edwin Kempind9cdf5e2013-05-28 11:23:10 +0200280'PUT /accounts/link:#account-id[\{account-id\}]/password.http'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800281--
Edwin Kempind9cdf5e2013-05-28 11:23:10 +0200282
283Sets/Generates the HTTP password of an account.
284
285The options for setting/generating the HTTP password must be provided
286in the request body inside a link:#http-password-input[
287HttpPasswordInput] entity.
288
289.Request
290----
291 PUT /accounts/self/password.http HTTP/1.0
292 Content-Type: application/json;charset=UTF-8
293
294 {
295 "generate": true
296 }
297----
298
299As response the new HTTP password is returned.
300
301.Response
302----
303 HTTP/1.1 200 OK
304 Content-Disposition: attachment
305 Content-Type: application/json;charset=UTF-8
306
307 )]}'
308 "ETxgpih8xrNs"
309----
310
311If the HTTP password was deleted the response is "`204 No Content`".
312
313[[delete-http-password]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800314=== Delete HTTP Password
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800315--
Edwin Kempind9cdf5e2013-05-28 11:23:10 +0200316'DELETE /accounts/link:#account-id[\{account-id\}]/password.http'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800317--
Edwin Kempind9cdf5e2013-05-28 11:23:10 +0200318
319Deletes the HTTP password of an account.
320
321.Request
322----
323 DELETE /accounts/self/password.http HTTP/1.0
324----
325
326.Response
327----
328 HTTP/1.1 204 No Content
329----
330
Edwin Kempina1be4c22013-05-16 13:00:11 +0200331[[list-account-emails]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800332=== List Account Emails
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800333--
Edwin Kempina1be4c22013-05-16 13:00:11 +0200334'GET /accounts/link:#account-id[\{account-id\}]/emails'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800335--
Edwin Kempina1be4c22013-05-16 13:00:11 +0200336
337Returns the email addresses that are configured for the specified user.
338
339.Request
340----
341 GET /accounts/self/emails HTTP/1.0
342----
343
344As response the email addresses of the user are returned as a list of
345link:#email-info[EmailInfo] entities.
346
347.Response
348----
349 HTTP/1.1 200 OK
350 Content-Disposition: attachment
351 Content-Type: application/json;charset=UTF-8
352
353 )]}'
354 [
355 {
356 "email": "john.doe@example.com",
357 "preferred": true
358 },
359 {
360 "email": "j.doe@example.com"
361 }
362 ]
363----
364
Edwin Kempin493efd52013-05-16 13:32:17 +0200365[[get-account-email]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800366=== Get Account Email
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800367--
Edwin Kempin493efd52013-05-16 13:32:17 +0200368'GET /accounts/link:#account-id[\{account-id\}]/emails/link:#email-id[\{email-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800369--
Edwin Kempin493efd52013-05-16 13:32:17 +0200370
371Retrieves an email address of a user.
372
373.Request
374----
375 GET /accounts/self/emails/john.doe@example.com HTTP/1.0
376----
377
378As response an link:#email-info[EmailInfo] entity is returned that
379describes the email address.
380
381.Response
382----
383 HTTP/1.1 200 OK
384 Content-Disposition: attachment
385 Content-Type: application/json;charset=UTF-8
386
387 )]}'
388 {
389 "email": "john.doe@example.com",
390 "preferred": true
391 }
392----
393
Edwin Kempin315066a2013-05-16 16:41:24 +0200394[[create-account-email]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800395=== Create Account Email
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800396--
Edwin Kempin315066a2013-05-16 16:41:24 +0200397'PUT /accounts/link:#account-id[\{account-id\}]/emails/link:#email-id[\{email-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800398--
Edwin Kempin315066a2013-05-16 16:41:24 +0200399
400Registers a new email address for the user. A verification email is
401sent with a link that needs to be visited to confirm the email address,
402unless `DEVELOPMENT_BECOME_ANY_ACCOUNT` is used as authentication type.
403For the development mode email addresses are directly added without
Edwin Kempinc99e5a62013-05-17 11:21:27 +0200404confirmation. A Gerrit administrator may add an email address without
405confirmation by setting `no_confirmation` in the
406link:#email-input[EmailInput].
Edwin Kempin315066a2013-05-16 16:41:24 +0200407
Edwin Kempin3f48c242013-05-17 10:55:07 +0200408In the request body additional data for the email address can be
409provided as link:#email-input[EmailInput].
410
Edwin Kempin315066a2013-05-16 16:41:24 +0200411.Request
412----
413 PUT /accounts/self/emails/john.doe@example.com HTTP/1.0
414----
415
416As response the new email address is returned as
417link:#email-info[EmailInfo] entity.
418
419.Response
420----
421 HTTP/1.1 201 Created
422 Content-Disposition: attachment
423 Content-Type: application/json;charset=UTF-8
424
425 )]}'
426 {
Edwin Kempin3f48c242013-05-17 10:55:07 +0200427 "email": "john.doe@example.com",
Edwin Kempin4c454e62013-05-27 11:21:55 +0200428 "pending_confirmation": true
Edwin Kempin315066a2013-05-16 16:41:24 +0200429 }
430----
431
Edwin Kempin4fbf70f2013-05-17 14:15:16 +0200432[[delete-account-email]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800433=== Delete Account Email
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800434--
Edwin Kempin4fbf70f2013-05-17 14:15:16 +0200435'DELETE /accounts/link:#account-id[\{account-id\}]/emails/link:#email-id[\{email-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800436--
Edwin Kempin4fbf70f2013-05-17 14:15:16 +0200437
438Deletes an email address of an account.
439
440.Request
441----
442 DELETE /accounts/self/emails/john.doe@example.com HTTP/1.0
443----
444
445.Response
446----
447 HTTP/1.1 204 No Content
448----
449
Edwin Kempine1f82882013-05-16 15:02:45 +0200450[[set-preferred-email]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800451=== Set Preferred Email
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800452--
Edwin Kempine1f82882013-05-16 15:02:45 +0200453'PUT /accounts/link:#account-id[\{account-id\}]/emails/link:#email-id[\{email-id\}]/preferred'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800454--
Edwin Kempine1f82882013-05-16 15:02:45 +0200455
456Sets an email address as preferred email address for an account.
457
458.Request
459----
460 PUT /accounts/self/emails/john.doe@example.com/preferred HTTP/1.0
461----
462
463.Response
464----
465 HTTP/1.1 201 Created
466----
467
468If the email address was already the preferred email address of the
469account the response is "`200 OK`".
470
Edwin Kempinebccb842013-05-29 13:33:06 +0200471[[list-ssh-keys]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800472=== List SSH Keys
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800473--
Edwin Kempinebccb842013-05-29 13:33:06 +0200474'GET /accounts/link:#account-id[\{account-id\}]/sshkeys'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800475--
Edwin Kempinebccb842013-05-29 13:33:06 +0200476
477Returns the SSH keys of an account.
478
479.Request
480----
481 GET /accounts/self/sshkeys HTTP/1.0
482----
483
484As response the SSH keys of the account are returned as a list of
485link:#ssh-key-info[SshKeyInfo] entities.
486
487.Response
488----
489 HTTP/1.1 200 OK
490 Content-Disposition: attachment
491 Content-Type: application/json;charset=UTF-8
492
493 )]}'
494 [
495 {
496 "seq": 1,
497 "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw\u003d\u003d john.doe@example.com",
498 "encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw\u003d\u003d",
499 "algorithm": "ssh-rsa",
500 "comment": "john.doe@example.com",
501 "valid": true
502 }
503 ]
504----
505
Edwin Kempinc6824ee2013-05-29 16:18:39 +0200506[[get-ssh-key]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800507=== Get SSH Key
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800508--
Edwin Kempinc6824ee2013-05-29 16:18:39 +0200509'GET /accounts/link:#account-id[\{account-id\}]/sshkeys/link:#ssh-key-id[\{ssh-key-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800510--
Edwin Kempinc6824ee2013-05-29 16:18:39 +0200511
512Retrieves an SSH key of a user.
513
514.Request
515----
516 GET /accounts/self/sshkeys/1 HTTP/1.0
517----
518
519As response an link:#ssh-key-info[SshKeyInfo] entity is returned that
520describes the SSH key.
521
522.Response
523----
524 HTTP/1.1 200 OK
525 Content-Disposition: attachment
526 Content-Type: application/json;charset=UTF-8
527
528 )]}'
529 {
530 "seq": 1,
531 "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw\u003d\u003d john.doe@example.com",
532 "encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw\u003d\u003d",
533 "algorithm": "ssh-rsa",
534 "comment": "john.doe@example.com",
535 "valid": true
536 }
537----
538
Edwin Kempin4e2e5212013-05-31 15:11:10 +0200539[[add-ssh-key]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800540=== Add SSH Key
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800541--
Edwin Kempin4e2e5212013-05-31 15:11:10 +0200542'POST /accounts/link:#account-id[\{account-id\}]/sshkeys'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800543--
Edwin Kempin4e2e5212013-05-31 15:11:10 +0200544
545Adds an SSH key for a user.
546
547The SSH public key must be provided as raw content in the request body.
548
549.Request
550----
551 POST /accounts/self/sshkeys HTTP/1.0
552 Content-Type: plain/text
553
554 AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw\u003d\u003d
555----
556
557As response an link:#ssh-key-info[SshKeyInfo] entity is returned that
558describes the new SSH key.
559
560.Response
561----
562 HTTP/1.1 200 OK
563 Content-Disposition: attachment
564 Content-Type: application/json;charset=UTF-8
565
566 )]}'
567 {
568 "seq": 2,
569 "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw\u003d\u003d john.doe@example.com",
570 "encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw\u003d\u003d",
571 "algorithm": "ssh-rsa",
572 "comment": "john.doe@example.com",
573 "valid": true
574 }
575----
576
Edwin Kempin5a02ffd2013-06-03 15:33:53 +0200577[[delete-ssh-key]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800578=== Delete SSH Key
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800579--
Edwin Kempin5a02ffd2013-06-03 15:33:53 +0200580'DELETE /accounts/link:#account-id[\{account-id\}]/sshkeys/link:#ssh-key-id[\{ssh-key-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800581--
Edwin Kempin5a02ffd2013-06-03 15:33:53 +0200582
583Deletes an SSH key of a user.
584
585.Request
586----
587 DELETE /accounts/self/sshkeys/2 HTTP/1.0
588----
589
590.Response
591----
592 HTTP/1.1 204 No Content
593----
594
Edwin Kempinf502dd02013-02-14 14:22:25 +0100595[[list-account-capabilities]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800596=== List Account Capabilities
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800597--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100598'GET /accounts/link:#account-id[\{account-id\}]/capabilities'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800599--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100600
Edwin Kempin5944d642013-02-15 09:31:42 +0100601Returns the global capabilities that are enabled for the specified
602user.
Edwin Kempinf502dd02013-02-14 14:22:25 +0100603
604If the global capabilities for the calling user should be listed,
605`self` can be used as account-id. This can be used by UI tools to
606discover if administrative features are available to the caller, so
607they can hide (or show) relevant UI actions.
Edwin Kempind0a63922013-01-23 16:32:59 +0100608
Edwin Kempin37440832013-02-06 11:36:00 +0100609.Request
Edwin Kempind0a63922013-01-23 16:32:59 +0100610----
611 GET /accounts/self/capabilities HTTP/1.0
Edwin Kempin37440832013-02-06 11:36:00 +0100612----
613
Edwin Kempin5944d642013-02-15 09:31:42 +0100614As response the global capabilities of the user are returned as a
615link:#capability-info[CapabilityInfo] entity.
616
Edwin Kempin37440832013-02-06 11:36:00 +0100617.Response
618----
619 HTTP/1.1 200 OK
620 Content-Disposition: attachment
621 Content-Type: application/json;charset=UTF-8
Edwin Kempind0a63922013-01-23 16:32:59 +0100622
623 )]}'
624 {
625 "queryLimit": {
626 "min": 0,
627 "max": 500
Edwin Kempin830d9b82013-02-14 15:03:26 +0100628 },
629 "emailReviewers": true
Edwin Kempind0a63922013-01-23 16:32:59 +0100630 }
631----
632
633Administrator that has authenticated with digest authentication:
Edwin Kempin37440832013-02-06 11:36:00 +0100634
635.Request
Edwin Kempind0a63922013-01-23 16:32:59 +0100636----
637 GET /a/accounts/self/capabilities HTTP/1.0
638 Authorization: Digest username="admin", realm="Gerrit Code Review", nonce="...
Edwin Kempin37440832013-02-06 11:36:00 +0100639----
640
641.Response
642----
643 HTTP/1.1 200 OK
644 Content-Disposition: attachment
645 Content-Type: application/json;charset=UTF-8
Edwin Kempind0a63922013-01-23 16:32:59 +0100646
647 )]}'
648 {
649 "administrateServer": true,
650 "queryLimit": {
651 "min": 0,
652 "max": 500
653 },
654 "createAccount": true,
655 "createGroup": true,
656 "createProject": true,
Edwin Kempin830d9b82013-02-14 15:03:26 +0100657 "emailReviewers": true,
Edwin Kempind0a63922013-01-23 16:32:59 +0100658 "killTask": true,
659 "viewCaches": true,
660 "flushCaches": true,
661 "viewConnections": true,
Edwin Kempin362b14d12014-05-09 14:18:12 +0200662 "viewPlugins": true,
Edwin Kempind0a63922013-01-23 16:32:59 +0100663 "viewQueue": true,
David Ostrovsky99fc2532013-06-16 17:50:35 +0200664 "runGC": true
Edwin Kempind0a63922013-01-23 16:32:59 +0100665 }
666----
667
Edwin Kempina64c4b92013-01-23 11:30:40 +0100668.Get your own capabilities
669****
670get::/accounts/self/capabilities
671****
672
Edwin Kempind0a63922013-01-23 16:32:59 +0100673To filter the set of global capabilities the `q` parameter can be used.
674Filtering may decrease the response time by avoiding looking at every
675possible alternative for the caller.
676
Edwin Kempin37440832013-02-06 11:36:00 +0100677.Request
Edwin Kempind0a63922013-01-23 16:32:59 +0100678----
679 GET /a/accounts/self/capabilities?q=createAccount&q=createGroup HTTP/1.0
680 Authorization: Digest username="admin", realm="Gerrit Code Review", nonce="...
Edwin Kempin37440832013-02-06 11:36:00 +0100681----
682
683.Response
684----
685 HTTP/1.1 200 OK
686 Content-Disposition: attachment
687 Content-Type: application/json;charset=UTF-8
Edwin Kempind0a63922013-01-23 16:32:59 +0100688
689 )]}'
690 {
691 "createAccount": true,
692 "createGroup": true
693 }
694----
695
Edwin Kempina64c4b92013-01-23 11:30:40 +0100696.Check if you can create groups
697****
698get::/accounts/self/capabilities?q=createGroup
699****
700
Edwin Kempin91444792013-02-15 10:09:49 +0100701[[check-account-capability]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800702=== Check Account Capability
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800703--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100704'GET /accounts/link:#account-id[\{account-id\}]/capabilities/link:#capability-id[\{capability-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800705--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100706
Edwin Kempin91444792013-02-15 10:09:49 +0100707Checks if a user has a certain global capability.
708
709.Request
710----
711 GET /a/accounts/self/capabilities/createGroup HTTP/1.0
712----
713
714If the user has the global capability the string `ok` is returned.
715
716.Response
717----
718 HTTP/1.1 200 OK
719
720 ok
721----
722
723If the user doesn't have the global capability the response is
724`404 Not Found`.
725
726.Check if you can create groups
727****
728get::/accounts/self/capabilities/createGroup
729****
730
Edwin Kempinb0a9b2b2013-02-15 13:25:54 +0100731[[list-groups]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800732=== List Groups
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800733--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100734'GET /accounts/link:#account-id[\{account-id\}]/groups/'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800735--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100736
Edwin Kempinb0a9b2b2013-02-15 13:25:54 +0100737Lists all groups that contain the specified user as a member.
738
739.Request
740----
741 GET /a/accounts/self/groups/ HTTP/1.0
742----
743
744As result a list of link:rest-api-groups.html#group-info[GroupInfo]
745entries is returned.
746
747.Response
748----
749 HTTP/1.1 200 OK
750 Content-Disposition: attachment
751 Content-Type: application/json;charset=UTF-8
752
753 )]}'
754 [
755 {
Edwin Kempinb0a9b2b2013-02-15 13:25:54 +0100756 "id": "global%3AAnonymous-Users",
757 "url": "#/admin/groups/uuid-global%3AAnonymous-Users",
758 "options": {
759 },
760 "description": "Any user, signed-in or not",
761 "group_id": 2,
762 "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
763 },
764 {
Edwin Kempinb0a9b2b2013-02-15 13:25:54 +0100765 "id": "834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7",
766 "url": "#/admin/groups/uuid-834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7",
767 "options": {
768 "visible_to_all": true,
769 },
770 "group_id": 6,
771 "owner_id": "834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7"
772 },
773 {
Edwin Kempinb0a9b2b2013-02-15 13:25:54 +0100774 "id": "global%3ARegistered-Users",
775 "url": "#/admin/groups/uuid-global%3ARegistered-Users",
776 "options": {
777 },
778 "description": "Any signed-in user",
779 "group_id": 3,
780 "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
781 }
782 ]
783----
784
785.List all groups that contain you as a member
786****
787get::/accounts/self/groups/
788****
789
Edwin Kempin76de2132013-02-15 12:53:41 +0100790[[get-avatar]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800791=== Get Avatar
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800792--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100793'GET /accounts/link:#account-id[\{account-id\}]/avatar'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800794--
Edwin Kempin50d3d9b2013-03-06 16:38:26 +0100795
Edwin Kempin76de2132013-02-15 12:53:41 +0100796Retrieves the avatar image of the user.
797
798With the `size` option (alias `s`) you can specify the preferred size
799in pixels (height and width).
800
801.Request
802----
803 GET /a/accounts/john.doe@example.com/avatar?s=20 HTTP/1.0
804----
805
806The response redirects to the URL of the avatar image.
807
808.Response
809----
810 HTTP/1.1 302 Found
811 Location: https://profiles/avatar/john_doe.jpeg?s=20x20
812----
813
Edwin Kempincc01b0b2013-04-25 14:37:17 +0200814[[get-avatar-change-url]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -0800815=== Get Avatar Change URL
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800816--
Edwin Kempincc01b0b2013-04-25 14:37:17 +0200817'GET /accounts/link:#account-id[\{account-id\}]/avatar.change.url'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -0800818--
Edwin Kempincc01b0b2013-04-25 14:37:17 +0200819
820Retrieves the URL where the user can change the avatar image.
821
822.Request
823----
824 GET /a/accounts/self/avatar.change.url HTTP/1.0
825----
826
827.Response
828----
829 HTTP/1.1 200 OK
830 Content-Disposition: attachment
831 Content-Type: text/plain;charset=UTF-8
832
833 https://profiles/pictures/john.doe
834----
835
Khai Do38ba5cc2014-07-10 20:23:20 -0700836[[get-user-preferences]]
837=== Get User Preferences
838--
839'GET /accounts/link:#account-id[\{account-id\}]/preferences'
840--
841
842Retrieves the user's preferences.
843
844.Request
845----
846 GET /a/accounts/self/preferences HTTP/1.0
847----
848
849As result the account preferences of the user are returned as a
850link:#preferences-info[PreferencesInfo] entity.
851
852.Response
853----
854 HTTP/1.1 200 OK
855 Content-Disposition: attachment
856 Content-Type: application/json;charset=UTF-8
857
858 )]}'
859 {
860 "changes_per_page": 25,
861 "show_site_header": true,
862 "use_flash_clipboard": true,
863 "date_format": "STD",
864 "time_format": "HHMM_12",
865 "size_bar_in_change_table": true,
866 "review_category_strategy": "ABBREV",
867 "comment_visibility_strategy": "EXPAND_RECENT",
868 "diff_view": "SIDE_BY_SIDE",
869 "my": [
870 {
871 "url": "#/dashboard/self",
872 "name": "Changes"
873 },
874 {
875 "url": "#/q/is:draft",
876 "name": "Drafts"
877 },
878 {
879 "url": "#/q/has:draft",
880 "name": "Draft Comments"
881 },
882 {
883 "url": "#/q/is:watched+is:open",
884 "name": "Watched Changes"
885 },
886 {
887 "url": "#/q/is:starred",
888 "name": "Starred Changes"
889 },
890 {
891 "url": "#/groups/self",
892 "name": "Groups"
893 }
894 ]
895 }
896----
897
898[[set-user-preferences]]
899=== Set User Preferences
900--
901'PUT /accounts/link:#account-id[\{account-id\}]/preferences'
902--
903
904Sets the user's preferences.
905
906The new preferences must be provided in the request body as a
907link:#preferences-input[PreferencesInput] entity.
908
909.Request
910----
David Pursehouse037d0622014-10-20 16:51:50 +0900911 PUT /a/accounts/self/preferences HTTP/1.0
Khai Do38ba5cc2014-07-10 20:23:20 -0700912 Content-Type: application/json;charset=UTF-8
913
914 {
915 "changes_per_page": 50,
916 "show_site_header": true,
917 "use_flash_clipboard": true,
918 "date_format": "STD",
919 "time_format": "HHMM_12",
920 "size_bar_in_change_table": true,
921 "review_category_strategy": "NAME",
922 "comment_visibility_strategy": "EXPAND_RECENT",
923 "diff_view": "SIDE_BY_SIDE",
924 "my": [
925 {
926 "url": "#/dashboard/self",
927 "name": "Changes"
928 },
929 {
930 "url": "#/q/is:draft",
931 "name": "Drafts"
932 },
933 {
934 "url": "#/q/has:draft",
935 "name": "Draft Comments"
936 },
937 {
938 "url": "#/q/is:watched+is:open",
939 "name": "Watched Changes"
940 },
941 {
942 "url": "#/q/is:starred",
943 "name": "Starred Changes"
944 },
945 {
946 "url": "#/groups/self",
947 "name": "Groups"
948 }
949 ]
950 }
951----
952
953As result the new preferences of the user are returned as a
954link:#preferences-info[PreferencesInfo] entity.
955
956.Response
957----
958 HTTP/1.1 200 OK
959 Content-Disposition: attachment
960 Content-Type: application/json;charset=UTF-8
961
962 )]}'
963 {
964 "changes_per_page": 50,
965 "show_site_header": true,
966 "use_flash_clipboard": true,
967 "date_format": "STD",
968 "time_format": "HHMM_12",
969 "size_bar_in_change_table": true,
970 "review_category_strategy": "NAME",
971 "comment_visibility_strategy": "EXPAND_RECENT",
972 "diff_view": "SIDE_BY_SIDE",
973 "my": [
974 {
975 "url": "#/dashboard/self",
976 "name": "Changes"
977 },
978 {
979 "url": "#/q/is:draft",
980 "name": "Drafts"
981 },
982 {
983 "url": "#/q/has:draft",
984 "name": "Draft Comments"
985 },
986 {
987 "url": "#/q/is:watched+is:open",
988 "name": "Watched Changes"
989 },
990 {
991 "url": "#/q/is:starred",
992 "name": "Starred Changes"
993 },
994 {
995 "url": "#/groups/self",
996 "name": "Groups"
997 }
998 ]
999 }
1000----
1001
Edwin Kempine5d563f52013-03-21 09:35:38 +01001002[[get-diff-preferences]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001003=== Get Diff Preferences
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001004--
Edwin Kempine5d563f52013-03-21 09:35:38 +01001005'GET /accounts/link:#account-id[\{account-id\}]/preferences.diff'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001006--
Edwin Kempine5d563f52013-03-21 09:35:38 +01001007
1008Retrieves the diff preferences of a user.
1009
1010.Request
1011----
1012 GET /a/accounts/self/preferences.diff HTTP/1.0
1013----
1014
1015As result the diff preferences of the user are returned as a
1016link:#diff-preferences-info[DiffPreferencesInfo] entity.
1017
1018.Response
1019----
1020 HTTP/1.1 200 OK
1021 Content-Disposition: attachment
1022 Content-Type: application/json;charset=UTF-8
1023
1024 )]}'
1025 {
1026 "context": 10,
1027 "ignore_whitespace": "IGNORE_ALL_SPACE",
1028 "intraline_difference": true,
1029 "line_length": 100,
1030 "show_tabs": true,
1031 "show_whitespace_errors": true,
1032 "syntax_highlighting": true,
1033 "tab_size": 8
1034 }
1035----
1036
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001037[[set-diff-preferences]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001038=== Set Diff Preferences
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001039--
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001040'PUT /accounts/link:#account-id[\{account-id\}]/preferences.diff'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001041--
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001042
1043Sets the diff preferences of a user.
1044
1045The new diff preferences must be provided in the request body as a
1046link:#diff-preferences-input[DiffPreferencesInput] entity.
1047
1048.Request
1049----
1050 GET /a/accounts/self/preferences.diff HTTP/1.0
1051 Content-Type: application/json;charset=UTF-8
1052
1053 {
1054 "context": 10,
1055 "ignore_whitespace": "IGNORE_ALL_SPACE",
1056 "intraline_difference": true,
1057 "line_length": 100,
1058 "show_line_endings": true,
1059 "show_tabs": true,
1060 "show_whitespace_errors": true,
1061 "syntax_highlighting": true,
1062 "tab_size": 8
1063 }
1064----
1065
1066As result the new diff preferences of the user are returned as a
1067link:#diff-preferences-info[DiffPreferencesInfo] entity.
1068
1069.Response
1070----
1071 HTTP/1.1 200 OK
1072 Content-Disposition: attachment
1073 Content-Type: application/json;charset=UTF-8
1074
1075 )]}'
1076 {
1077 "context": 10,
1078 "ignore_whitespace": "IGNORE_ALL_SPACE",
1079 "intraline_difference": true,
1080 "line_length": 100,
1081 "show_line_endings": true,
1082 "show_tabs": true,
1083 "show_whitespace_errors": true,
1084 "syntax_highlighting": true,
1085 "tab_size": 8
1086 }
1087----
1088
David Ostrovsky210e4d42013-11-11 08:35:28 +01001089[[get-starred-changes]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001090=== Get Starred Changes
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001091--
Shawn Pearced4765db2013-11-08 19:19:45 -08001092'GET /accounts/link:#account-id[\{account-id\}]/starred.changes'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001093--
Shawn Pearced4765db2013-11-08 19:19:45 -08001094
1095Gets the changes starred by the identified user account. This
1096URL endpoint is functionally identical to the changes query
1097`GET /changes/?q=is:starred`. The result is a list of
1098link:rest-api-changes.html#change-info[ChangeInfo] entities.
1099
1100.Request
1101----
1102 GET /a/accounts/self/starred.changes
1103----
1104
1105.Response
1106----
1107 HTTP/1.1 200 OK
1108 Content-Disposition: attachment
1109 Content-Type: application/json;charset=UTF-8
1110
1111 )]}'
1112 [
1113 {
Shawn Pearced4765db2013-11-08 19:19:45 -08001114 "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940",
1115 "project": "myProject",
1116 "branch": "master",
1117 "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940",
1118 "subject": "Implementing Feature X",
1119 "status": "NEW",
1120 "created": "2013-02-01 09:59:32.126000000",
1121 "updated": "2013-02-21 11:16:36.775000000",
1122 "mergeable": true,
1123 "_sortkey": "0023412400000f7d",
1124 "_number": 3965,
1125 "owner": {
1126 "name": "John Doe"
1127 }
1128 }
1129 ]
1130----
1131
David Ostrovsky210e4d42013-11-11 08:35:28 +01001132[[star-change]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001133=== Star Change
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001134--
Shawn Pearced4765db2013-11-08 19:19:45 -08001135'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 -08001136--
Shawn Pearced4765db2013-11-08 19:19:45 -08001137
1138Star a change. Starred changes are returned for the search query
1139`is:starred` or `starredby:USER` and automatically notify the user
1140whenever updates are made to the change.
1141
1142.Request
1143----
1144 PUT /a/accounts/self/starred.changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940 HTTP/1.0
1145----
1146
1147.Response
1148----
1149 HTTP/1.1 204 No Content
1150----
1151
David Ostrovsky210e4d42013-11-11 08:35:28 +01001152[[unstar-change]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001153=== Unstar Change
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001154--
Shawn Pearced4765db2013-11-08 19:19:45 -08001155'DELETE /accounts/link:#account-id[\{account-id\}]/starred.changes/link:rest-api-changes#change-id[\{change-id\}]'
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08001156--
Shawn Pearced4765db2013-11-08 19:19:45 -08001157
1158Unstar a change. Removes the starred flag, stopping notifications.
1159
1160.Request
1161----
1162 DELETE /a/accounts/self/starred.changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940 HTTP/1.0
1163----
1164
1165.Response
1166----
1167 HTTP/1.1 204 No Content
1168----
Edwin Kempind0a63922013-01-23 16:32:59 +01001169
Edwin Kempinf502dd02013-02-14 14:22:25 +01001170[[ids]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001171== IDs
Edwin Kempinf502dd02013-02-14 14:22:25 +01001172
1173[[account-id]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001174=== \{account-id\}
Edwin Kempinf502dd02013-02-14 14:22:25 +01001175Identifier that uniquely identifies one account.
1176
1177This can be:
1178
1179* a string of the format "Full Name <email@example.com>"
1180* just the email address ("email@example")
1181* a full name if it is unique ("Full Name")
1182* an account ID ("18419")
1183* a user name ("username")
1184* `self` for the calling user
1185
Edwin Kempin91444792013-02-15 10:09:49 +01001186[[capability-id]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001187=== \{capability-id\}
Edwin Kempin91444792013-02-15 10:09:49 +01001188Identifier of a global capability. Valid values are all field names of
1189the link:#capability-info[CapabilityInfo] entity.
1190
Edwin Kempin493efd52013-05-16 13:32:17 +02001191[[email-id]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001192=== \{email-id\}
Edwin Kempin0ae7af02013-05-16 13:52:53 +02001193An email address, or `preferred` for the preferred email address of the
1194user.
Edwin Kempin493efd52013-05-16 13:32:17 +02001195
Edwin Kempin1967a6d2013-05-02 09:24:34 +02001196[[username]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001197=== \{username\}
Edwin Kempin1967a6d2013-05-02 09:24:34 +02001198The user name.
1199
Edwin Kempinc6824ee2013-05-29 16:18:39 +02001200[[ssh-key-id]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001201=== \{ssh-key-id\}
Edwin Kempinc6824ee2013-05-29 16:18:39 +02001202The sequence number of the SSH key.
1203
Edwin Kempinf502dd02013-02-14 14:22:25 +01001204
Edwin Kempin5944d642013-02-15 09:31:42 +01001205[[json-entities]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001206== JSON Entities
Edwin Kempin5944d642013-02-15 09:31:42 +01001207
Edwin Kempin963dfd02013-02-27 12:39:32 +01001208[[account-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001209=== AccountInfo
Edwin Kempin963dfd02013-02-27 12:39:32 +01001210The `AccountInfo` entity contains information about an account.
1211
1212[options="header",width="50%",cols="1,^1,5"]
1213|===========================
1214|Field Name ||Description
1215|`_account_id` ||The numeric ID of the account.
1216|`name` |optional|The full name of the user. +
Edwin Kempina13c5b82013-10-16 14:14:54 +02001217Only set if link:rest-api-changes.html#detailed-accounts[detailed
1218account information] is requested.
Edwin Kempin963dfd02013-02-27 12:39:32 +01001219|`email` |optional|
1220The email address the user prefers to be contacted through. +
Edwin Kempina13c5b82013-10-16 14:14:54 +02001221Only set if link:rest-api-changes.html#detailed-accounts[detailed
1222account information] is requested.
James Ring8e342722013-05-01 01:40:53 -07001223|`username` |optional|The username of the user. +
Edwin Kempina13c5b82013-10-16 14:14:54 +02001224Only set if link:rest-api-changes.html#detailed-accounts[detailed
1225account information] is requested.
Edwin Kempin963dfd02013-02-27 12:39:32 +01001226|===========================
1227
Edwin Kempin1967a6d2013-05-02 09:24:34 +02001228[[account-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001229=== AccountInput
Edwin Kempin1967a6d2013-05-02 09:24:34 +02001230The `AccountInput` entity contains information for the creation of
1231a new account.
1232
1233[options="header",width="50%",cols="1,^2,4"]
1234|============================
1235|Field Name ||Description
1236|`username` |optional|
1237The user name. If provided, must match the user name from the URL.
1238|`name` |optional|The full name of the user.
1239|`email` |optional|The email address of the user.
1240|`ssh_key` |optional|The public SSH key of the user.
1241|`http_password`|optional|The HTTP password of the user.
1242|`groups` |optional|
1243A list of link:rest-api-groups.html#group-id[group IDs] that identify
1244the groups to which the user should be added.
1245|============================
1246
Edwin Kempinb6df0392013-05-16 10:36:44 +02001247[[account-name-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001248=== AccountNameInput
Edwin Kempinb6df0392013-05-16 10:36:44 +02001249The `AccountNameInput` entity contains information for setting a name
1250for an account.
1251
1252[options="header",width="50%",cols="1,^2,4"]
1253|=============================
1254|Field Name ||Description
1255|`name` |optional|The new full name of the account. +
1256If not set or if set to an empty string, the account name is deleted.
1257|=============================
1258
Edwin Kempin5944d642013-02-15 09:31:42 +01001259[[capability-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001260=== CapabilityInfo
Edwin Kempin5944d642013-02-15 09:31:42 +01001261The `CapabilityInfo` entity contains information about the global
1262capabilities of a user.
1263
1264[options="header",width="50%",cols="1,^1,5"]
1265|=================================
1266|Field Name ||Description
Edwin Kempin8f489a42013-11-15 16:26:51 +01001267|`accessDatabase` |not set if `false`|Whether the user has the
1268link:access-control.html#capability_accessDatabase[Access Database]
1269capability.
Edwin Kempin5944d642013-02-15 09:31:42 +01001270|`administrateServer`|not set if `false`|Whether the user has the
1271link:access-control.html#capability_administrateServer[Administrate
1272Server] capability.
Edwin Kempin5944d642013-02-15 09:31:42 +01001273|`createAccount` |not set if `false`|Whether the user has the
1274link:access-control.html#capability_createAccount[Create Account]
1275capability.
1276|`createGroup` |not set if `false`|Whether the user has the
1277link:access-control.html#capability_createGroup[Create Group]
1278capability.
1279|`createProject` |not set if `false`|Whether the user has the
1280link:access-control.html#capability_createProject[Create Project]
1281capability.
1282|`emailReviewers` |not set if `false`|Whether the user has the
1283link:access-control.html#capability_emailReviewers[Email Reviewers]
1284capability.
Edwin Kempin5944d642013-02-15 09:31:42 +01001285|`flushCaches` |not set if `false`|Whether the user has the
1286link:access-control.html#capability_flushCaches[Flush Caches]
1287capability.
Edwin Kempin8f489a42013-11-15 16:26:51 +01001288|`killTask` |not set if `false`|Whether the user has the
1289link:access-control.html#capability_kill[Kill Task] capability.
1290|`priority` |not set if `INTERACTIVE`|The name of the thread
1291pool used by the user, see link:access-control.html#capability_priority[
1292Priority] capability.
1293|`queryLimit` ||The link:access-control.html#capability_queryLimit[
1294Query Limit] of the user as link:#query-limit-info[QueryLimitInfo].
1295|`runAs` |not set if `false`|Whether the user has the
1296link:access-control.html#capability_runAs[Run As] capability.
1297|`runGC` |not set if `false`|Whether the user has the
1298link:access-control.html#capability_runGC[Run Garbage Collection]
1299capability.
1300|`streamEvents` |not set if `false`|Whether the user has the
1301link:access-control.html#capability_streamEvents[Stream Events]
1302capability.
Dave Borowitzf3548a92014-02-20 11:02:19 -08001303|`viewAllAccounts` |not set if `false`|Whether the user has the
1304link:access-control.html#capability_viewAllAccounts[View All Accounts]
1305capability.
Edwin Kempin8f489a42013-11-15 16:26:51 +01001306|`viewCaches` |not set if `false`|Whether the user has the
1307link:access-control.html#capability_viewCaches[View Caches] capability.
Edwin Kempin5944d642013-02-15 09:31:42 +01001308|`viewConnections` |not set if `false`|Whether the user has the
1309link:access-control.html#capability_viewConnections[View Connections]
1310capability.
Edwin Kempin362b14d12014-05-09 14:18:12 +02001311|`viewPlugins` |not set if `false`|Whether the user has the
1312link:access-control.html#capability_viewPlugins[View Plugins] capability.
Edwin Kempin5944d642013-02-15 09:31:42 +01001313|`viewQueue` |not set if `false`|Whether the user has the
1314link:access-control.html#capability_viewQueue[View Queue] capability.
Edwin Kempin5944d642013-02-15 09:31:42 +01001315|=================================
1316
Khai Do38ba5cc2014-07-10 20:23:20 -07001317[[preferences-info]]
1318=== PreferencesInfo
1319The `PreferencesInfo` entity contains information about a user's preferences.
1320
1321[options="header",width="50%",cols="1,^1,5"]
1322|=====================================
1323|Field Name ||Description
1324|`changes_per_page` ||
1325The number of changes to show on each page.
1326Allowed values are `10`, `25`, `50`, `100`.
1327|`show_site_header` |not set if `false`|
1328Whether the site header should be shown.
1329|`use_flash_clipboard` |not set if `false`|
1330Whether to use the flash clipboard widget.
1331|`download_scheme` ||
1332The type of download URL the user prefers to use.
1333|`download_command` ||
1334The type of download command the user prefers to use.
1335|`copy_self_on_email` |not set if `false`|
1336Whether to CC me on comments I write.
1337|`date_format` ||
1338The format to display the date in.
1339Allowed values are `STD`, `US`, `ISO`, `EURO`, `UK`.
1340|`time_format` ||
1341The format to display the time in.
1342Allowed values are `HHMM_12`, `HHMM_24`.
1343|`reverse_patch_set_order` |not set if `false`|
1344Whether to display the patch sets in reverse order.
1345|`relative_date_in_change_table` |not set if `false`|
1346Whether to show relative dates in the changes table.
1347|`size_bar_in_change_table` |not set if `false`|
1348Whether to show the change sizes as colored bars in the change table.
1349|`legacycid_in_change_table` |not set if `false`|
1350Whether to show change number in the change table.
1351|`review_category_strategy` ||
1352The strategy used to displayed info in the review category column.
David Pursehouse347216e2014-07-11 15:57:44 +09001353Allowed values are `NONE`, `NAME`, `EMAIL`, `USERNAME`, `ABBREV`.
Khai Do38ba5cc2014-07-10 20:23:20 -07001354|`comment_visibility_strategy` ||
1355The strategy used to display the comments.
1356Allowed values are `COLLAPSE_ALL`, `EXPAND_MOST_RECENT`, `EXPAND_RECENT`, `EXPAND_ALL`.
1357|`diff_view` ||
1358The type of diff view to show.
1359Allowed values are `SIDE_BY_SIDE`, `UNIFIED_DIFF`.
1360|`change_screen` ||
1361The change screen to use.
1362Allowed values are `OLD_UI`, `CHANGE_SCREEN2`.
1363|=====================================
1364
1365[[preferences-input]]
1366=== PreferencesInput
1367The `PreferencesInput` entity contains information for setting the
1368user preferences. Fields which are not set will not be updated.
1369
1370[options="header",width="50%",cols="1,^1,5"]
1371|=====================================
1372|Field Name ||Description
1373|`changes_per_page` |optional|
1374The number of changes to show on each page.
1375Allowed values are `10`, `25`, `50`, `100`.
1376|`show_site_header` |optional|
1377Whether the site header should be shown.
1378|`use_flash_clipboard` |optional|
1379Whether to use the flash clipboard widget.
1380|`download_scheme` |optional|
1381The type of download URL the user prefers to use.
1382|`download_command` |optional|
1383The type of download command the user prefers to use.
1384|`copy_self_on_email` |optional|
1385Whether to CC me on comments I write.
1386|`date_format` |optional|
1387The format to display the date in.
1388Allowed values are `STD`, `US`, `ISO`, `EURO`, `UK`.
1389|`time_format` |optional|
1390The format to display the time in.
1391Allowed values are `HHMM_12`, `HHMM_24`.
1392|`reverse_patch_set_order` |optional|
1393Whether to display the patch sets in reverse order.
1394|`relative_date_in_change_table` |optional|
1395Whether to show relative dates in the changes table.
1396|`size_bar_in_change_table` |optional|
1397Whether to show the change sizes as colored bars in the change table.
1398|`legacycid_in_change_table` |optional|
1399Whether to show change number in the change table.
1400|`review_category_strategy` |optional|
1401The strategy used to displayed info in the review category column.
David Pursehouse347216e2014-07-11 15:57:44 +09001402Allowed values are `NONE`, `NAME`, `EMAIL`, `USERNAME`, `ABBREV`.
Khai Do38ba5cc2014-07-10 20:23:20 -07001403|`comment_visibility_strategy` |optional|
1404The strategy used to display the comments.
1405Allowed values are `COLLAPSE_ALL`, `EXPAND_MOST_RECENT`, `EXPAND_RECENT`, `EXPAND_ALL`.
1406|`diff_view` |optional|
1407The type of diff view to show.
1408Allowed values are `SIDE_BY_SIDE`, `UNIFIED_DIFF`.
1409|`change_screen` |optional|
1410The change screen to use.
1411Allowed values are `OLD_UI`, `CHANGE_SCREEN2`.
1412|=====================================
1413
Edwin Kempine5d563f52013-03-21 09:35:38 +01001414[[diff-preferences-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001415=== DiffPreferencesInfo
Edwin Kempine5d563f52013-03-21 09:35:38 +01001416The `DiffPreferencesInfo` entity contains information about the diff
1417preferences of a user.
1418
1419[options="header",width="50%",cols="1,^1,5"]
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001420|===========================================
1421|Field Name ||Description
1422|`context` ||
Edwin Kempine5d563f52013-03-21 09:35:38 +01001423The number of lines of context when viewing a patch.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001424|`expand_all_comments` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01001425Whether all inline comments should be automatically expanded.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001426|`ignore_whitespace` ||
Edwin Kempine5d563f52013-03-21 09:35:38 +01001427Whether whitespace changes should be ignored and if yes, which
1428whitespace changes should be ignored. +
1429Allowed values are `IGNORE_NONE`, `IGNORE_SPACE_AT_EOL`,
1430`IGNORE_SPACE_CHANGE`, `IGNORE_ALL_SPACE`.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001431|`intraline_difference` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01001432Whether intraline differences should be highlighted.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001433|`line_length` ||
Edwin Kempine5d563f52013-03-21 09:35:38 +01001434Number of characters that should be displayed in one line.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001435|`manual_review` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01001436Whether the 'Reviewed' flag should not be set automatically on a patch
1437when it is viewed.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001438|`retain_header` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01001439Whether the header that is displayed above the patch (that either shows
1440the commit message, the diff preferences, the patch sets or the files)
1441should be retained on file switch.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001442|`show_line_endings` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01001443Whether Windows EOL/Cr-Lf should be displayed as '\r' in a dotted-line
1444box.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001445|`show_tabs` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01001446Whether tabs should be shown.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001447|`show_whitespace_errors` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01001448Whether whitespace errors should be shown.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001449|`skip_deleted` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01001450Whether deleted files should be skipped on file switch.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001451|`skip_uncommented` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01001452Whether uncommented files should be skipped on file switch.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001453|`syntax_highlighting` |not set if `false`|
Edwin Kempine5d563f52013-03-21 09:35:38 +01001454Whether syntax highlighting should be enabled.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001455|`hide_top_menu` |not set if `false`|
Shawn Pearceba312d2e2013-12-12 16:36:03 -08001456If true the top menu header and site header is hidden.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001457|`auto_hide_diff_table_header` |not set if `false`|
1458If true the diff table header is automatically hidden when
1459scrolling down more than half of a page.
1460|`hide_line_numbers` |not set if `false`|
Shawn Pearceba312d2e2013-12-12 16:36:03 -08001461If true the line numbers are hidden.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001462|`tab_size` ||
Edwin Kempine5d563f52013-03-21 09:35:38 +01001463Number of spaces that should be used to display one tab.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001464|===========================================
Edwin Kempine5d563f52013-03-21 09:35:38 +01001465
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001466[[diff-preferences-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001467=== DiffPreferencesInput
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001468The `DiffPreferencesInput` entity contains information for setting the
1469diff preferences of a user. Fields which are not set will not be
1470updated.
1471
1472[options="header",width="50%",cols="1,^1,5"]
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001473|===========================================
1474|Field Name ||Description
1475|`context` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001476The number of lines of context when viewing a patch.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001477|`expand_all_comments` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001478Whether all inline comments should be automatically expanded.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001479|`ignore_whitespace` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001480Whether whitespace changes should be ignored and if yes, which
1481whitespace changes should be ignored. +
1482Allowed values are `IGNORE_NONE`, `IGNORE_SPACE_AT_EOL`,
1483`IGNORE_SPACE_CHANGE`, `IGNORE_ALL_SPACE`.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001484|`intraline_difference` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001485Whether intraline differences should be highlighted.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001486|`line_length` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001487Number of characters that should be displayed in one line.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001488|`manual_review` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001489Whether the 'Reviewed' flag should not be set automatically on a patch
1490when it is viewed.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001491|`retain_header` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001492Whether the header that is displayed above the patch (that either shows
1493the commit message, the diff preferences, the patch sets or the files)
1494should be retained on file switch.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001495|`show_line_endings` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001496Whether Windows EOL/Cr-Lf should be displayed as '\r' in a dotted-line
1497box.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001498|`show_tabs` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001499Whether tabs should be shown.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001500|`show_whitespace_errors` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001501Whether whitespace errors should be shown.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001502|`skip_deleted` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001503Whether deleted files should be skipped on file switch.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001504|`skip_uncommented` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001505Whether uncommented files should be skipped on file switch.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001506|`syntax_highlighting` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001507Whether syntax highlighting should be enabled.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001508|`hide_top_menu` |optional|
Shawn Pearceba312d2e2013-12-12 16:36:03 -08001509True if the top menu header and site header should be hidden.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001510|`auto_hide_diff_table_header` |optional|
1511True if the diff table header is automatically hidden when
1512scrolling down more than half of a page.
1513|`hide_line_numbers` |optional|
Shawn Pearceba312d2e2013-12-12 16:36:03 -08001514True if the line numbers should be hidden.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001515|`tab_size` |optional|
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001516Number of spaces that should be used to display one tab.
Edwin Kempin1b6c6d82014-09-11 23:36:43 +02001517|===========================================
Edwin Kempin3cdd0e02013-03-22 09:42:15 +01001518
Edwin Kempina1be4c22013-05-16 13:00:11 +02001519[[email-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001520=== EmailInfo
Edwin Kempina1be4c22013-05-16 13:00:11 +02001521The `EmailInfo` entity contains information about an email address of a
1522user.
1523
1524[options="header",width="50%",cols="1,^1,5"]
1525|========================
1526|Field Name ||Description
1527|`email` ||The email address.
1528|`preferred`|not set if `false`|
1529Whether this is the preferred email address of the user.
Shawn Pearce39820882013-05-23 08:00:58 -07001530|`pending_confirmation`|not set if `false`|
1531Set true if the user must confirm control of the email address
1532by following a verification link before Gerrit will permit use of
1533this address.
Edwin Kempina1be4c22013-05-16 13:00:11 +02001534|========================
1535
Edwin Kempin3f48c242013-05-17 10:55:07 +02001536[[email-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001537=== EmailInput
Edwin Kempin3f48c242013-05-17 10:55:07 +02001538The `EmailInput` entity contains information for registering a new
1539email address.
1540
1541[options="header",width="50%",cols="1,^1,5"]
Edwin Kempinc99e5a62013-05-17 11:21:27 +02001542|==============================
1543|Field Name ||Description
1544|`email` ||
Edwin Kempin3f48c242013-05-17 10:55:07 +02001545The email address. If provided, must match the email address from the
1546URL.
Edwin Kempinc99e5a62013-05-17 11:21:27 +02001547|`preferred` |`false` if not set|
Edwin Kempin3f48c242013-05-17 10:55:07 +02001548Whether the new email address should become the preferred email address
Edwin Kempin4c454e62013-05-27 11:21:55 +02001549of the user (only supported if `no_confirmation` is set or if the
1550authentication type is `DEVELOPMENT_BECOME_ANY_ACCOUNT`).
Edwin Kempinc99e5a62013-05-17 11:21:27 +02001551|`no_confirmation`|`false` if not set|
1552Whether the email address should be added without confirmation. In this
1553case no verification email is sent to the user. +
1554Only Gerrit administrators are allowed to add email addresses without
1555confirmation.
1556|==============================
Edwin Kempin3f48c242013-05-17 10:55:07 +02001557
Edwin Kempind9cdf5e2013-05-28 11:23:10 +02001558[[http-password-input]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001559=== HttpPasswordInput
Edwin Kempind9cdf5e2013-05-28 11:23:10 +02001560The `HttpPasswordInput` entity contains information for setting/generating
1561an HTTP password.
1562
1563[options="header",width="50%",cols="1,^1,5"]
1564|============================
1565|Field Name ||Description
1566|`generate` |`false` if not set|
1567Whether a new HTTP password should be generated
1568|`http_password`|optional|
1569The new HTTP password. Only Gerrit administrators may set the HTTP
1570password directly. +
1571If empty or not set and `generate` is false or not set, the HTTP
1572password is deleted.
1573|============================
1574
Edwin Kempin5944d642013-02-15 09:31:42 +01001575[[query-limit-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001576=== QueryLimitInfo
Edwin Kempin5944d642013-02-15 09:31:42 +01001577The `QueryLimitInfo` entity contains information about the
1578link:access-control.html#capability_queryLimit[Query Limit] of a user.
1579
1580[options="header",width="50%",cols="1,6"]
1581|================================
1582|Field Name |Description
1583|`min` |Lower limit.
1584|`max` |Upper limit.
1585|================================
1586
Edwin Kempinebccb842013-05-29 13:33:06 +02001587[[ssh-key-info]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001588=== SshKeyInfo
Edwin Kempinebccb842013-05-29 13:33:06 +02001589The `SshKeyInfo` entity contains information about an SSH key of a
1590user.
1591
1592[options="header",width="50%",cols="1,^1,5"]
1593|=============================
1594|Field Name ||Description
1595|`seq` ||The sequence number of the SSH key.
1596|`ssh_public_key`||The complete public SSH key.
1597|`encoded_key` ||The encoded key.
1598|`algorithm` ||The algorithm of the SSH key.
1599|`comment` |optional|The comment of the SSH key.
1600|`valid` ||Whether the SSH key is valid.
1601|=============================
1602
Edwin Kempin5944d642013-02-15 09:31:42 +01001603
Edwin Kempind0a63922013-01-23 16:32:59 +01001604GERRIT
1605------
1606Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -07001607
1608SEARCHBOX
1609---------