Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1 | = Gerrit Code Review - /accounts/ REST API |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2 | |
| 3 | This page describes the account related REST endpoints. |
| 4 | Please also take note of the general information on the |
| 5 | link:rest-api.html[REST API]. |
| 6 | |
Edwin Kempin | 90af548 | 2013-09-03 10:47:14 +0200 | [diff] [blame] | 7 | [[account-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 8 | == Account Endpoints |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 9 | |
Edwin Kempin | 431873e | 2013-03-20 15:17:54 +0100 | [diff] [blame] | 10 | [[get-account]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 11 | === Get Account |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 12 | -- |
Edwin Kempin | 431873e | 2013-03-20 15:17:54 +0100 | [diff] [blame] | 13 | 'GET /accounts/link:#account-id[\{account-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 14 | -- |
Edwin Kempin | 431873e | 2013-03-20 15:17:54 +0100 | [diff] [blame] | 15 | |
| 16 | Returns 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 Ring | 8e34272 | 2013-05-01 01:40:53 -0700 | [diff] [blame] | 33 | "email": "john.doe@example.com", |
| 34 | "username": "john" |
Edwin Kempin | 431873e | 2013-03-20 15:17:54 +0100 | [diff] [blame] | 35 | } |
| 36 | ---- |
| 37 | |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 38 | [[create-account]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 39 | === Create Account |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 40 | -- |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 41 | 'PUT /accounts/link:#username[\{username\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 42 | -- |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 43 | |
| 44 | Creates a new account. |
| 45 | |
| 46 | In the request body additional data for the account can be provided as |
| 47 | link:#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 | |
| 65 | As response a detailed link:#account-info[AccountInfo] entity is |
| 66 | returned 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 Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 82 | [[get-account-name]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 83 | === Get Account Name |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 84 | -- |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 85 | 'GET /accounts/link:#account-id[\{account-id\}]/name' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 86 | -- |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 87 | |
| 88 | Retrieves 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 | |
| 105 | If the account does not have a name an empty string is returned. |
| 106 | |
| 107 | [[set-account-name]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 108 | === Set Account Name |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 109 | -- |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 110 | 'PUT /accounts/link:#account-id[\{account-id\}]/name' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 111 | -- |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 112 | |
| 113 | Sets the full name of an account. |
| 114 | |
| 115 | The new account name must be provided in the request body inside |
David Pursehouse | 3af5699 | 2014-02-21 12:30:53 +0900 | [diff] [blame] | 116 | an link:#account-name-input[AccountNameInput] entity. |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 117 | |
| 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 | |
| 128 | As 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 | |
| 140 | If the name was deleted the response is "`204 No Content`". |
| 141 | |
| 142 | Some realms may not allow to modify the account name. In this case the |
| 143 | request is rejected with "`405 Method Not Allowed`". |
| 144 | |
| 145 | [[delete-account-name]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 146 | === Delete Account Name |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 147 | -- |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 148 | 'DELETE /accounts/link:#account-id[\{account-id\}]/name' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 149 | -- |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 150 | |
| 151 | Deletes 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 Kempin | 9f9ec65 | 2013-06-04 08:28:15 +0200 | [diff] [blame] | 163 | [[get-username]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 164 | === Get Username |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 165 | -- |
Edwin Kempin | 9f9ec65 | 2013-06-04 08:28:15 +0200 | [diff] [blame] | 166 | 'GET /accounts/link:#account-id[\{account-id\}]/username' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 167 | -- |
Edwin Kempin | 9f9ec65 | 2013-06-04 08:28:15 +0200 | [diff] [blame] | 168 | |
| 169 | Retrieves 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 | |
| 186 | If the account does not have a username the response is `404 Not Found`. |
| 187 | |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 188 | [[get-active]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 189 | === Get Active |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 190 | -- |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 191 | 'GET /accounts/link:#account-id[\{account-id\}]/active' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 192 | -- |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 193 | |
| 194 | Checks if an account is active. |
| 195 | |
| 196 | .Request |
| 197 | ---- |
| 198 | GET /accounts/john.doe@example.com/active HTTP/1.0 |
| 199 | ---- |
| 200 | |
Colby Ranger | b125338 | 2013-11-06 09:24:47 -0800 | [diff] [blame] | 201 | If the account is active the string `ok` is returned. |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 202 | |
| 203 | .Response |
| 204 | ---- |
| 205 | HTTP/1.1 200 OK |
Colby Ranger | b125338 | 2013-11-06 09:24:47 -0800 | [diff] [blame] | 206 | |
| 207 | ok |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 208 | ---- |
| 209 | |
Colby Ranger | b125338 | 2013-11-06 09:24:47 -0800 | [diff] [blame] | 210 | If the account is inactive the response is `204 No Content`. |
| 211 | |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 212 | [[set-active]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 213 | === Set Active |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 214 | -- |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 215 | 'PUT /accounts/link:#account-id[\{account-id\}]/active' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 216 | -- |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 217 | |
| 218 | Sets 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 | |
| 230 | If the account was already active the response is `200 OK`. |
| 231 | |
| 232 | [[delete-active]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 233 | === Delete Active |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 234 | -- |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 235 | 'DELETE /accounts/link:#account-id[\{account-id\}]/active' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 236 | -- |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 237 | |
| 238 | Sets 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 | |
| 250 | If the account was already inactive the response is `404 Not Found`. |
| 251 | |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 252 | [[get-http-password]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 253 | === Get HTTP Password |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 254 | -- |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 255 | 'GET /accounts/link:#account-id[\{account-id\}]/password.http' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 256 | -- |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 257 | |
| 258 | Retrieves 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 | |
| 275 | If the account does not have an HTTP password the response is `404 Not Found`. |
| 276 | |
| 277 | [[set-http-password]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 278 | === Set/Generate HTTP Password |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 279 | -- |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 280 | 'PUT /accounts/link:#account-id[\{account-id\}]/password.http' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 281 | -- |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 282 | |
| 283 | Sets/Generates the HTTP password of an account. |
| 284 | |
| 285 | The options for setting/generating the HTTP password must be provided |
| 286 | in the request body inside a link:#http-password-input[ |
| 287 | HttpPasswordInput] 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 | |
| 299 | As 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 | |
| 311 | If the HTTP password was deleted the response is "`204 No Content`". |
| 312 | |
| 313 | [[delete-http-password]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 314 | === Delete HTTP Password |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 315 | -- |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 316 | 'DELETE /accounts/link:#account-id[\{account-id\}]/password.http' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 317 | -- |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 318 | |
| 319 | Deletes 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 Kempin | a1be4c2 | 2013-05-16 13:00:11 +0200 | [diff] [blame] | 331 | [[list-account-emails]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 332 | === List Account Emails |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 333 | -- |
Edwin Kempin | a1be4c2 | 2013-05-16 13:00:11 +0200 | [diff] [blame] | 334 | 'GET /accounts/link:#account-id[\{account-id\}]/emails' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 335 | -- |
Edwin Kempin | a1be4c2 | 2013-05-16 13:00:11 +0200 | [diff] [blame] | 336 | |
| 337 | Returns the email addresses that are configured for the specified user. |
| 338 | |
| 339 | .Request |
| 340 | ---- |
| 341 | GET /accounts/self/emails HTTP/1.0 |
| 342 | ---- |
| 343 | |
| 344 | As response the email addresses of the user are returned as a list of |
| 345 | link:#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 Kempin | 493efd5 | 2013-05-16 13:32:17 +0200 | [diff] [blame] | 365 | [[get-account-email]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 366 | === Get Account Email |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 367 | -- |
Edwin Kempin | 493efd5 | 2013-05-16 13:32:17 +0200 | [diff] [blame] | 368 | 'GET /accounts/link:#account-id[\{account-id\}]/emails/link:#email-id[\{email-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 369 | -- |
Edwin Kempin | 493efd5 | 2013-05-16 13:32:17 +0200 | [diff] [blame] | 370 | |
| 371 | Retrieves an email address of a user. |
| 372 | |
| 373 | .Request |
| 374 | ---- |
| 375 | GET /accounts/self/emails/john.doe@example.com HTTP/1.0 |
| 376 | ---- |
| 377 | |
| 378 | As response an link:#email-info[EmailInfo] entity is returned that |
| 379 | describes 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 Kempin | 315066a | 2013-05-16 16:41:24 +0200 | [diff] [blame] | 394 | [[create-account-email]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 395 | === Create Account Email |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 396 | -- |
Edwin Kempin | 315066a | 2013-05-16 16:41:24 +0200 | [diff] [blame] | 397 | 'PUT /accounts/link:#account-id[\{account-id\}]/emails/link:#email-id[\{email-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 398 | -- |
Edwin Kempin | 315066a | 2013-05-16 16:41:24 +0200 | [diff] [blame] | 399 | |
| 400 | Registers a new email address for the user. A verification email is |
| 401 | sent with a link that needs to be visited to confirm the email address, |
| 402 | unless `DEVELOPMENT_BECOME_ANY_ACCOUNT` is used as authentication type. |
| 403 | For the development mode email addresses are directly added without |
Edwin Kempin | c99e5a6 | 2013-05-17 11:21:27 +0200 | [diff] [blame] | 404 | confirmation. A Gerrit administrator may add an email address without |
| 405 | confirmation by setting `no_confirmation` in the |
| 406 | link:#email-input[EmailInput]. |
Edwin Kempin | 315066a | 2013-05-16 16:41:24 +0200 | [diff] [blame] | 407 | |
Edwin Kempin | 3f48c24 | 2013-05-17 10:55:07 +0200 | [diff] [blame] | 408 | In the request body additional data for the email address can be |
| 409 | provided as link:#email-input[EmailInput]. |
| 410 | |
Edwin Kempin | 315066a | 2013-05-16 16:41:24 +0200 | [diff] [blame] | 411 | .Request |
| 412 | ---- |
| 413 | PUT /accounts/self/emails/john.doe@example.com HTTP/1.0 |
| 414 | ---- |
| 415 | |
| 416 | As response the new email address is returned as |
| 417 | link:#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 Kempin | 3f48c24 | 2013-05-17 10:55:07 +0200 | [diff] [blame] | 427 | "email": "john.doe@example.com", |
Edwin Kempin | 4c454e6 | 2013-05-27 11:21:55 +0200 | [diff] [blame] | 428 | "pending_confirmation": true |
Edwin Kempin | 315066a | 2013-05-16 16:41:24 +0200 | [diff] [blame] | 429 | } |
| 430 | ---- |
| 431 | |
Edwin Kempin | 4fbf70f | 2013-05-17 14:15:16 +0200 | [diff] [blame] | 432 | [[delete-account-email]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 433 | === Delete Account Email |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 434 | -- |
Edwin Kempin | 4fbf70f | 2013-05-17 14:15:16 +0200 | [diff] [blame] | 435 | 'DELETE /accounts/link:#account-id[\{account-id\}]/emails/link:#email-id[\{email-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 436 | -- |
Edwin Kempin | 4fbf70f | 2013-05-17 14:15:16 +0200 | [diff] [blame] | 437 | |
| 438 | Deletes 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 Kempin | e1f8288 | 2013-05-16 15:02:45 +0200 | [diff] [blame] | 450 | [[set-preferred-email]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 451 | === Set Preferred Email |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 452 | -- |
Edwin Kempin | e1f8288 | 2013-05-16 15:02:45 +0200 | [diff] [blame] | 453 | 'PUT /accounts/link:#account-id[\{account-id\}]/emails/link:#email-id[\{email-id\}]/preferred' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 454 | -- |
Edwin Kempin | e1f8288 | 2013-05-16 15:02:45 +0200 | [diff] [blame] | 455 | |
| 456 | Sets 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 | |
| 468 | If the email address was already the preferred email address of the |
| 469 | account the response is "`200 OK`". |
| 470 | |
Edwin Kempin | ebccb84 | 2013-05-29 13:33:06 +0200 | [diff] [blame] | 471 | [[list-ssh-keys]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 472 | === List SSH Keys |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 473 | -- |
Edwin Kempin | ebccb84 | 2013-05-29 13:33:06 +0200 | [diff] [blame] | 474 | 'GET /accounts/link:#account-id[\{account-id\}]/sshkeys' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 475 | -- |
Edwin Kempin | ebccb84 | 2013-05-29 13:33:06 +0200 | [diff] [blame] | 476 | |
| 477 | Returns the SSH keys of an account. |
| 478 | |
| 479 | .Request |
| 480 | ---- |
| 481 | GET /accounts/self/sshkeys HTTP/1.0 |
| 482 | ---- |
| 483 | |
| 484 | As response the SSH keys of the account are returned as a list of |
| 485 | link:#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 Kempin | c6824ee | 2013-05-29 16:18:39 +0200 | [diff] [blame] | 506 | [[get-ssh-key]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 507 | === Get SSH Key |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 508 | -- |
Edwin Kempin | c6824ee | 2013-05-29 16:18:39 +0200 | [diff] [blame] | 509 | 'GET /accounts/link:#account-id[\{account-id\}]/sshkeys/link:#ssh-key-id[\{ssh-key-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 510 | -- |
Edwin Kempin | c6824ee | 2013-05-29 16:18:39 +0200 | [diff] [blame] | 511 | |
| 512 | Retrieves an SSH key of a user. |
| 513 | |
| 514 | .Request |
| 515 | ---- |
| 516 | GET /accounts/self/sshkeys/1 HTTP/1.0 |
| 517 | ---- |
| 518 | |
| 519 | As response an link:#ssh-key-info[SshKeyInfo] entity is returned that |
| 520 | describes 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 Kempin | 4e2e521 | 2013-05-31 15:11:10 +0200 | [diff] [blame] | 539 | [[add-ssh-key]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 540 | === Add SSH Key |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 541 | -- |
Edwin Kempin | 4e2e521 | 2013-05-31 15:11:10 +0200 | [diff] [blame] | 542 | 'POST /accounts/link:#account-id[\{account-id\}]/sshkeys' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 543 | -- |
Edwin Kempin | 4e2e521 | 2013-05-31 15:11:10 +0200 | [diff] [blame] | 544 | |
| 545 | Adds an SSH key for a user. |
| 546 | |
| 547 | The 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 | |
| 557 | As response an link:#ssh-key-info[SshKeyInfo] entity is returned that |
| 558 | describes 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 Kempin | 5a02ffd | 2013-06-03 15:33:53 +0200 | [diff] [blame] | 577 | [[delete-ssh-key]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 578 | === Delete SSH Key |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 579 | -- |
Edwin Kempin | 5a02ffd | 2013-06-03 15:33:53 +0200 | [diff] [blame] | 580 | 'DELETE /accounts/link:#account-id[\{account-id\}]/sshkeys/link:#ssh-key-id[\{ssh-key-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 581 | -- |
Edwin Kempin | 5a02ffd | 2013-06-03 15:33:53 +0200 | [diff] [blame] | 582 | |
| 583 | Deletes 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 Kempin | f502dd0 | 2013-02-14 14:22:25 +0100 | [diff] [blame] | 595 | [[list-account-capabilities]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 596 | === List Account Capabilities |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 597 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 598 | 'GET /accounts/link:#account-id[\{account-id\}]/capabilities' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 599 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 600 | |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 601 | Returns the global capabilities that are enabled for the specified |
| 602 | user. |
Edwin Kempin | f502dd0 | 2013-02-14 14:22:25 +0100 | [diff] [blame] | 603 | |
| 604 | If 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 |
| 606 | discover if administrative features are available to the caller, so |
| 607 | they can hide (or show) relevant UI actions. |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 608 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 609 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 610 | ---- |
| 611 | GET /accounts/self/capabilities HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 612 | ---- |
| 613 | |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 614 | As response the global capabilities of the user are returned as a |
| 615 | link:#capability-info[CapabilityInfo] entity. |
| 616 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 617 | .Response |
| 618 | ---- |
| 619 | HTTP/1.1 200 OK |
| 620 | Content-Disposition: attachment |
| 621 | Content-Type: application/json;charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 622 | |
| 623 | )]}' |
| 624 | { |
| 625 | "queryLimit": { |
| 626 | "min": 0, |
| 627 | "max": 500 |
Edwin Kempin | 830d9b8 | 2013-02-14 15:03:26 +0100 | [diff] [blame] | 628 | }, |
| 629 | "emailReviewers": true |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 630 | } |
| 631 | ---- |
| 632 | |
| 633 | Administrator that has authenticated with digest authentication: |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 634 | |
| 635 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 636 | ---- |
| 637 | GET /a/accounts/self/capabilities HTTP/1.0 |
| 638 | Authorization: Digest username="admin", realm="Gerrit Code Review", nonce="... |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 639 | ---- |
| 640 | |
| 641 | .Response |
| 642 | ---- |
| 643 | HTTP/1.1 200 OK |
| 644 | Content-Disposition: attachment |
| 645 | Content-Type: application/json;charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 646 | |
| 647 | )]}' |
| 648 | { |
| 649 | "administrateServer": true, |
| 650 | "queryLimit": { |
| 651 | "min": 0, |
| 652 | "max": 500 |
| 653 | }, |
| 654 | "createAccount": true, |
| 655 | "createGroup": true, |
| 656 | "createProject": true, |
Edwin Kempin | 830d9b8 | 2013-02-14 15:03:26 +0100 | [diff] [blame] | 657 | "emailReviewers": true, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 658 | "killTask": true, |
| 659 | "viewCaches": true, |
| 660 | "flushCaches": true, |
| 661 | "viewConnections": true, |
Edwin Kempin | 362b14d1 | 2014-05-09 14:18:12 +0200 | [diff] [blame] | 662 | "viewPlugins": true, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 663 | "viewQueue": true, |
David Ostrovsky | 99fc253 | 2013-06-16 17:50:35 +0200 | [diff] [blame] | 664 | "runGC": true |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 665 | } |
| 666 | ---- |
| 667 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 668 | .Get your own capabilities |
| 669 | **** |
| 670 | get::/accounts/self/capabilities |
| 671 | **** |
| 672 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 673 | To filter the set of global capabilities the `q` parameter can be used. |
| 674 | Filtering may decrease the response time by avoiding looking at every |
| 675 | possible alternative for the caller. |
| 676 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 677 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 678 | ---- |
| 679 | GET /a/accounts/self/capabilities?q=createAccount&q=createGroup HTTP/1.0 |
| 680 | Authorization: Digest username="admin", realm="Gerrit Code Review", nonce="... |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 681 | ---- |
| 682 | |
| 683 | .Response |
| 684 | ---- |
| 685 | HTTP/1.1 200 OK |
| 686 | Content-Disposition: attachment |
| 687 | Content-Type: application/json;charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 688 | |
| 689 | )]}' |
| 690 | { |
| 691 | "createAccount": true, |
| 692 | "createGroup": true |
| 693 | } |
| 694 | ---- |
| 695 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 696 | .Check if you can create groups |
| 697 | **** |
| 698 | get::/accounts/self/capabilities?q=createGroup |
| 699 | **** |
| 700 | |
Edwin Kempin | 9144479 | 2013-02-15 10:09:49 +0100 | [diff] [blame] | 701 | [[check-account-capability]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 702 | === Check Account Capability |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 703 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 704 | 'GET /accounts/link:#account-id[\{account-id\}]/capabilities/link:#capability-id[\{capability-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 705 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 706 | |
Edwin Kempin | 9144479 | 2013-02-15 10:09:49 +0100 | [diff] [blame] | 707 | Checks if a user has a certain global capability. |
| 708 | |
| 709 | .Request |
| 710 | ---- |
| 711 | GET /a/accounts/self/capabilities/createGroup HTTP/1.0 |
| 712 | ---- |
| 713 | |
| 714 | If 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 | |
| 723 | If the user doesn't have the global capability the response is |
| 724 | `404 Not Found`. |
| 725 | |
| 726 | .Check if you can create groups |
| 727 | **** |
| 728 | get::/accounts/self/capabilities/createGroup |
| 729 | **** |
| 730 | |
Edwin Kempin | b0a9b2b | 2013-02-15 13:25:54 +0100 | [diff] [blame] | 731 | [[list-groups]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 732 | === List Groups |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 733 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 734 | 'GET /accounts/link:#account-id[\{account-id\}]/groups/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 735 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 736 | |
Edwin Kempin | b0a9b2b | 2013-02-15 13:25:54 +0100 | [diff] [blame] | 737 | Lists 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 | |
| 744 | As result a list of link:rest-api-groups.html#group-info[GroupInfo] |
| 745 | entries 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 Kempin | b0a9b2b | 2013-02-15 13:25:54 +0100 | [diff] [blame] | 756 | "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 Kempin | b0a9b2b | 2013-02-15 13:25:54 +0100 | [diff] [blame] | 765 | "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 Kempin | b0a9b2b | 2013-02-15 13:25:54 +0100 | [diff] [blame] | 774 | "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 | **** |
| 787 | get::/accounts/self/groups/ |
| 788 | **** |
| 789 | |
Edwin Kempin | 76de213 | 2013-02-15 12:53:41 +0100 | [diff] [blame] | 790 | [[get-avatar]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 791 | === Get Avatar |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 792 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 793 | 'GET /accounts/link:#account-id[\{account-id\}]/avatar' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 794 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 795 | |
Edwin Kempin | 76de213 | 2013-02-15 12:53:41 +0100 | [diff] [blame] | 796 | Retrieves the avatar image of the user. |
| 797 | |
| 798 | With the `size` option (alias `s`) you can specify the preferred size |
| 799 | in pixels (height and width). |
| 800 | |
| 801 | .Request |
| 802 | ---- |
| 803 | GET /a/accounts/john.doe@example.com/avatar?s=20 HTTP/1.0 |
| 804 | ---- |
| 805 | |
| 806 | The 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 Kempin | cc01b0b | 2013-04-25 14:37:17 +0200 | [diff] [blame] | 814 | [[get-avatar-change-url]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 815 | === Get Avatar Change URL |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 816 | -- |
Edwin Kempin | cc01b0b | 2013-04-25 14:37:17 +0200 | [diff] [blame] | 817 | 'GET /accounts/link:#account-id[\{account-id\}]/avatar.change.url' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 818 | -- |
Edwin Kempin | cc01b0b | 2013-04-25 14:37:17 +0200 | [diff] [blame] | 819 | |
| 820 | Retrieves 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 Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 836 | [[get-user-preferences]] |
| 837 | === Get User Preferences |
| 838 | -- |
| 839 | 'GET /accounts/link:#account-id[\{account-id\}]/preferences' |
| 840 | -- |
| 841 | |
| 842 | Retrieves the user's preferences. |
| 843 | |
| 844 | .Request |
| 845 | ---- |
| 846 | GET /a/accounts/self/preferences HTTP/1.0 |
| 847 | ---- |
| 848 | |
| 849 | As result the account preferences of the user are returned as a |
| 850 | link:#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 | |
| 904 | Sets the user's preferences. |
| 905 | |
| 906 | The new preferences must be provided in the request body as a |
| 907 | link:#preferences-input[PreferencesInput] entity. |
| 908 | |
| 909 | .Request |
| 910 | ---- |
David Pursehouse | 037d062 | 2014-10-20 16:51:50 +0900 | [diff] [blame] | 911 | PUT /a/accounts/self/preferences HTTP/1.0 |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 912 | 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 | |
| 953 | As result the new preferences of the user are returned as a |
| 954 | link:#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 Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1002 | [[get-diff-preferences]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1003 | === Get Diff Preferences |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1004 | -- |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1005 | 'GET /accounts/link:#account-id[\{account-id\}]/preferences.diff' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1006 | -- |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1007 | |
| 1008 | Retrieves the diff preferences of a user. |
| 1009 | |
| 1010 | .Request |
| 1011 | ---- |
| 1012 | GET /a/accounts/self/preferences.diff HTTP/1.0 |
| 1013 | ---- |
| 1014 | |
| 1015 | As result the diff preferences of the user are returned as a |
| 1016 | link:#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 Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1037 | [[set-diff-preferences]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1038 | === Set Diff Preferences |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1039 | -- |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1040 | 'PUT /accounts/link:#account-id[\{account-id\}]/preferences.diff' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1041 | -- |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1042 | |
| 1043 | Sets the diff preferences of a user. |
| 1044 | |
| 1045 | The new diff preferences must be provided in the request body as a |
| 1046 | link:#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 | |
| 1066 | As result the new diff preferences of the user are returned as a |
| 1067 | link:#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 Ostrovsky | 210e4d4 | 2013-11-11 08:35:28 +0100 | [diff] [blame] | 1089 | [[get-starred-changes]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1090 | === Get Starred Changes |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1091 | -- |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 1092 | 'GET /accounts/link:#account-id[\{account-id\}]/starred.changes' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1093 | -- |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 1094 | |
| 1095 | Gets the changes starred by the identified user account. This |
| 1096 | URL endpoint is functionally identical to the changes query |
| 1097 | `GET /changes/?q=is:starred`. The result is a list of |
| 1098 | link: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 Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 1114 | "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 Ostrovsky | 210e4d4 | 2013-11-11 08:35:28 +0100 | [diff] [blame] | 1132 | [[star-change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1133 | === Star Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1134 | -- |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 1135 | 'PUT /accounts/link:#account-id[\{account-id\}]/starred.changes/link:rest-api-changes.html#change-id[\{change-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1136 | -- |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 1137 | |
| 1138 | Star a change. Starred changes are returned for the search query |
| 1139 | `is:starred` or `starredby:USER` and automatically notify the user |
| 1140 | whenever 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 Ostrovsky | 210e4d4 | 2013-11-11 08:35:28 +0100 | [diff] [blame] | 1152 | [[unstar-change]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1153 | === Unstar Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1154 | -- |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 1155 | 'DELETE /accounts/link:#account-id[\{account-id\}]/starred.changes/link:rest-api-changes#change-id[\{change-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1156 | -- |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 1157 | |
| 1158 | Unstar 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 Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1169 | |
Edwin Kempin | f502dd0 | 2013-02-14 14:22:25 +0100 | [diff] [blame] | 1170 | [[ids]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1171 | == IDs |
Edwin Kempin | f502dd0 | 2013-02-14 14:22:25 +0100 | [diff] [blame] | 1172 | |
| 1173 | [[account-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1174 | === \{account-id\} |
Edwin Kempin | f502dd0 | 2013-02-14 14:22:25 +0100 | [diff] [blame] | 1175 | Identifier that uniquely identifies one account. |
| 1176 | |
| 1177 | This 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 Kempin | 9144479 | 2013-02-15 10:09:49 +0100 | [diff] [blame] | 1186 | [[capability-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1187 | === \{capability-id\} |
Edwin Kempin | 9144479 | 2013-02-15 10:09:49 +0100 | [diff] [blame] | 1188 | Identifier of a global capability. Valid values are all field names of |
| 1189 | the link:#capability-info[CapabilityInfo] entity. |
| 1190 | |
Edwin Kempin | 493efd5 | 2013-05-16 13:32:17 +0200 | [diff] [blame] | 1191 | [[email-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1192 | === \{email-id\} |
Edwin Kempin | 0ae7af0 | 2013-05-16 13:52:53 +0200 | [diff] [blame] | 1193 | An email address, or `preferred` for the preferred email address of the |
| 1194 | user. |
Edwin Kempin | 493efd5 | 2013-05-16 13:32:17 +0200 | [diff] [blame] | 1195 | |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 1196 | [[username]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1197 | === \{username\} |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 1198 | The user name. |
| 1199 | |
Edwin Kempin | c6824ee | 2013-05-29 16:18:39 +0200 | [diff] [blame] | 1200 | [[ssh-key-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1201 | === \{ssh-key-id\} |
Edwin Kempin | c6824ee | 2013-05-29 16:18:39 +0200 | [diff] [blame] | 1202 | The sequence number of the SSH key. |
| 1203 | |
Edwin Kempin | f502dd0 | 2013-02-14 14:22:25 +0100 | [diff] [blame] | 1204 | |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 1205 | [[json-entities]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1206 | == JSON Entities |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 1207 | |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 1208 | [[account-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1209 | === AccountInfo |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 1210 | The `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 Kempin | a13c5b8 | 2013-10-16 14:14:54 +0200 | [diff] [blame] | 1217 | Only set if link:rest-api-changes.html#detailed-accounts[detailed |
| 1218 | account information] is requested. |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 1219 | |`email` |optional| |
| 1220 | The email address the user prefers to be contacted through. + |
Edwin Kempin | a13c5b8 | 2013-10-16 14:14:54 +0200 | [diff] [blame] | 1221 | Only set if link:rest-api-changes.html#detailed-accounts[detailed |
| 1222 | account information] is requested. |
James Ring | 8e34272 | 2013-05-01 01:40:53 -0700 | [diff] [blame] | 1223 | |`username` |optional|The username of the user. + |
Edwin Kempin | a13c5b8 | 2013-10-16 14:14:54 +0200 | [diff] [blame] | 1224 | Only set if link:rest-api-changes.html#detailed-accounts[detailed |
| 1225 | account information] is requested. |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 1226 | |=========================== |
| 1227 | |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 1228 | [[account-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1229 | === AccountInput |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 1230 | The `AccountInput` entity contains information for the creation of |
| 1231 | a new account. |
| 1232 | |
| 1233 | [options="header",width="50%",cols="1,^2,4"] |
| 1234 | |============================ |
| 1235 | |Field Name ||Description |
| 1236 | |`username` |optional| |
| 1237 | The 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| |
| 1243 | A list of link:rest-api-groups.html#group-id[group IDs] that identify |
| 1244 | the groups to which the user should be added. |
| 1245 | |============================ |
| 1246 | |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 1247 | [[account-name-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1248 | === AccountNameInput |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 1249 | The `AccountNameInput` entity contains information for setting a name |
| 1250 | for 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. + |
| 1256 | If not set or if set to an empty string, the account name is deleted. |
| 1257 | |============================= |
| 1258 | |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 1259 | [[capability-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1260 | === CapabilityInfo |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 1261 | The `CapabilityInfo` entity contains information about the global |
| 1262 | capabilities of a user. |
| 1263 | |
| 1264 | [options="header",width="50%",cols="1,^1,5"] |
| 1265 | |================================= |
| 1266 | |Field Name ||Description |
Edwin Kempin | 8f489a4 | 2013-11-15 16:26:51 +0100 | [diff] [blame] | 1267 | |`accessDatabase` |not set if `false`|Whether the user has the |
| 1268 | link:access-control.html#capability_accessDatabase[Access Database] |
| 1269 | capability. |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 1270 | |`administrateServer`|not set if `false`|Whether the user has the |
| 1271 | link:access-control.html#capability_administrateServer[Administrate |
| 1272 | Server] capability. |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 1273 | |`createAccount` |not set if `false`|Whether the user has the |
| 1274 | link:access-control.html#capability_createAccount[Create Account] |
| 1275 | capability. |
| 1276 | |`createGroup` |not set if `false`|Whether the user has the |
| 1277 | link:access-control.html#capability_createGroup[Create Group] |
| 1278 | capability. |
| 1279 | |`createProject` |not set if `false`|Whether the user has the |
| 1280 | link:access-control.html#capability_createProject[Create Project] |
| 1281 | capability. |
| 1282 | |`emailReviewers` |not set if `false`|Whether the user has the |
| 1283 | link:access-control.html#capability_emailReviewers[Email Reviewers] |
| 1284 | capability. |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 1285 | |`flushCaches` |not set if `false`|Whether the user has the |
| 1286 | link:access-control.html#capability_flushCaches[Flush Caches] |
| 1287 | capability. |
Edwin Kempin | 8f489a4 | 2013-11-15 16:26:51 +0100 | [diff] [blame] | 1288 | |`killTask` |not set if `false`|Whether the user has the |
| 1289 | link:access-control.html#capability_kill[Kill Task] capability. |
| 1290 | |`priority` |not set if `INTERACTIVE`|The name of the thread |
| 1291 | pool used by the user, see link:access-control.html#capability_priority[ |
| 1292 | Priority] capability. |
| 1293 | |`queryLimit` ||The link:access-control.html#capability_queryLimit[ |
| 1294 | Query Limit] of the user as link:#query-limit-info[QueryLimitInfo]. |
| 1295 | |`runAs` |not set if `false`|Whether the user has the |
| 1296 | link:access-control.html#capability_runAs[Run As] capability. |
| 1297 | |`runGC` |not set if `false`|Whether the user has the |
| 1298 | link:access-control.html#capability_runGC[Run Garbage Collection] |
| 1299 | capability. |
| 1300 | |`streamEvents` |not set if `false`|Whether the user has the |
| 1301 | link:access-control.html#capability_streamEvents[Stream Events] |
| 1302 | capability. |
Dave Borowitz | f3548a9 | 2014-02-20 11:02:19 -0800 | [diff] [blame] | 1303 | |`viewAllAccounts` |not set if `false`|Whether the user has the |
| 1304 | link:access-control.html#capability_viewAllAccounts[View All Accounts] |
| 1305 | capability. |
Edwin Kempin | 8f489a4 | 2013-11-15 16:26:51 +0100 | [diff] [blame] | 1306 | |`viewCaches` |not set if `false`|Whether the user has the |
| 1307 | link:access-control.html#capability_viewCaches[View Caches] capability. |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 1308 | |`viewConnections` |not set if `false`|Whether the user has the |
| 1309 | link:access-control.html#capability_viewConnections[View Connections] |
| 1310 | capability. |
Edwin Kempin | 362b14d1 | 2014-05-09 14:18:12 +0200 | [diff] [blame] | 1311 | |`viewPlugins` |not set if `false`|Whether the user has the |
| 1312 | link:access-control.html#capability_viewPlugins[View Plugins] capability. |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 1313 | |`viewQueue` |not set if `false`|Whether the user has the |
| 1314 | link:access-control.html#capability_viewQueue[View Queue] capability. |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 1315 | |================================= |
| 1316 | |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1317 | [[preferences-info]] |
| 1318 | === PreferencesInfo |
| 1319 | The `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` || |
| 1325 | The number of changes to show on each page. |
| 1326 | Allowed values are `10`, `25`, `50`, `100`. |
| 1327 | |`show_site_header` |not set if `false`| |
| 1328 | Whether the site header should be shown. |
| 1329 | |`use_flash_clipboard` |not set if `false`| |
| 1330 | Whether to use the flash clipboard widget. |
| 1331 | |`download_scheme` || |
| 1332 | The type of download URL the user prefers to use. |
| 1333 | |`download_command` || |
| 1334 | The type of download command the user prefers to use. |
| 1335 | |`copy_self_on_email` |not set if `false`| |
| 1336 | Whether to CC me on comments I write. |
| 1337 | |`date_format` || |
| 1338 | The format to display the date in. |
| 1339 | Allowed values are `STD`, `US`, `ISO`, `EURO`, `UK`. |
| 1340 | |`time_format` || |
| 1341 | The format to display the time in. |
| 1342 | Allowed values are `HHMM_12`, `HHMM_24`. |
| 1343 | |`reverse_patch_set_order` |not set if `false`| |
| 1344 | Whether to display the patch sets in reverse order. |
| 1345 | |`relative_date_in_change_table` |not set if `false`| |
| 1346 | Whether to show relative dates in the changes table. |
| 1347 | |`size_bar_in_change_table` |not set if `false`| |
| 1348 | Whether to show the change sizes as colored bars in the change table. |
| 1349 | |`legacycid_in_change_table` |not set if `false`| |
| 1350 | Whether to show change number in the change table. |
| 1351 | |`review_category_strategy` || |
| 1352 | The strategy used to displayed info in the review category column. |
David Pursehouse | 347216e | 2014-07-11 15:57:44 +0900 | [diff] [blame] | 1353 | Allowed values are `NONE`, `NAME`, `EMAIL`, `USERNAME`, `ABBREV`. |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1354 | |`comment_visibility_strategy` || |
| 1355 | The strategy used to display the comments. |
| 1356 | Allowed values are `COLLAPSE_ALL`, `EXPAND_MOST_RECENT`, `EXPAND_RECENT`, `EXPAND_ALL`. |
| 1357 | |`diff_view` || |
| 1358 | The type of diff view to show. |
| 1359 | Allowed values are `SIDE_BY_SIDE`, `UNIFIED_DIFF`. |
| 1360 | |`change_screen` || |
| 1361 | The change screen to use. |
| 1362 | Allowed values are `OLD_UI`, `CHANGE_SCREEN2`. |
| 1363 | |===================================== |
| 1364 | |
| 1365 | [[preferences-input]] |
| 1366 | === PreferencesInput |
| 1367 | The `PreferencesInput` entity contains information for setting the |
| 1368 | user 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| |
| 1374 | The number of changes to show on each page. |
| 1375 | Allowed values are `10`, `25`, `50`, `100`. |
| 1376 | |`show_site_header` |optional| |
| 1377 | Whether the site header should be shown. |
| 1378 | |`use_flash_clipboard` |optional| |
| 1379 | Whether to use the flash clipboard widget. |
| 1380 | |`download_scheme` |optional| |
| 1381 | The type of download URL the user prefers to use. |
| 1382 | |`download_command` |optional| |
| 1383 | The type of download command the user prefers to use. |
| 1384 | |`copy_self_on_email` |optional| |
| 1385 | Whether to CC me on comments I write. |
| 1386 | |`date_format` |optional| |
| 1387 | The format to display the date in. |
| 1388 | Allowed values are `STD`, `US`, `ISO`, `EURO`, `UK`. |
| 1389 | |`time_format` |optional| |
| 1390 | The format to display the time in. |
| 1391 | Allowed values are `HHMM_12`, `HHMM_24`. |
| 1392 | |`reverse_patch_set_order` |optional| |
| 1393 | Whether to display the patch sets in reverse order. |
| 1394 | |`relative_date_in_change_table` |optional| |
| 1395 | Whether to show relative dates in the changes table. |
| 1396 | |`size_bar_in_change_table` |optional| |
| 1397 | Whether to show the change sizes as colored bars in the change table. |
| 1398 | |`legacycid_in_change_table` |optional| |
| 1399 | Whether to show change number in the change table. |
| 1400 | |`review_category_strategy` |optional| |
| 1401 | The strategy used to displayed info in the review category column. |
David Pursehouse | 347216e | 2014-07-11 15:57:44 +0900 | [diff] [blame] | 1402 | Allowed values are `NONE`, `NAME`, `EMAIL`, `USERNAME`, `ABBREV`. |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1403 | |`comment_visibility_strategy` |optional| |
| 1404 | The strategy used to display the comments. |
| 1405 | Allowed values are `COLLAPSE_ALL`, `EXPAND_MOST_RECENT`, `EXPAND_RECENT`, `EXPAND_ALL`. |
| 1406 | |`diff_view` |optional| |
| 1407 | The type of diff view to show. |
| 1408 | Allowed values are `SIDE_BY_SIDE`, `UNIFIED_DIFF`. |
| 1409 | |`change_screen` |optional| |
| 1410 | The change screen to use. |
| 1411 | Allowed values are `OLD_UI`, `CHANGE_SCREEN2`. |
| 1412 | |===================================== |
| 1413 | |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1414 | [[diff-preferences-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1415 | === DiffPreferencesInfo |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1416 | The `DiffPreferencesInfo` entity contains information about the diff |
| 1417 | preferences of a user. |
| 1418 | |
| 1419 | [options="header",width="50%",cols="1,^1,5"] |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1420 | |=========================================== |
| 1421 | |Field Name ||Description |
| 1422 | |`context` || |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1423 | The number of lines of context when viewing a patch. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1424 | |`expand_all_comments` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1425 | Whether all inline comments should be automatically expanded. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1426 | |`ignore_whitespace` || |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1427 | Whether whitespace changes should be ignored and if yes, which |
| 1428 | whitespace changes should be ignored. + |
| 1429 | Allowed values are `IGNORE_NONE`, `IGNORE_SPACE_AT_EOL`, |
| 1430 | `IGNORE_SPACE_CHANGE`, `IGNORE_ALL_SPACE`. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1431 | |`intraline_difference` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1432 | Whether intraline differences should be highlighted. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1433 | |`line_length` || |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1434 | Number of characters that should be displayed in one line. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1435 | |`manual_review` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1436 | Whether the 'Reviewed' flag should not be set automatically on a patch |
| 1437 | when it is viewed. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1438 | |`retain_header` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1439 | Whether the header that is displayed above the patch (that either shows |
| 1440 | the commit message, the diff preferences, the patch sets or the files) |
| 1441 | should be retained on file switch. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1442 | |`show_line_endings` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1443 | Whether Windows EOL/Cr-Lf should be displayed as '\r' in a dotted-line |
| 1444 | box. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1445 | |`show_tabs` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1446 | Whether tabs should be shown. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1447 | |`show_whitespace_errors` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1448 | Whether whitespace errors should be shown. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1449 | |`skip_deleted` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1450 | Whether deleted files should be skipped on file switch. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1451 | |`skip_uncommented` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1452 | Whether uncommented files should be skipped on file switch. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1453 | |`syntax_highlighting` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1454 | Whether syntax highlighting should be enabled. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1455 | |`hide_top_menu` |not set if `false`| |
Shawn Pearce | ba312d2e | 2013-12-12 16:36:03 -0800 | [diff] [blame] | 1456 | If true the top menu header and site header is hidden. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1457 | |`auto_hide_diff_table_header` |not set if `false`| |
| 1458 | If true the diff table header is automatically hidden when |
| 1459 | scrolling down more than half of a page. |
| 1460 | |`hide_line_numbers` |not set if `false`| |
Shawn Pearce | ba312d2e | 2013-12-12 16:36:03 -0800 | [diff] [blame] | 1461 | If true the line numbers are hidden. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1462 | |`tab_size` || |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1463 | Number of spaces that should be used to display one tab. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1464 | |=========================================== |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1465 | |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1466 | [[diff-preferences-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1467 | === DiffPreferencesInput |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1468 | The `DiffPreferencesInput` entity contains information for setting the |
| 1469 | diff preferences of a user. Fields which are not set will not be |
| 1470 | updated. |
| 1471 | |
| 1472 | [options="header",width="50%",cols="1,^1,5"] |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1473 | |=========================================== |
| 1474 | |Field Name ||Description |
| 1475 | |`context` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1476 | The number of lines of context when viewing a patch. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1477 | |`expand_all_comments` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1478 | Whether all inline comments should be automatically expanded. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1479 | |`ignore_whitespace` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1480 | Whether whitespace changes should be ignored and if yes, which |
| 1481 | whitespace changes should be ignored. + |
| 1482 | Allowed values are `IGNORE_NONE`, `IGNORE_SPACE_AT_EOL`, |
| 1483 | `IGNORE_SPACE_CHANGE`, `IGNORE_ALL_SPACE`. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1484 | |`intraline_difference` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1485 | Whether intraline differences should be highlighted. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1486 | |`line_length` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1487 | Number of characters that should be displayed in one line. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1488 | |`manual_review` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1489 | Whether the 'Reviewed' flag should not be set automatically on a patch |
| 1490 | when it is viewed. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1491 | |`retain_header` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1492 | Whether the header that is displayed above the patch (that either shows |
| 1493 | the commit message, the diff preferences, the patch sets or the files) |
| 1494 | should be retained on file switch. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1495 | |`show_line_endings` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1496 | Whether Windows EOL/Cr-Lf should be displayed as '\r' in a dotted-line |
| 1497 | box. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1498 | |`show_tabs` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1499 | Whether tabs should be shown. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1500 | |`show_whitespace_errors` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1501 | Whether whitespace errors should be shown. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1502 | |`skip_deleted` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1503 | Whether deleted files should be skipped on file switch. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1504 | |`skip_uncommented` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1505 | Whether uncommented files should be skipped on file switch. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1506 | |`syntax_highlighting` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1507 | Whether syntax highlighting should be enabled. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1508 | |`hide_top_menu` |optional| |
Shawn Pearce | ba312d2e | 2013-12-12 16:36:03 -0800 | [diff] [blame] | 1509 | True if the top menu header and site header should be hidden. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1510 | |`auto_hide_diff_table_header` |optional| |
| 1511 | True if the diff table header is automatically hidden when |
| 1512 | scrolling down more than half of a page. |
| 1513 | |`hide_line_numbers` |optional| |
Shawn Pearce | ba312d2e | 2013-12-12 16:36:03 -0800 | [diff] [blame] | 1514 | True if the line numbers should be hidden. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1515 | |`tab_size` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1516 | Number of spaces that should be used to display one tab. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 1517 | |=========================================== |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1518 | |
Edwin Kempin | a1be4c2 | 2013-05-16 13:00:11 +0200 | [diff] [blame] | 1519 | [[email-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1520 | === EmailInfo |
Edwin Kempin | a1be4c2 | 2013-05-16 13:00:11 +0200 | [diff] [blame] | 1521 | The `EmailInfo` entity contains information about an email address of a |
| 1522 | user. |
| 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`| |
| 1529 | Whether this is the preferred email address of the user. |
Shawn Pearce | 3982088 | 2013-05-23 08:00:58 -0700 | [diff] [blame] | 1530 | |`pending_confirmation`|not set if `false`| |
| 1531 | Set true if the user must confirm control of the email address |
| 1532 | by following a verification link before Gerrit will permit use of |
| 1533 | this address. |
Edwin Kempin | a1be4c2 | 2013-05-16 13:00:11 +0200 | [diff] [blame] | 1534 | |======================== |
| 1535 | |
Edwin Kempin | 3f48c24 | 2013-05-17 10:55:07 +0200 | [diff] [blame] | 1536 | [[email-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1537 | === EmailInput |
Edwin Kempin | 3f48c24 | 2013-05-17 10:55:07 +0200 | [diff] [blame] | 1538 | The `EmailInput` entity contains information for registering a new |
| 1539 | email address. |
| 1540 | |
| 1541 | [options="header",width="50%",cols="1,^1,5"] |
Edwin Kempin | c99e5a6 | 2013-05-17 11:21:27 +0200 | [diff] [blame] | 1542 | |============================== |
| 1543 | |Field Name ||Description |
| 1544 | |`email` || |
Edwin Kempin | 3f48c24 | 2013-05-17 10:55:07 +0200 | [diff] [blame] | 1545 | The email address. If provided, must match the email address from the |
| 1546 | URL. |
Edwin Kempin | c99e5a6 | 2013-05-17 11:21:27 +0200 | [diff] [blame] | 1547 | |`preferred` |`false` if not set| |
Edwin Kempin | 3f48c24 | 2013-05-17 10:55:07 +0200 | [diff] [blame] | 1548 | Whether the new email address should become the preferred email address |
Edwin Kempin | 4c454e6 | 2013-05-27 11:21:55 +0200 | [diff] [blame] | 1549 | of the user (only supported if `no_confirmation` is set or if the |
| 1550 | authentication type is `DEVELOPMENT_BECOME_ANY_ACCOUNT`). |
Edwin Kempin | c99e5a6 | 2013-05-17 11:21:27 +0200 | [diff] [blame] | 1551 | |`no_confirmation`|`false` if not set| |
| 1552 | Whether the email address should be added without confirmation. In this |
| 1553 | case no verification email is sent to the user. + |
| 1554 | Only Gerrit administrators are allowed to add email addresses without |
| 1555 | confirmation. |
| 1556 | |============================== |
Edwin Kempin | 3f48c24 | 2013-05-17 10:55:07 +0200 | [diff] [blame] | 1557 | |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 1558 | [[http-password-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1559 | === HttpPasswordInput |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 1560 | The `HttpPasswordInput` entity contains information for setting/generating |
| 1561 | an HTTP password. |
| 1562 | |
| 1563 | [options="header",width="50%",cols="1,^1,5"] |
| 1564 | |============================ |
| 1565 | |Field Name ||Description |
| 1566 | |`generate` |`false` if not set| |
| 1567 | Whether a new HTTP password should be generated |
| 1568 | |`http_password`|optional| |
| 1569 | The new HTTP password. Only Gerrit administrators may set the HTTP |
| 1570 | password directly. + |
| 1571 | If empty or not set and `generate` is false or not set, the HTTP |
| 1572 | password is deleted. |
| 1573 | |============================ |
| 1574 | |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 1575 | [[query-limit-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1576 | === QueryLimitInfo |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 1577 | The `QueryLimitInfo` entity contains information about the |
| 1578 | link: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 Kempin | ebccb84 | 2013-05-29 13:33:06 +0200 | [diff] [blame] | 1587 | [[ssh-key-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1588 | === SshKeyInfo |
Edwin Kempin | ebccb84 | 2013-05-29 13:33:06 +0200 | [diff] [blame] | 1589 | The `SshKeyInfo` entity contains information about an SSH key of a |
| 1590 | user. |
| 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 Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 1603 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1604 | GERRIT |
| 1605 | ------ |
| 1606 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 1607 | |
| 1608 | SEARCHBOX |
| 1609 | --------- |