Marian Harbach | ebeb154 | 2019-12-13 10:42:46 +0100 | [diff] [blame] | 1 | :linkattrs: |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2 | = Gerrit Code Review - /accounts/ REST API |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 3 | |
| 4 | This page describes the account related REST endpoints. |
| 5 | Please also take note of the general information on the |
| 6 | link:rest-api.html[REST API]. |
| 7 | |
Edwin Kempin | 90af548 | 2013-09-03 10:47:14 +0200 | [diff] [blame] | 8 | [[account-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 9 | == Account Endpoints |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 10 | |
Edwin Kempin | c236140 | 2016-06-30 11:33:47 +0200 | [diff] [blame] | 11 | [[query-account]] |
| 12 | === Query Account |
Shawn Pearce | 3f4fe61 | 2014-12-26 19:37:07 -0500 | [diff] [blame] | 13 | -- |
| 14 | 'GET /accounts/' |
| 15 | -- |
| 16 | |
Edwin Kempin | c236140 | 2016-06-30 11:33:47 +0200 | [diff] [blame] | 17 | Queries accounts visible to the caller. The |
| 18 | link:user-search-accounts.html#_search_operators[query string] must be |
| 19 | provided by the `q` parameter. The `n` parameter can be used to limit |
| 20 | the returned results. |
| 21 | |
| 22 | As result a list of link:#account-info[AccountInfo] entities is |
| 23 | returned. |
Shawn Pearce | 3f4fe61 | 2014-12-26 19:37:07 -0500 | [diff] [blame] | 24 | |
| 25 | .Request |
| 26 | ---- |
Edwin Kempin | 7bb93e4 | 2016-06-30 15:29:05 +0200 | [diff] [blame] | 27 | GET /accounts/?q=name:John+email:example.com&n=2 HTTP/1.0 |
Edwin Kempin | c236140 | 2016-06-30 11:33:47 +0200 | [diff] [blame] | 28 | ---- |
| 29 | |
| 30 | .Response |
| 31 | ---- |
| 32 | HTTP/1.1 200 OK |
| 33 | Content-Disposition: attachment |
| 34 | Content-Type: application/json; charset=UTF-8 |
| 35 | |
| 36 | )]}' |
| 37 | [ |
| 38 | { |
| 39 | "_account_id": 1000096, |
Edwin Kempin | c236140 | 2016-06-30 11:33:47 +0200 | [diff] [blame] | 40 | }, |
| 41 | { |
| 42 | "_account_id": 1001439, |
Edwin Kempin | 7bb93e4 | 2016-06-30 15:29:05 +0200 | [diff] [blame] | 43 | "_more_accounts": true |
Edwin Kempin | c236140 | 2016-06-30 11:33:47 +0200 | [diff] [blame] | 44 | } |
| 45 | ] |
| 46 | ---- |
| 47 | |
Edwin Kempin | 7bb93e4 | 2016-06-30 15:29:05 +0200 | [diff] [blame] | 48 | If the number of accounts matching the query exceeds either the |
| 49 | internal limit or a supplied `n` query parameter, the last account |
| 50 | object has a `_more_accounts: true` JSON field set. |
| 51 | |
Edwin Kempin | 6115eae | 2016-06-30 14:21:19 +0200 | [diff] [blame] | 52 | The `S` or `start` query parameter can be supplied to skip a number |
| 53 | of accounts from the list. |
| 54 | |
Edwin Kempin | 4ae4d61 | 2020-05-13 14:35:02 +0200 | [diff] [blame] | 55 | [[query-options]] |
Edwin Kempin | 2e8e9dc | 2016-07-01 11:03:57 +0200 | [diff] [blame] | 56 | Additional fields can be obtained by adding `o` parameters, each |
| 57 | option slows down the query response time to the client so they are |
| 58 | generally disabled by default. Optional fields are: |
| 59 | |
| 60 | [[details]] |
| 61 | -- |
Ben Rohlfs | 9c960cb | 2020-02-02 22:12:30 +0100 | [diff] [blame] | 62 | * `DETAILS`: Includes full name, preferred email, username, display |
Patrick Hiesel | 90d26fd | 2020-08-07 16:15:54 +0200 | [diff] [blame] | 63 | name, avatars, status, state and tags for each account. |
Edwin Kempin | 2e8e9dc | 2016-07-01 11:03:57 +0200 | [diff] [blame] | 64 | -- |
| 65 | |
Edwin Kempin | 2eadde4 | 2016-07-01 13:33:32 +0200 | [diff] [blame] | 66 | [[all-emails]] |
| 67 | -- |
Edwin Kempin | ed77716 | 2017-11-15 08:23:40 -0800 | [diff] [blame] | 68 | * `ALL_EMAILS`: Includes all registered emails. Requires the caller |
| 69 | to have the link:access-control.html#capability_modifyAccount[Modify |
| 70 | Account] global capability. |
Edwin Kempin | 2eadde4 | 2016-07-01 13:33:32 +0200 | [diff] [blame] | 71 | -- |
| 72 | |
Edwin Kempin | c236140 | 2016-06-30 11:33:47 +0200 | [diff] [blame] | 73 | [[suggest-account]] |
| 74 | To get account suggestions set the parameter `suggest` and provide the |
| 75 | typed substring as query `q`. If a result limit `n` is not specified, |
| 76 | then the default 10 is used. |
| 77 | |
Edwin Kempin | 2eadde4 | 2016-07-01 13:33:32 +0200 | [diff] [blame] | 78 | For account suggestions link:#details[account details] and |
| 79 | link:#all-emails[all emails] are always returned. |
Edwin Kempin | 2e8e9dc | 2016-07-01 11:03:57 +0200 | [diff] [blame] | 80 | |
Edwin Kempin | c236140 | 2016-06-30 11:33:47 +0200 | [diff] [blame] | 81 | .Request |
| 82 | ---- |
| 83 | GET /accounts/?suggest&q=John HTTP/1.0 |
Shawn Pearce | 3f4fe61 | 2014-12-26 19:37:07 -0500 | [diff] [blame] | 84 | ---- |
| 85 | |
Edwin Kempin | ed77716 | 2017-11-15 08:23:40 -0800 | [diff] [blame] | 86 | Secondary emails are only included if the calling user has the |
| 87 | link:access-control.html#capability_modifyAccount[Modify Account] |
| 88 | capability. |
| 89 | |
Shawn Pearce | 3f4fe61 | 2014-12-26 19:37:07 -0500 | [diff] [blame] | 90 | .Response |
| 91 | ---- |
| 92 | HTTP/1.1 200 OK |
| 93 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 94 | Content-Type: application/json; charset=UTF-8 |
Shawn Pearce | 3f4fe61 | 2014-12-26 19:37:07 -0500 | [diff] [blame] | 95 | |
| 96 | )]}' |
| 97 | [ |
| 98 | { |
| 99 | "_account_id": 1000096, |
| 100 | "name": "John Doe", |
| 101 | "email": "john.doe@example.com", |
| 102 | "username": "john" |
Ben Rohlfs | 9c960cb | 2020-02-02 22:12:30 +0100 | [diff] [blame] | 103 | "display_name": "John D" |
Shawn Pearce | 3f4fe61 | 2014-12-26 19:37:07 -0500 | [diff] [blame] | 104 | }, |
| 105 | { |
| 106 | "_account_id": 1001439, |
| 107 | "name": "John Smith", |
| 108 | "email": "john.smith@example.com", |
| 109 | "username": "jsmith" |
Ben Rohlfs | 9c960cb | 2020-02-02 22:12:30 +0100 | [diff] [blame] | 110 | "display_name": "Johnny" |
Shawn Pearce | 3f4fe61 | 2014-12-26 19:37:07 -0500 | [diff] [blame] | 111 | }, |
| 112 | ] |
| 113 | ---- |
| 114 | |
Edwin Kempin | 431873e | 2013-03-20 15:17:54 +0100 | [diff] [blame] | 115 | [[get-account]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 116 | === Get Account |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 117 | -- |
Edwin Kempin | 431873e | 2013-03-20 15:17:54 +0100 | [diff] [blame] | 118 | 'GET /accounts/link:#account-id[\{account-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 119 | -- |
Edwin Kempin | 431873e | 2013-03-20 15:17:54 +0100 | [diff] [blame] | 120 | |
| 121 | Returns an account as an link:#account-info[AccountInfo] entity. |
| 122 | |
| 123 | .Request |
| 124 | ---- |
| 125 | GET /accounts/self HTTP/1.0 |
| 126 | ---- |
| 127 | |
| 128 | .Response |
| 129 | ---- |
| 130 | HTTP/1.1 200 OK |
| 131 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 132 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 431873e | 2013-03-20 15:17:54 +0100 | [diff] [blame] | 133 | |
| 134 | )]}' |
| 135 | { |
| 136 | "_account_id": 1000096, |
| 137 | "name": "John Doe", |
James Ring | 8e34272 | 2013-05-01 01:40:53 -0700 | [diff] [blame] | 138 | "email": "john.doe@example.com", |
| 139 | "username": "john" |
Ben Rohlfs | 9c960cb | 2020-02-02 22:12:30 +0100 | [diff] [blame] | 140 | "display_name": "Super John" |
Edwin Kempin | 431873e | 2013-03-20 15:17:54 +0100 | [diff] [blame] | 141 | } |
| 142 | ---- |
| 143 | |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 144 | [[create-account]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 145 | === Create Account |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 146 | -- |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 147 | 'PUT /accounts/link:#username[\{username\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 148 | -- |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 149 | |
| 150 | Creates a new account. |
| 151 | |
| 152 | In the request body additional data for the account can be provided as |
| 153 | link:#account-input[AccountInput]. |
| 154 | |
| 155 | .Request |
| 156 | ---- |
| 157 | PUT /accounts/john HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 158 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 159 | |
| 160 | { |
| 161 | "name": "John Doe", |
Ben Rohlfs | 9c960cb | 2020-02-02 22:12:30 +0100 | [diff] [blame] | 162 | "display_name": "Super John", |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 163 | "email": "john.doe@example.com", |
| 164 | "ssh_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw==", |
| 165 | "http_password": "19D9aIn7zePb", |
| 166 | "groups": [ |
| 167 | "MyProject-Owners" |
| 168 | ] |
| 169 | } |
| 170 | ---- |
| 171 | |
| 172 | As response a detailed link:#account-info[AccountInfo] entity is |
| 173 | returned that describes the created account. |
| 174 | |
| 175 | .Response |
| 176 | ---- |
| 177 | HTTP/1.1 201 Created |
| 178 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 179 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 180 | |
| 181 | )]}' |
| 182 | { |
| 183 | "_account_id": 1000195, |
| 184 | "name": "John Doe", |
| 185 | "email": "john.doe@example.com" |
| 186 | } |
| 187 | ---- |
| 188 | |
Edwin Kempin | cf77a69 | 2015-07-28 11:02:40 +0200 | [diff] [blame] | 189 | [[get-detail]] |
| 190 | === Get Account Details |
| 191 | -- |
| 192 | 'GET /accounts/link:#account-id[\{account-id\}]/detail' |
| 193 | -- |
| 194 | |
Sebastian Schuberth | e3d2d83 | 2016-01-14 09:47:39 +0100 | [diff] [blame] | 195 | Retrieves the details of an account as an link:#account-detail-info[ |
Edwin Kempin | cf77a69 | 2015-07-28 11:02:40 +0200 | [diff] [blame] | 196 | AccountDetailInfo] entity. |
| 197 | |
| 198 | .Request |
| 199 | ---- |
| 200 | GET /accounts/self/detail HTTP/1.0 |
| 201 | ---- |
| 202 | |
| 203 | .Response |
| 204 | ---- |
| 205 | HTTP/1.1 200 OK |
| 206 | Content-Disposition: attachment |
| 207 | Content-Type: application/json; charset=UTF-8 |
| 208 | |
| 209 | )]}' |
| 210 | { |
| 211 | "registered_on": "2015-07-23 07:01:09.296000000", |
| 212 | "_account_id": 1000096, |
| 213 | "name": "John Doe", |
| 214 | "email": "john.doe@example.com", |
| 215 | "username": "john" |
Ben Rohlfs | 9c960cb | 2020-02-02 22:12:30 +0100 | [diff] [blame] | 216 | "display_name": "Super John" |
Edwin Kempin | cf77a69 | 2015-07-28 11:02:40 +0200 | [diff] [blame] | 217 | } |
| 218 | ---- |
| 219 | |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 220 | [[get-account-name]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 221 | === Get Account Name |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 222 | -- |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 223 | 'GET /accounts/link:#account-id[\{account-id\}]/name' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 224 | -- |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 225 | |
| 226 | Retrieves the full name of an account. |
| 227 | |
| 228 | .Request |
| 229 | ---- |
| 230 | GET /accounts/self/name HTTP/1.0 |
| 231 | ---- |
| 232 | |
| 233 | .Response |
| 234 | ---- |
| 235 | HTTP/1.1 200 OK |
| 236 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 237 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 238 | |
| 239 | )]}' |
| 240 | "John Doe" |
| 241 | ---- |
| 242 | |
| 243 | If the account does not have a name an empty string is returned. |
| 244 | |
| 245 | [[set-account-name]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 246 | === Set Account Name |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 247 | -- |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 248 | 'PUT /accounts/link:#account-id[\{account-id\}]/name' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 249 | -- |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 250 | |
| 251 | Sets the full name of an account. |
| 252 | |
| 253 | The new account name must be provided in the request body inside |
David Pursehouse | 3af5699 | 2014-02-21 12:30:53 +0900 | [diff] [blame] | 254 | an link:#account-name-input[AccountNameInput] entity. |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 255 | |
| 256 | .Request |
| 257 | ---- |
| 258 | PUT /accounts/self/name HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 259 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 260 | |
| 261 | { |
| 262 | "name": "John F. Doe" |
| 263 | } |
| 264 | ---- |
| 265 | |
| 266 | As response the new account name is returned. |
| 267 | |
| 268 | .Response |
| 269 | ---- |
| 270 | HTTP/1.1 200 OK |
| 271 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 272 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 273 | |
| 274 | )]}' |
| 275 | "John F. Doe" |
| 276 | ---- |
| 277 | |
| 278 | If the name was deleted the response is "`204 No Content`". |
| 279 | |
| 280 | Some realms may not allow to modify the account name. In this case the |
| 281 | request is rejected with "`405 Method Not Allowed`". |
| 282 | |
| 283 | [[delete-account-name]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 284 | === Delete Account Name |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 285 | -- |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 286 | 'DELETE /accounts/link:#account-id[\{account-id\}]/name' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 287 | -- |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 288 | |
| 289 | Deletes the name of an account. |
| 290 | |
| 291 | .Request |
| 292 | ---- |
| 293 | DELETE /accounts/self/name HTTP/1.0 |
| 294 | ---- |
| 295 | |
| 296 | .Response |
| 297 | ---- |
| 298 | HTTP/1.1 204 No Content |
| 299 | ---- |
| 300 | |
Kasper Nilsson | eb64a0a | 2017-01-27 13:51:07 -0800 | [diff] [blame] | 301 | [[get-account-status]] |
| 302 | === Get Account Status |
| 303 | -- |
| 304 | 'GET /accounts/link:#account-id[\{account-id\}]/status' |
| 305 | -- |
| 306 | |
| 307 | Retrieves the status of an account. |
| 308 | |
| 309 | .Request |
| 310 | ---- |
| 311 | GET /accounts/self/status HTTP/1.0 |
| 312 | ---- |
| 313 | |
| 314 | .Response |
| 315 | ---- |
| 316 | HTTP/1.1 200 OK |
| 317 | Content-Disposition: attachment |
| 318 | Content-Type: application/json; charset=UTF-8 |
| 319 | |
| 320 | )]}' |
| 321 | "Available" |
| 322 | ---- |
| 323 | |
| 324 | If the account does not have a status an empty string is returned. |
| 325 | |
| 326 | [[set-account-status]] |
| 327 | === Set Account Status |
| 328 | -- |
| 329 | 'PUT /accounts/link:#account-id[\{account-id\}]/status' |
| 330 | -- |
| 331 | |
| 332 | Sets the status of an account. |
| 333 | |
| 334 | The new account status must be provided in the request body inside |
| 335 | an link:#account-status-input[AccountStatusInput] entity. |
| 336 | |
| 337 | .Request |
| 338 | ---- |
| 339 | PUT /accounts/self/status HTTP/1.0 |
| 340 | Content-Type: application/json; charset=UTF-8 |
| 341 | |
| 342 | { |
| 343 | "status": "Out Of Office" |
| 344 | } |
| 345 | ---- |
| 346 | |
| 347 | As response the new account status is returned. |
| 348 | |
| 349 | .Response |
| 350 | ---- |
| 351 | HTTP/1.1 200 OK |
| 352 | Content-Disposition: attachment |
| 353 | Content-Type: application/json; charset=UTF-8 |
| 354 | |
| 355 | )]}' |
| 356 | "Out Of Office" |
| 357 | ---- |
| 358 | |
| 359 | If the name was deleted the response is "`204 No Content`". |
| 360 | |
Edwin Kempin | 9f9ec65 | 2013-06-04 08:28:15 +0200 | [diff] [blame] | 361 | [[get-username]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 362 | === Get Username |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 363 | -- |
Edwin Kempin | 9f9ec65 | 2013-06-04 08:28:15 +0200 | [diff] [blame] | 364 | 'GET /accounts/link:#account-id[\{account-id\}]/username' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 365 | -- |
Edwin Kempin | 9f9ec65 | 2013-06-04 08:28:15 +0200 | [diff] [blame] | 366 | |
| 367 | Retrieves the username of an account. |
| 368 | |
| 369 | .Request |
| 370 | ---- |
| 371 | GET /accounts/self/username HTTP/1.0 |
| 372 | ---- |
| 373 | |
| 374 | .Response |
| 375 | ---- |
| 376 | HTTP/1.1 200 OK |
| 377 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 378 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 9f9ec65 | 2013-06-04 08:28:15 +0200 | [diff] [blame] | 379 | |
| 380 | )]}' |
| 381 | "john.doe" |
| 382 | ---- |
| 383 | |
David Pursehouse | 10829f64 | 2015-01-21 11:42:32 +0900 | [diff] [blame] | 384 | If the account does not have a username the response is "`404 Not Found`". |
Edwin Kempin | 9f9ec65 | 2013-06-04 08:28:15 +0200 | [diff] [blame] | 385 | |
Edwin Kempin | f07e98b | 2015-07-24 11:47:57 +0200 | [diff] [blame] | 386 | [[set-username]] |
| 387 | === Set Username |
| 388 | -- |
| 389 | 'PUT /accounts/link:#account-id[\{account-id\}]/username' |
| 390 | -- |
| 391 | |
| 392 | The new username must be provided in the request body inside |
| 393 | a link:#username-input[UsernameInput] entity. |
| 394 | |
| 395 | Once set, the username cannot be changed or deleted. If attempted this |
| 396 | fails with "`405 Method Not Allowed`". |
| 397 | |
| 398 | .Request |
| 399 | ---- |
Wyatt Allen | d275000 | 2016-06-16 10:58:57 -0700 | [diff] [blame] | 400 | PUT /accounts/self/username HTTP/1.0 |
Edwin Kempin | f07e98b | 2015-07-24 11:47:57 +0200 | [diff] [blame] | 401 | Content-Type: application/json; charset=UTF-8 |
| 402 | |
| 403 | { |
| 404 | "username": "jdoe" |
| 405 | } |
| 406 | ---- |
| 407 | |
| 408 | As response the new username is returned. |
| 409 | |
Ben Rohlfs | 9c960cb | 2020-02-02 22:12:30 +0100 | [diff] [blame] | 410 | [[set-display-name]] |
| 411 | === Set Display Name |
| 412 | -- |
| 413 | 'PUT /accounts/link:#account-id[\{account-id\}]/displayname' |
| 414 | -- |
| 415 | |
| 416 | The new display name must be provided in the request body inside |
| 417 | a link:#display-name-input[DisplayNameInput] entity. |
| 418 | |
| 419 | .Request |
| 420 | ---- |
| 421 | PUT /accounts/self/displayname HTTP/1.0 |
| 422 | Content-Type: application/json; charset=UTF-8 |
| 423 | |
| 424 | { |
| 425 | "display_name": "John" |
| 426 | } |
| 427 | ---- |
| 428 | |
| 429 | As response the new display name is returned. |
| 430 | |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 431 | [[get-active]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 432 | === Get Active |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 433 | -- |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 434 | 'GET /accounts/link:#account-id[\{account-id\}]/active' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 435 | -- |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 436 | |
| 437 | Checks if an account is active. |
| 438 | |
| 439 | .Request |
| 440 | ---- |
| 441 | GET /accounts/john.doe@example.com/active HTTP/1.0 |
| 442 | ---- |
| 443 | |
Colby Ranger | b125338 | 2013-11-06 09:24:47 -0800 | [diff] [blame] | 444 | If the account is active the string `ok` is returned. |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 445 | |
| 446 | .Response |
| 447 | ---- |
| 448 | HTTP/1.1 200 OK |
David Pursehouse | ee91b77 | 2018-09-03 15:15:04 +0900 | [diff] [blame] | 449 | Content-Disposition: attachment |
| 450 | Content-Type: application/json; charset=UTF-8 |
Colby Ranger | b125338 | 2013-11-06 09:24:47 -0800 | [diff] [blame] | 451 | |
David Pursehouse | ee91b77 | 2018-09-03 15:15:04 +0900 | [diff] [blame] | 452 | )]}' |
Colby Ranger | b125338 | 2013-11-06 09:24:47 -0800 | [diff] [blame] | 453 | ok |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 454 | ---- |
| 455 | |
David Pursehouse | 10829f64 | 2015-01-21 11:42:32 +0900 | [diff] [blame] | 456 | If the account is inactive the response is "`204 No Content`". |
Colby Ranger | b125338 | 2013-11-06 09:24:47 -0800 | [diff] [blame] | 457 | |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 458 | [[set-active]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 459 | === Set Active |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 460 | -- |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 461 | 'PUT /accounts/link:#account-id[\{account-id\}]/active' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 462 | -- |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 463 | |
| 464 | Sets the account state to active. |
| 465 | |
| 466 | .Request |
| 467 | ---- |
| 468 | PUT /accounts/john.doe@example.com/active HTTP/1.0 |
| 469 | ---- |
| 470 | |
| 471 | .Response |
| 472 | ---- |
| 473 | HTTP/1.1 201 Created |
| 474 | ---- |
| 475 | |
David Pursehouse | 10829f64 | 2015-01-21 11:42:32 +0900 | [diff] [blame] | 476 | If the account was already active the response is "`200 OK`". |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 477 | |
| 478 | [[delete-active]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 479 | === Delete Active |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 480 | -- |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 481 | 'DELETE /accounts/link:#account-id[\{account-id\}]/active' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 482 | -- |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 483 | |
| 484 | Sets the account state to inactive. |
| 485 | |
| 486 | .Request |
| 487 | ---- |
| 488 | DELETE /accounts/john.doe@example.com/active HTTP/1.0 |
| 489 | ---- |
| 490 | |
| 491 | .Response |
| 492 | ---- |
| 493 | HTTP/1.1 204 No Content |
| 494 | ---- |
| 495 | |
David Pursehouse | b59fe95 | 2016-09-06 10:26:22 +0900 | [diff] [blame] | 496 | If the account was already inactive the response is "`409 Conflict`". |
Edwin Kempin | ca3db6a | 2013-05-17 16:05:43 +0200 | [diff] [blame] | 497 | |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 498 | [[set-http-password]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 499 | === Set/Generate HTTP Password |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 500 | -- |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 501 | 'PUT /accounts/link:#account-id[\{account-id\}]/password.http' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 502 | -- |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 503 | |
| 504 | Sets/Generates the HTTP password of an account. |
| 505 | |
| 506 | The options for setting/generating the HTTP password must be provided |
| 507 | in the request body inside a link:#http-password-input[ |
| 508 | HttpPasswordInput] entity. |
| 509 | |
David Pursehouse | d95b1f1 | 2019-05-10 11:55:16 +0900 | [diff] [blame] | 510 | The account must have a username. |
| 511 | |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 512 | .Request |
| 513 | ---- |
| 514 | PUT /accounts/self/password.http HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 515 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 516 | |
| 517 | { |
| 518 | "generate": true |
| 519 | } |
| 520 | ---- |
| 521 | |
| 522 | As response the new HTTP password is returned. |
| 523 | |
| 524 | .Response |
| 525 | ---- |
| 526 | HTTP/1.1 200 OK |
| 527 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 528 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 529 | |
| 530 | )]}' |
| 531 | "ETxgpih8xrNs" |
| 532 | ---- |
| 533 | |
| 534 | If the HTTP password was deleted the response is "`204 No Content`". |
| 535 | |
| 536 | [[delete-http-password]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 537 | === Delete HTTP Password |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 538 | -- |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 539 | 'DELETE /accounts/link:#account-id[\{account-id\}]/password.http' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 540 | -- |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 541 | |
| 542 | Deletes the HTTP password of an account. |
| 543 | |
| 544 | .Request |
| 545 | ---- |
| 546 | DELETE /accounts/self/password.http HTTP/1.0 |
| 547 | ---- |
| 548 | |
| 549 | .Response |
| 550 | ---- |
| 551 | HTTP/1.1 204 No Content |
| 552 | ---- |
| 553 | |
Michael Ochmann | e56acd6 | 2015-12-15 15:59:42 +0100 | [diff] [blame] | 554 | [[get-oauth-token]] |
| 555 | === Get OAuth Access Token |
| 556 | -- |
| 557 | 'GET /accounts/link:#account-id[\{account-id\}]/oauthtoken' |
| 558 | -- |
| 559 | |
| 560 | Returns a previously obtained OAuth access token. |
| 561 | |
| 562 | .Request |
| 563 | ---- |
| 564 | GET /accounts/self/oauthtoken HTTP/1.1 |
| 565 | ---- |
| 566 | |
| 567 | As a response, an link:#oauth-token-info[OAuthTokenInfo] entity is returned |
| 568 | that describes the OAuth access token. |
| 569 | |
| 570 | .Response |
| 571 | ---- |
| 572 | HTTP/1.1 200 OK |
| 573 | Content-Disposition: attachment |
| 574 | Content-Type: application/json; charset=UTF-8 |
| 575 | |
| 576 | )]}' |
| 577 | { |
| 578 | "username": "johndow", |
| 579 | "resource_host": "gerrit.example.org", |
| 580 | "access_token": "eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOi", |
| 581 | "provider_id": "oauth-plugin:oauth-provider", |
| 582 | "expires_at": "922337203775807", |
| 583 | "type": "bearer" |
| 584 | } |
| 585 | ---- |
| 586 | |
| 587 | If there is no token available, or the token has already expired, |
| 588 | "`404 Not Found`" is returned as response. Requests to obtain an access |
| 589 | token of another user are rejected with "`403 Forbidden`". |
| 590 | |
Edwin Kempin | a1be4c2 | 2013-05-16 13:00:11 +0200 | [diff] [blame] | 591 | [[list-account-emails]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 592 | === List Account Emails |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 593 | -- |
Edwin Kempin | a1be4c2 | 2013-05-16 13:00:11 +0200 | [diff] [blame] | 594 | 'GET /accounts/link:#account-id[\{account-id\}]/emails' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 595 | -- |
Edwin Kempin | a1be4c2 | 2013-05-16 13:00:11 +0200 | [diff] [blame] | 596 | |
| 597 | Returns the email addresses that are configured for the specified user. |
| 598 | |
Gal Paikin | af96e01 | 2020-04-22 17:03:15 +0200 | [diff] [blame] | 599 | link:access-control.html#capability_modifyAccount[ModifyAccount] |
| 600 | capability is required to view emails of other users. |
| 601 | |
Edwin Kempin | a1be4c2 | 2013-05-16 13:00:11 +0200 | [diff] [blame] | 602 | .Request |
| 603 | ---- |
| 604 | GET /accounts/self/emails HTTP/1.0 |
| 605 | ---- |
| 606 | |
| 607 | As response the email addresses of the user are returned as a list of |
| 608 | link:#email-info[EmailInfo] entities. |
| 609 | |
| 610 | .Response |
| 611 | ---- |
| 612 | HTTP/1.1 200 OK |
| 613 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 614 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | a1be4c2 | 2013-05-16 13:00:11 +0200 | [diff] [blame] | 615 | |
| 616 | )]}' |
| 617 | [ |
| 618 | { |
| 619 | "email": "john.doe@example.com", |
| 620 | "preferred": true |
| 621 | }, |
| 622 | { |
| 623 | "email": "j.doe@example.com" |
| 624 | } |
| 625 | ] |
| 626 | ---- |
| 627 | |
Edwin Kempin | 493efd5 | 2013-05-16 13:32:17 +0200 | [diff] [blame] | 628 | [[get-account-email]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 629 | === Get Account Email |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 630 | -- |
Edwin Kempin | 493efd5 | 2013-05-16 13:32:17 +0200 | [diff] [blame] | 631 | '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] | 632 | -- |
Edwin Kempin | 493efd5 | 2013-05-16 13:32:17 +0200 | [diff] [blame] | 633 | |
| 634 | Retrieves an email address of a user. |
| 635 | |
| 636 | .Request |
| 637 | ---- |
| 638 | GET /accounts/self/emails/john.doe@example.com HTTP/1.0 |
| 639 | ---- |
| 640 | |
| 641 | As response an link:#email-info[EmailInfo] entity is returned that |
| 642 | describes the email address. |
| 643 | |
| 644 | .Response |
| 645 | ---- |
| 646 | HTTP/1.1 200 OK |
| 647 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 648 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 493efd5 | 2013-05-16 13:32:17 +0200 | [diff] [blame] | 649 | |
| 650 | )]}' |
| 651 | { |
| 652 | "email": "john.doe@example.com", |
| 653 | "preferred": true |
| 654 | } |
| 655 | ---- |
| 656 | |
Edwin Kempin | 315066a | 2013-05-16 16:41:24 +0200 | [diff] [blame] | 657 | [[create-account-email]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 658 | === Create Account Email |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 659 | -- |
Edwin Kempin | 315066a | 2013-05-16 16:41:24 +0200 | [diff] [blame] | 660 | '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] | 661 | -- |
Edwin Kempin | 315066a | 2013-05-16 16:41:24 +0200 | [diff] [blame] | 662 | |
| 663 | Registers a new email address for the user. A verification email is |
| 664 | sent with a link that needs to be visited to confirm the email address, |
| 665 | unless `DEVELOPMENT_BECOME_ANY_ACCOUNT` is used as authentication type. |
| 666 | For the development mode email addresses are directly added without |
Edwin Kempin | c99e5a6 | 2013-05-17 11:21:27 +0200 | [diff] [blame] | 667 | confirmation. A Gerrit administrator may add an email address without |
| 668 | confirmation by setting `no_confirmation` in the |
| 669 | link:#email-input[EmailInput]. |
David Pursehouse | 649515c | 2016-02-10 10:16:11 +0900 | [diff] [blame] | 670 | If link:config-gerrit.html#sendemail.allowrcpt[sendemail.allowrcpt] is |
| 671 | configured, the added email address must belong to a domain that is |
| 672 | allowed, unless `no_confirmation` is set. |
Rikard Almgren | 5b9de1c | 2019-03-12 17:55:16 +0100 | [diff] [blame] | 673 | If link:config-gerrit.html#sendemail.denyrcpt[sendemail.denyrcpt] |
| 674 | is configured, make sure that the added email address is *not* disallowed or |
| 675 | belongs to a domain that is disallowed. |
Edwin Kempin | 315066a | 2013-05-16 16:41:24 +0200 | [diff] [blame] | 676 | |
Shawn Pearce | 384a4a6 | 2016-06-03 18:37:28 -0700 | [diff] [blame] | 677 | The link:#email-input[EmailInput] object in the request body may |
| 678 | contain additional options for the email address. |
Edwin Kempin | 3f48c24 | 2013-05-17 10:55:07 +0200 | [diff] [blame] | 679 | |
Edwin Kempin | 315066a | 2013-05-16 16:41:24 +0200 | [diff] [blame] | 680 | .Request |
| 681 | ---- |
| 682 | PUT /accounts/self/emails/john.doe@example.com HTTP/1.0 |
Shawn Pearce | 384a4a6 | 2016-06-03 18:37:28 -0700 | [diff] [blame] | 683 | Content-Type: application/json; charset=UTF-8 |
| 684 | Content-Length: 3 |
| 685 | |
| 686 | {} |
Edwin Kempin | 315066a | 2013-05-16 16:41:24 +0200 | [diff] [blame] | 687 | ---- |
| 688 | |
| 689 | As response the new email address is returned as |
| 690 | link:#email-info[EmailInfo] entity. |
| 691 | |
| 692 | .Response |
| 693 | ---- |
| 694 | HTTP/1.1 201 Created |
| 695 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 696 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 315066a | 2013-05-16 16:41:24 +0200 | [diff] [blame] | 697 | |
| 698 | )]}' |
| 699 | { |
Edwin Kempin | 3f48c24 | 2013-05-17 10:55:07 +0200 | [diff] [blame] | 700 | "email": "john.doe@example.com", |
Edwin Kempin | 4c454e6 | 2013-05-27 11:21:55 +0200 | [diff] [blame] | 701 | "pending_confirmation": true |
Edwin Kempin | 315066a | 2013-05-16 16:41:24 +0200 | [diff] [blame] | 702 | } |
| 703 | ---- |
| 704 | |
Edwin Kempin | 4fbf70f | 2013-05-17 14:15:16 +0200 | [diff] [blame] | 705 | [[delete-account-email]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 706 | === Delete Account Email |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 707 | -- |
Edwin Kempin | 4fbf70f | 2013-05-17 14:15:16 +0200 | [diff] [blame] | 708 | '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] | 709 | -- |
Edwin Kempin | 4fbf70f | 2013-05-17 14:15:16 +0200 | [diff] [blame] | 710 | |
| 711 | Deletes an email address of an account. |
| 712 | |
| 713 | .Request |
| 714 | ---- |
| 715 | DELETE /accounts/self/emails/john.doe@example.com HTTP/1.0 |
| 716 | ---- |
| 717 | |
| 718 | .Response |
| 719 | ---- |
| 720 | HTTP/1.1 204 No Content |
| 721 | ---- |
| 722 | |
Edwin Kempin | e1f8288 | 2013-05-16 15:02:45 +0200 | [diff] [blame] | 723 | [[set-preferred-email]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 724 | === Set Preferred Email |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 725 | -- |
Edwin Kempin | e1f8288 | 2013-05-16 15:02:45 +0200 | [diff] [blame] | 726 | '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] | 727 | -- |
Edwin Kempin | e1f8288 | 2013-05-16 15:02:45 +0200 | [diff] [blame] | 728 | |
| 729 | Sets an email address as preferred email address for an account. |
| 730 | |
| 731 | .Request |
| 732 | ---- |
| 733 | PUT /accounts/self/emails/john.doe@example.com/preferred HTTP/1.0 |
| 734 | ---- |
| 735 | |
| 736 | .Response |
| 737 | ---- |
| 738 | HTTP/1.1 201 Created |
| 739 | ---- |
| 740 | |
| 741 | If the email address was already the preferred email address of the |
| 742 | account the response is "`200 OK`". |
| 743 | |
Edwin Kempin | ebccb84 | 2013-05-29 13:33:06 +0200 | [diff] [blame] | 744 | [[list-ssh-keys]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 745 | === List SSH Keys |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 746 | -- |
Edwin Kempin | ebccb84 | 2013-05-29 13:33:06 +0200 | [diff] [blame] | 747 | 'GET /accounts/link:#account-id[\{account-id\}]/sshkeys' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 748 | -- |
Edwin Kempin | ebccb84 | 2013-05-29 13:33:06 +0200 | [diff] [blame] | 749 | |
| 750 | Returns the SSH keys of an account. |
| 751 | |
| 752 | .Request |
| 753 | ---- |
| 754 | GET /accounts/self/sshkeys HTTP/1.0 |
| 755 | ---- |
| 756 | |
| 757 | As response the SSH keys of the account are returned as a list of |
| 758 | link:#ssh-key-info[SshKeyInfo] entities. |
| 759 | |
| 760 | .Response |
| 761 | ---- |
| 762 | HTTP/1.1 200 OK |
| 763 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 764 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | ebccb84 | 2013-05-29 13:33:06 +0200 | [diff] [blame] | 765 | |
| 766 | )]}' |
| 767 | [ |
| 768 | { |
| 769 | "seq": 1, |
Orgad Shaneh | cdd65b5 | 2019-11-29 12:16:19 +0200 | [diff] [blame] | 770 | "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw== john.doe@example.com", |
| 771 | "encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw==", |
Edwin Kempin | ebccb84 | 2013-05-29 13:33:06 +0200 | [diff] [blame] | 772 | "algorithm": "ssh-rsa", |
| 773 | "comment": "john.doe@example.com", |
| 774 | "valid": true |
| 775 | } |
| 776 | ] |
| 777 | ---- |
| 778 | |
Edwin Kempin | c6824ee | 2013-05-29 16:18:39 +0200 | [diff] [blame] | 779 | [[get-ssh-key]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 780 | === Get SSH Key |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 781 | -- |
Edwin Kempin | c6824ee | 2013-05-29 16:18:39 +0200 | [diff] [blame] | 782 | '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] | 783 | -- |
Edwin Kempin | c6824ee | 2013-05-29 16:18:39 +0200 | [diff] [blame] | 784 | |
| 785 | Retrieves an SSH key of a user. |
| 786 | |
| 787 | .Request |
| 788 | ---- |
| 789 | GET /accounts/self/sshkeys/1 HTTP/1.0 |
| 790 | ---- |
| 791 | |
| 792 | As response an link:#ssh-key-info[SshKeyInfo] entity is returned that |
| 793 | describes the SSH key. |
| 794 | |
| 795 | .Response |
| 796 | ---- |
| 797 | HTTP/1.1 200 OK |
| 798 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 799 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | c6824ee | 2013-05-29 16:18:39 +0200 | [diff] [blame] | 800 | |
| 801 | )]}' |
| 802 | { |
| 803 | "seq": 1, |
Orgad Shaneh | cdd65b5 | 2019-11-29 12:16:19 +0200 | [diff] [blame] | 804 | "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw== john.doe@example.com", |
| 805 | "encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw==", |
Edwin Kempin | c6824ee | 2013-05-29 16:18:39 +0200 | [diff] [blame] | 806 | "algorithm": "ssh-rsa", |
| 807 | "comment": "john.doe@example.com", |
| 808 | "valid": true |
| 809 | } |
| 810 | ---- |
| 811 | |
Edwin Kempin | 4e2e521 | 2013-05-31 15:11:10 +0200 | [diff] [blame] | 812 | [[add-ssh-key]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 813 | === Add SSH Key |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 814 | -- |
Edwin Kempin | 4e2e521 | 2013-05-31 15:11:10 +0200 | [diff] [blame] | 815 | 'POST /accounts/link:#account-id[\{account-id\}]/sshkeys' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 816 | -- |
Edwin Kempin | 4e2e521 | 2013-05-31 15:11:10 +0200 | [diff] [blame] | 817 | |
| 818 | Adds an SSH key for a user. |
| 819 | |
| 820 | The SSH public key must be provided as raw content in the request body. |
| 821 | |
Edwin Kempin | ea37c78 | 2016-04-11 14:25:46 +0200 | [diff] [blame] | 822 | Trying to add an SSH key that already exists succeeds, but no new SSH |
| 823 | key is persisted. |
| 824 | |
Edwin Kempin | 4e2e521 | 2013-05-31 15:11:10 +0200 | [diff] [blame] | 825 | .Request |
| 826 | ---- |
| 827 | POST /accounts/self/sshkeys HTTP/1.0 |
Orgad Shaneh | fd808eb | 2019-11-29 11:41:54 +0200 | [diff] [blame] | 828 | Content-Type: text/plain |
Edwin Kempin | 4e2e521 | 2013-05-31 15:11:10 +0200 | [diff] [blame] | 829 | |
Orgad Shaneh | cdd65b5 | 2019-11-29 12:16:19 +0200 | [diff] [blame] | 830 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw== john.doe@example.com |
Edwin Kempin | 4e2e521 | 2013-05-31 15:11:10 +0200 | [diff] [blame] | 831 | ---- |
| 832 | |
| 833 | As response an link:#ssh-key-info[SshKeyInfo] entity is returned that |
| 834 | describes the new SSH key. |
| 835 | |
| 836 | .Response |
| 837 | ---- |
| 838 | HTTP/1.1 200 OK |
| 839 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 840 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 4e2e521 | 2013-05-31 15:11:10 +0200 | [diff] [blame] | 841 | |
| 842 | )]}' |
| 843 | { |
| 844 | "seq": 2, |
Orgad Shaneh | cdd65b5 | 2019-11-29 12:16:19 +0200 | [diff] [blame] | 845 | "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw== john.doe@example.com", |
| 846 | "encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw==", |
Edwin Kempin | 4e2e521 | 2013-05-31 15:11:10 +0200 | [diff] [blame] | 847 | "algorithm": "ssh-rsa", |
| 848 | "comment": "john.doe@example.com", |
| 849 | "valid": true |
| 850 | } |
| 851 | ---- |
| 852 | |
Edwin Kempin | 5a02ffd | 2013-06-03 15:33:53 +0200 | [diff] [blame] | 853 | [[delete-ssh-key]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 854 | === Delete SSH Key |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 855 | -- |
Edwin Kempin | 5a02ffd | 2013-06-03 15:33:53 +0200 | [diff] [blame] | 856 | '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] | 857 | -- |
Edwin Kempin | 5a02ffd | 2013-06-03 15:33:53 +0200 | [diff] [blame] | 858 | |
| 859 | Deletes an SSH key of a user. |
| 860 | |
| 861 | .Request |
| 862 | ---- |
| 863 | DELETE /accounts/self/sshkeys/2 HTTP/1.0 |
| 864 | ---- |
| 865 | |
| 866 | .Response |
| 867 | ---- |
| 868 | HTTP/1.1 204 No Content |
| 869 | ---- |
| 870 | |
Dave Borowitz | ed170f3 | 2015-07-27 17:31:49 -0700 | [diff] [blame] | 871 | [[list-gpg-keys]] |
| 872 | === List GPG Keys |
| 873 | -- |
| 874 | 'GET /accounts/link:#account-id[\{account-id\}]/gpgkeys' |
| 875 | -- |
| 876 | |
| 877 | Returns the GPG keys of an account. |
| 878 | |
| 879 | .Request |
| 880 | ---- |
| 881 | GET /accounts/self/gpgkeys HTTP/1.0 |
| 882 | ---- |
| 883 | |
| 884 | As a response, the GPG keys of the account are returned as a map of |
| 885 | link:#gpg-key-info[GpgKeyInfo] entities, keyed by ID. |
| 886 | |
| 887 | .Response |
| 888 | ---- |
| 889 | HTTP/1.1 200 OK |
| 890 | Content-Disposition: attachment |
| 891 | Content-Type: application/json; charset=UTF-8 |
| 892 | |
| 893 | )]}' |
| 894 | { |
| 895 | "AFC8A49B": { |
| 896 | "fingerprint": "0192 723D 42D1 0C5B 32A6 E1E0 9350 9E4B AFC8 A49B", |
| 897 | "user_ids": [ |
| 898 | "John Doe \u003cjohn.doe@example.com\u003e" |
| 899 | ], |
Dave Borowitz | 36b35b9 | 2015-09-14 12:34:13 -0400 | [diff] [blame] | 900 | "key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: BCPG v1.52\n\nmQENBFXUpNcBCACv4paCiyKxZ0EcKy8VaWVNkJlNebRBiyw9WxU85wPOq5Gz/3GT\nRQwKqeY0SxVdQT8VNBw2sBe2m6eqcfZ2iKmesSlbXMe15DA7k8Bg4zEpQ0tXNG1L\nhceZDVQ1Xk06T2sgkunaiPsXi82nwN3UWYtDXxX4is5e6xBNL48Jgz4lbqo6+8D5\nvsVYiYMx4AwRkJyt/oA3IZAtSlY8Yd445nY14VPcnsGRwGWTLyZv9gxKHRUppVhQ\nE3o6ePXKEVgmONnQ4CjqmkGwWZvjMF2EPtAxvQLAuFa8Hqtkq5cgfgVkv/Vrcln4\nnQZVoMm3a3f5ODii2tQzNh6+7LL1bpqAmVEtABEBAAG0H0pvaG4gRG9lIDxqb2hu\nLmRvZUBleGFtcGxlLmNvbT6JATgEEwECACIFAlXUpNcCGwMGCwkIBwMCBhUIAgkK\nCwQWAgMBAh4BAheAAAoJEJNQnkuvyKSbfjoH/2OcSQOu1kJ20ndjhgY2yNChm7gd\ntU7TEBbB0TsLeazkrrLtKvrpW5+CRe07ZAG9HOtp3DikwAyrhSxhlYgVsQDhgB8q\nG0tYiZtQ88YyYrncCQ4hwknrcWXVW9bK3V4ZauxzPv3ADSloyR9tMURw5iHCIeL5\nfIw/pLvA3RjPMx4Sfow/bqRCUELua39prGw5Tv8a2ZRFbj2sgP5j8lUFegyJPQ4z\ntJhe6zZvKOzvIyxHO8llLmdrImsXRL9eqroWGs0VYqe6baQpY6xpSjbYK0J5HYcg\nTO+/u80JI+ROTMHE6unGp5Pgh/xIz6Wd34E0lWL1eOyNfGiPLyRWn1d0", |
| 901 | "status": "TRUSTED", |
| 902 | "problems": [], |
Dave Borowitz | eab3aff | 2015-08-04 14:15:50 -0700 | [diff] [blame] | 903 | }, |
Dave Borowitz | ed170f3 | 2015-07-27 17:31:49 -0700 | [diff] [blame] | 904 | } |
| 905 | ---- |
| 906 | |
| 907 | [[get-gpg-key]] |
| 908 | === Get GPG Key |
| 909 | -- |
| 910 | 'GET /accounts/link:#account-id[\{account-id\}]/gpgkeys/link:#gpg-key-id[\{gpg-key-id\}]' |
| 911 | -- |
| 912 | |
| 913 | Retrieves a GPG key of a user. |
| 914 | |
| 915 | .Request |
| 916 | ---- |
| 917 | GET /accounts/self/gpgkeys/AFC8A49B HTTP/1.0 |
| 918 | ---- |
| 919 | |
| 920 | As a response, a link:#gpg-key-info[GpgKeyInfo] entity is returned that |
| 921 | describes the GPG key. |
| 922 | |
| 923 | .Response |
| 924 | ---- |
| 925 | HTTP/1.1 200 OK |
| 926 | Content-Disposition: attachment |
| 927 | Content-Type: application/json; charset=UTF-8 |
| 928 | |
| 929 | )]}' |
| 930 | { |
| 931 | "id": "AFC8A49B", |
| 932 | "fingerprint": "0192 723D 42D1 0C5B 32A6 E1E0 9350 9E4B AFC8 A49B", |
| 933 | "user_ids": [ |
| 934 | "John Doe \u003cjohn.doe@example.com\u003e" |
| 935 | ], |
Dave Borowitz | 36b35b9 | 2015-09-14 12:34:13 -0400 | [diff] [blame] | 936 | "key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: BCPG v1.52\n\nmQENBFXUpNcBCACv4paCiyKxZ0EcKy8VaWVNkJlNebRBiyw9WxU85wPOq5Gz/3GT\nRQwKqeY0SxVdQT8VNBw2sBe2m6eqcfZ2iKmesSlbXMe15DA7k8Bg4zEpQ0tXNG1L\nhceZDVQ1Xk06T2sgkunaiPsXi82nwN3UWYtDXxX4is5e6xBNL48Jgz4lbqo6+8D5\nvsVYiYMx4AwRkJyt/oA3IZAtSlY8Yd445nY14VPcnsGRwGWTLyZv9gxKHRUppVhQ\nE3o6ePXKEVgmONnQ4CjqmkGwWZvjMF2EPtAxvQLAuFa8Hqtkq5cgfgVkv/Vrcln4\nnQZVoMm3a3f5ODii2tQzNh6+7LL1bpqAmVEtABEBAAG0H0pvaG4gRG9lIDxqb2hu\nLmRvZUBleGFtcGxlLmNvbT6JATgEEwECACIFAlXUpNcCGwMGCwkIBwMCBhUIAgkK\nCwQWAgMBAh4BAheAAAoJEJNQnkuvyKSbfjoH/2OcSQOu1kJ20ndjhgY2yNChm7gd\ntU7TEBbB0TsLeazkrrLtKvrpW5+CRe07ZAG9HOtp3DikwAyrhSxhlYgVsQDhgB8q\nG0tYiZtQ88YyYrncCQ4hwknrcWXVW9bK3V4ZauxzPv3ADSloyR9tMURw5iHCIeL5\nfIw/pLvA3RjPMx4Sfow/bqRCUELua39prGw5Tv8a2ZRFbj2sgP5j8lUFegyJPQ4z\ntJhe6zZvKOzvIyxHO8llLmdrImsXRL9eqroWGs0VYqe6baQpY6xpSjbYK0J5HYcg\nTO+/u80JI+ROTMHE6unGp5Pgh/xIz6Wd34E0lWL1eOyNfGiPLyRWn1d0", |
| 937 | "status": "TRUSTED", |
| 938 | "problems": [], |
Dave Borowitz | ed170f3 | 2015-07-27 17:31:49 -0700 | [diff] [blame] | 939 | } |
| 940 | ---- |
| 941 | |
Dave Borowitz | eab3aff | 2015-08-04 14:15:50 -0700 | [diff] [blame] | 942 | [[add-delete-gpg-keys]] |
| 943 | === Add/Delete GPG Keys |
Dave Borowitz | ed170f3 | 2015-07-27 17:31:49 -0700 | [diff] [blame] | 944 | -- |
| 945 | 'POST /accounts/link:#account-id[\{account-id\}]/gpgkeys' |
| 946 | -- |
| 947 | |
Dave Borowitz | eab3aff | 2015-08-04 14:15:50 -0700 | [diff] [blame] | 948 | Add or delete one or more GPG keys for a user. |
Dave Borowitz | ed170f3 | 2015-07-27 17:31:49 -0700 | [diff] [blame] | 949 | |
Dave Borowitz | eab3aff | 2015-08-04 14:15:50 -0700 | [diff] [blame] | 950 | The changes must be provided in the request body as a |
Dave Borowitz | 73cfbe6 | 2015-08-27 16:36:41 -0400 | [diff] [blame] | 951 | link:#gpg-keys-input[GpgKeysInput] entity. Each new GPG key is provided in |
Dave Borowitz | ed170f3 | 2015-07-27 17:31:49 -0700 | [diff] [blame] | 952 | ASCII armored format, and must contain a self-signed certification |
| 953 | matching a registered email or other identity of the user. |
| 954 | |
| 955 | .Request |
| 956 | ---- |
| 957 | POST /accounts/link:#account-id[\{account-id\}]/gpgkeys |
| 958 | Content-Type: application/json |
| 959 | |
| 960 | { |
| 961 | "add": [ |
| 962 | "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: GnuPG v1\n\nmQENBFXUpNcBCACv4paCiyKxZ0EcKy8VaWVNkJlNebRBiyw9WxU85wPOq5Gz/3GT\nRQwKqeY0SxVdQT8VNBw2sBe2m6eqcfZ2iKmesSlbXMe15DA7k8Bg4zEpQ0tXNG1L\nhceZDVQ1Xk06T2sgkunaiPsXi82nwN3UWYtDXxX4is5e6xBNL48Jgz4lbqo6+8D5\nvsVYiYMx4AwRkJyt/oA3IZAtSlY8Yd445nY14VPcnsGRwGWTLyZv9gxKHRUppVhQ\nE3o6ePXKEVgmONnQ4CjqmkGwWZvjMF2EPtAxvQLAuFa8Hqtkq5cgfgVkv/Vrcln4\nnQZVoMm3a3f5ODii2tQzNh6+7LL1bpqAmVEtABEBAAG0H0pvaG4gRG9lIDxqb2hu\nLmRvZUBleGFtcGxlLmNvbT6JATgEEwECACIFAlXUpNcCGwMGCwkIBwMCBhUIAgkK\nCwQWAgMBAh4BAheAAAoJEJNQnkuvyKSbfjoH/2OcSQOu1kJ20ndjhgY2yNChm7gd\ntU7TEBbB0TsLeazkrrLtKvrpW5+CRe07ZAG9HOtp3DikwAyrhSxhlYgVsQDhgB8q\nG0tYiZtQ88YyYrncCQ4hwknrcWXVW9bK3V4ZauxzPv3ADSloyR9tMURw5iHCIeL5\nfIw/pLvA3RjPMx4Sfow/bqRCUELua39prGw5Tv8a2ZRFbj2sgP5j8lUFegyJPQ4z\ntJhe6zZvKOzvIyxHO8llLmdrImsXRL9eqroWGs0VYqe6baQpY6xpSjbYK0J5HYcg\nTO+/u80JI+ROTMHE6unGp5Pgh/xIz6Wd34E0lWL1eOyNfGiPLyRWn1d0yZO5AQ0E\nVdSk1wEIALUycrH2HK9zQYdR/KJo1yJJuaextLWsYYn881yDQo/p06U5vXOZ28lG\nAq/Xs96woVZPbgME6FyQzhf20Z2sbr+5bNo3OcEKaKX3Eo/sWwSJ7bXbGLDxMf4S\netfY1WDC+4rTqE30JuC++nQviPRdCcZf0AEgM6TxVhYEMVYwV787YO1IH62EBICM\nSkIONOfnusNZ4Skgjq9OzakOOpROZ4tki5cH/5oSDgdcaGPy1CFDpL9fG6er2zzk\nsw3qCbraqZrrlgpinWcAduiao67U/dV18O6OjYzrt33fTKZ0+bXhk1h1gloC21MQ\nya0CXlnfR/FOQhvuK0RlbR3cMfhZQscAEQEAAYkBHwQYAQIACQUCVdSk1wIbDAAK\nCRCTUJ5Lr8ikm8+QB/4uE+AlvFQFh9W8koPdfk7CJF7wdgZZ2NDtktvLL71WuMK8\nPOmf9f5JtcLCX4iJxGzcWogAR5ed20NgUoHUg7jn9Xm3fvP+kiqL6WqPhjazd89h\nk06v9hPE65kp4wb0fQqDrtWfP1lFGuh77rQgISt3Y4QutDl49vXS183JAfGPxFxx\n8FgGcfNwL2LVObvqCA0WLqeIrQVbniBPFGocE3yA/0W9BB/xtolpKfgMMsqGRMeu\n9oIsNxB2oE61OsqjUtGsnKQi8k5CZbhJaql4S89vwS+efK0R+mo+0N55b0XxRlCS\nfaURgAcjarQzJnG0hUps2GNO/+nM7UyyJAGfHlh5\n=EdXO\n-----END PGP PUBLIC KEY BLOCK-----\n" |
Dave Borowitz | eab3aff | 2015-08-04 14:15:50 -0700 | [diff] [blame] | 963 | ], |
| 964 | "delete": [ |
| 965 | "DEADBEEF", |
Dave Borowitz | ed170f3 | 2015-07-27 17:31:49 -0700 | [diff] [blame] | 966 | ] |
| 967 | }' |
| 968 | ---- |
| 969 | |
Dave Borowitz | eab3aff | 2015-08-04 14:15:50 -0700 | [diff] [blame] | 970 | As a response, the modified GPG keys are returned as a map of |
| 971 | link:#gpg-key-info[GpgKeyInfo] entities, keyed by ID. Deleted keys are |
| 972 | represented by an empty object. |
Dave Borowitz | ed170f3 | 2015-07-27 17:31:49 -0700 | [diff] [blame] | 973 | |
| 974 | .Response |
| 975 | ---- |
| 976 | HTTP/1.1 200 OK |
| 977 | Content-Disposition: attachment |
| 978 | Content-Type: application/json; charset=UTF-8 |
| 979 | |
| 980 | )]}' |
| 981 | { |
| 982 | "AFC8A49B": { |
| 983 | "fingerprint": "0192 723D 42D1 0C5B 32A6 E1E0 9350 9E4B AFC8 A49B", |
| 984 | "user_ids": [ |
| 985 | "John Doe \u003cjohn.doe@example.com\u003e" |
| 986 | ], |
| 987 | "key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: BCPG v1.52\n\nmQENBFXUpNcBCACv4paCiyKxZ0EcKy8VaWVNkJlNebRBiyw9WxU85wPOq5Gz/3GT\nRQwKqeY0SxVdQT8VNBw2sBe2m6eqcfZ2iKmesSlbXMe15DA7k8Bg4zEpQ0tXNG1L\nhceZDVQ1Xk06T2sgkunaiPsXi82nwN3UWYtDXxX4is5e6xBNL48Jgz4lbqo6+8D5\nvsVYiYMx4AwRkJyt/oA3IZAtSlY8Yd445nY14VPcnsGRwGWTLyZv9gxKHRUppVhQ\nE3o6ePXKEVgmONnQ4CjqmkGwWZvjMF2EPtAxvQLAuFa8Hqtkq5cgfgVkv/Vrcln4\nnQZVoMm3a3f5ODii2tQzNh6+7LL1bpqAmVEtABEBAAG0H0pvaG4gRG9lIDxqb2hu\nLmRvZUBleGFtcGxlLmNvbT6JATgEEwECACIFAlXUpNcCGwMGCwkIBwMCBhUIAgkK\nCwQWAgMBAh4BAheAAAoJEJNQnkuvyKSbfjoH/2OcSQOu1kJ20ndjhgY2yNChm7gd\ntU7TEBbB0TsLeazkrrLtKvrpW5+CRe07ZAG9HOtp3DikwAyrhSxhlYgVsQDhgB8q\nG0tYiZtQ88YyYrncCQ4hwknrcWXVW9bK3V4ZauxzPv3ADSloyR9tMURw5iHCIeL5\nfIw/pLvA3RjPMx4Sfow/bqRCUELua39prGw5Tv8a2ZRFbj2sgP5j8lUFegyJPQ4z\ntJhe6zZvKOzvIyxHO8llLmdrImsXRL9eqroWGs0VYqe6baQpY6xpSjbYK0J5HYcg\nTO+/u80JI+ROTMHE6unGp5Pgh/xIz6Wd34E0lWL1eOyNfGiPLyRWn1d0" |
Dave Borowitz | 36b35b9 | 2015-09-14 12:34:13 -0400 | [diff] [blame] | 988 | "status": "TRUSTED", |
| 989 | "problems": [], |
Dave Borowitz | ed170f3 | 2015-07-27 17:31:49 -0700 | [diff] [blame] | 990 | } |
Dave Borowitz | eab3aff | 2015-08-04 14:15:50 -0700 | [diff] [blame] | 991 | "DEADBEEF": {} |
Dave Borowitz | ed170f3 | 2015-07-27 17:31:49 -0700 | [diff] [blame] | 992 | } |
| 993 | ---- |
| 994 | |
Dave Borowitz | 70daef5 | 2015-08-03 10:53:06 -0700 | [diff] [blame] | 995 | [[delete-gpg-key]] |
| 996 | === Delete GPG Key |
| 997 | -- |
| 998 | 'DELETE /accounts/link:#account-id[\{account-id\}]/gpgkeys/link:#gpg-key-id[\{gpg-key-id\}]' |
| 999 | -- |
| 1000 | |
| 1001 | Deletes a GPG key of a user. |
| 1002 | |
| 1003 | .Request |
| 1004 | ---- |
| 1005 | DELETE /accounts/self/gpgkeys/AFC8A49B HTTP/1.0 |
| 1006 | ---- |
| 1007 | |
| 1008 | .Response |
| 1009 | ---- |
| 1010 | HTTP/1.1 204 No Content |
| 1011 | ---- |
| 1012 | |
Edwin Kempin | f502dd0 | 2013-02-14 14:22:25 +0100 | [diff] [blame] | 1013 | [[list-account-capabilities]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1014 | === List Account Capabilities |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1015 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1016 | 'GET /accounts/link:#account-id[\{account-id\}]/capabilities' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1017 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1018 | |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 1019 | Returns the global capabilities that are enabled for the specified |
| 1020 | user. |
Edwin Kempin | f502dd0 | 2013-02-14 14:22:25 +0100 | [diff] [blame] | 1021 | |
| 1022 | If the global capabilities for the calling user should be listed, |
| 1023 | `self` can be used as account-id. This can be used by UI tools to |
| 1024 | discover if administrative features are available to the caller, so |
| 1025 | they can hide (or show) relevant UI actions. |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1026 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 1027 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1028 | ---- |
| 1029 | GET /accounts/self/capabilities HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 1030 | ---- |
| 1031 | |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 1032 | As response the global capabilities of the user are returned as a |
| 1033 | link:#capability-info[CapabilityInfo] entity. |
| 1034 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 1035 | .Response |
| 1036 | ---- |
| 1037 | HTTP/1.1 200 OK |
| 1038 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1039 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1040 | |
| 1041 | )]}' |
| 1042 | { |
| 1043 | "queryLimit": { |
| 1044 | "min": 0, |
| 1045 | "max": 500 |
Edwin Kempin | 830d9b8 | 2013-02-14 15:03:26 +0100 | [diff] [blame] | 1046 | }, |
| 1047 | "emailReviewers": true |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1048 | } |
| 1049 | ---- |
| 1050 | |
Han-Wen Nienhuys | 84d830b | 2017-02-15 16:36:04 +0100 | [diff] [blame] | 1051 | Administrator that has authenticated with basic authentication: |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 1052 | |
| 1053 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1054 | ---- |
| 1055 | GET /a/accounts/self/capabilities HTTP/1.0 |
Han-Wen Nienhuys | 84d830b | 2017-02-15 16:36:04 +0100 | [diff] [blame] | 1056 | Authorization: Basic ABCDECF.. |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 1057 | ---- |
| 1058 | |
| 1059 | .Response |
| 1060 | ---- |
| 1061 | HTTP/1.1 200 OK |
| 1062 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1063 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1064 | |
| 1065 | )]}' |
| 1066 | { |
| 1067 | "administrateServer": true, |
| 1068 | "queryLimit": { |
| 1069 | "min": 0, |
| 1070 | "max": 500 |
| 1071 | }, |
| 1072 | "createAccount": true, |
| 1073 | "createGroup": true, |
| 1074 | "createProject": true, |
Edwin Kempin | 830d9b8 | 2013-02-14 15:03:26 +0100 | [diff] [blame] | 1075 | "emailReviewers": true, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1076 | "killTask": true, |
| 1077 | "viewCaches": true, |
| 1078 | "flushCaches": true, |
| 1079 | "viewConnections": true, |
Edwin Kempin | 362b14d1 | 2014-05-09 14:18:12 +0200 | [diff] [blame] | 1080 | "viewPlugins": true, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1081 | "viewQueue": true, |
David Ostrovsky | 99fc253 | 2013-06-16 17:50:35 +0200 | [diff] [blame] | 1082 | "runGC": true |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1083 | } |
| 1084 | ---- |
| 1085 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 1086 | .Get your own capabilities |
| 1087 | **** |
| 1088 | get::/accounts/self/capabilities |
| 1089 | **** |
| 1090 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1091 | To filter the set of global capabilities the `q` parameter can be used. |
| 1092 | Filtering may decrease the response time by avoiding looking at every |
| 1093 | possible alternative for the caller. |
| 1094 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 1095 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1096 | ---- |
| 1097 | GET /a/accounts/self/capabilities?q=createAccount&q=createGroup HTTP/1.0 |
Han-Wen Nienhuys | 84d830b | 2017-02-15 16:36:04 +0100 | [diff] [blame] | 1098 | Authorization: Basic ABCDEF... |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 1099 | ---- |
| 1100 | |
| 1101 | .Response |
| 1102 | ---- |
| 1103 | HTTP/1.1 200 OK |
| 1104 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1105 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1106 | |
| 1107 | )]}' |
| 1108 | { |
| 1109 | "createAccount": true, |
| 1110 | "createGroup": true |
| 1111 | } |
| 1112 | ---- |
| 1113 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 1114 | .Check if you can create groups |
| 1115 | **** |
| 1116 | get::/accounts/self/capabilities?q=createGroup |
| 1117 | **** |
| 1118 | |
Edwin Kempin | 9144479 | 2013-02-15 10:09:49 +0100 | [diff] [blame] | 1119 | [[check-account-capability]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1120 | === Check Account Capability |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1121 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1122 | '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] | 1123 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1124 | |
Edwin Kempin | 9144479 | 2013-02-15 10:09:49 +0100 | [diff] [blame] | 1125 | Checks if a user has a certain global capability. |
| 1126 | |
| 1127 | .Request |
| 1128 | ---- |
| 1129 | GET /a/accounts/self/capabilities/createGroup HTTP/1.0 |
| 1130 | ---- |
| 1131 | |
| 1132 | If the user has the global capability the string `ok` is returned. |
| 1133 | |
| 1134 | .Response |
| 1135 | ---- |
| 1136 | HTTP/1.1 200 OK |
| 1137 | |
| 1138 | ok |
| 1139 | ---- |
| 1140 | |
| 1141 | If the user doesn't have the global capability the response is |
David Pursehouse | 10829f64 | 2015-01-21 11:42:32 +0900 | [diff] [blame] | 1142 | "`404 Not Found`". |
Edwin Kempin | 9144479 | 2013-02-15 10:09:49 +0100 | [diff] [blame] | 1143 | |
| 1144 | .Check if you can create groups |
| 1145 | **** |
| 1146 | get::/accounts/self/capabilities/createGroup |
| 1147 | **** |
| 1148 | |
Edwin Kempin | b0a9b2b | 2013-02-15 13:25:54 +0100 | [diff] [blame] | 1149 | [[list-groups]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1150 | === List Groups |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1151 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1152 | 'GET /accounts/link:#account-id[\{account-id\}]/groups/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1153 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1154 | |
Edwin Kempin | b0a9b2b | 2013-02-15 13:25:54 +0100 | [diff] [blame] | 1155 | Lists all groups that contain the specified user as a member. |
| 1156 | |
| 1157 | .Request |
| 1158 | ---- |
| 1159 | GET /a/accounts/self/groups/ HTTP/1.0 |
| 1160 | ---- |
| 1161 | |
| 1162 | As result a list of link:rest-api-groups.html#group-info[GroupInfo] |
| 1163 | entries is returned. |
| 1164 | |
| 1165 | .Response |
| 1166 | ---- |
| 1167 | HTTP/1.1 200 OK |
| 1168 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1169 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | b0a9b2b | 2013-02-15 13:25:54 +0100 | [diff] [blame] | 1170 | |
| 1171 | )]}' |
| 1172 | [ |
| 1173 | { |
Edwin Kempin | b0a9b2b | 2013-02-15 13:25:54 +0100 | [diff] [blame] | 1174 | "id": "global%3AAnonymous-Users", |
| 1175 | "url": "#/admin/groups/uuid-global%3AAnonymous-Users", |
| 1176 | "options": { |
| 1177 | }, |
| 1178 | "description": "Any user, signed-in or not", |
| 1179 | "group_id": 2, |
| 1180 | "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389" |
| 1181 | }, |
| 1182 | { |
Edwin Kempin | b0a9b2b | 2013-02-15 13:25:54 +0100 | [diff] [blame] | 1183 | "id": "834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7", |
| 1184 | "url": "#/admin/groups/uuid-834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7", |
| 1185 | "options": { |
| 1186 | "visible_to_all": true, |
| 1187 | }, |
| 1188 | "group_id": 6, |
| 1189 | "owner_id": "834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7" |
| 1190 | }, |
| 1191 | { |
Edwin Kempin | b0a9b2b | 2013-02-15 13:25:54 +0100 | [diff] [blame] | 1192 | "id": "global%3ARegistered-Users", |
| 1193 | "url": "#/admin/groups/uuid-global%3ARegistered-Users", |
| 1194 | "options": { |
| 1195 | }, |
| 1196 | "description": "Any signed-in user", |
| 1197 | "group_id": 3, |
| 1198 | "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389" |
| 1199 | } |
| 1200 | ] |
| 1201 | ---- |
| 1202 | |
| 1203 | .List all groups that contain you as a member |
| 1204 | **** |
| 1205 | get::/accounts/self/groups/ |
| 1206 | **** |
| 1207 | |
Edwin Kempin | 76de213 | 2013-02-15 12:53:41 +0100 | [diff] [blame] | 1208 | [[get-avatar]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1209 | === Get Avatar |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1210 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1211 | 'GET /accounts/link:#account-id[\{account-id\}]/avatar' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1212 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1213 | |
Edwin Kempin | 76de213 | 2013-02-15 12:53:41 +0100 | [diff] [blame] | 1214 | Retrieves the avatar image of the user. |
| 1215 | |
| 1216 | With the `size` option (alias `s`) you can specify the preferred size |
| 1217 | in pixels (height and width). |
| 1218 | |
| 1219 | .Request |
| 1220 | ---- |
| 1221 | GET /a/accounts/john.doe@example.com/avatar?s=20 HTTP/1.0 |
| 1222 | ---- |
| 1223 | |
| 1224 | The response redirects to the URL of the avatar image. |
| 1225 | |
| 1226 | .Response |
| 1227 | ---- |
| 1228 | HTTP/1.1 302 Found |
| 1229 | Location: https://profiles/avatar/john_doe.jpeg?s=20x20 |
| 1230 | ---- |
| 1231 | |
Edwin Kempin | cc01b0b | 2013-04-25 14:37:17 +0200 | [diff] [blame] | 1232 | [[get-avatar-change-url]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1233 | === Get Avatar Change URL |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1234 | -- |
Edwin Kempin | cc01b0b | 2013-04-25 14:37:17 +0200 | [diff] [blame] | 1235 | 'GET /accounts/link:#account-id[\{account-id\}]/avatar.change.url' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1236 | -- |
Edwin Kempin | cc01b0b | 2013-04-25 14:37:17 +0200 | [diff] [blame] | 1237 | |
| 1238 | Retrieves the URL where the user can change the avatar image. |
| 1239 | |
| 1240 | .Request |
| 1241 | ---- |
| 1242 | GET /a/accounts/self/avatar.change.url HTTP/1.0 |
| 1243 | ---- |
| 1244 | |
| 1245 | .Response |
| 1246 | ---- |
| 1247 | HTTP/1.1 200 OK |
| 1248 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1249 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | cc01b0b | 2013-04-25 14:37:17 +0200 | [diff] [blame] | 1250 | |
| 1251 | https://profiles/pictures/john.doe |
| 1252 | ---- |
| 1253 | |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1254 | [[get-user-preferences]] |
| 1255 | === Get User Preferences |
| 1256 | -- |
| 1257 | 'GET /accounts/link:#account-id[\{account-id\}]/preferences' |
| 1258 | -- |
| 1259 | |
| 1260 | Retrieves the user's preferences. |
| 1261 | |
| 1262 | .Request |
| 1263 | ---- |
| 1264 | GET /a/accounts/self/preferences HTTP/1.0 |
| 1265 | ---- |
| 1266 | |
| 1267 | As result the account preferences of the user are returned as a |
| 1268 | link:#preferences-info[PreferencesInfo] entity. |
| 1269 | |
Khai Do | 8dcf701 | 2016-01-11 15:46:29 -0800 | [diff] [blame] | 1270 | Users may only retrieve the preferences for their own account, |
| 1271 | unless they are an |
| 1272 | link:access-control.html#administrators[Administrator] or a member |
| 1273 | of a group that is granted the |
| 1274 | link:access-control.html#capability_modifyAccount[ModifyAccount] |
| 1275 | capability, in which case they can retrieve the preferences for |
| 1276 | any account. |
| 1277 | |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1278 | .Response |
| 1279 | ---- |
| 1280 | HTTP/1.1 200 OK |
| 1281 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1282 | Content-Type: application/json; charset=UTF-8 |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1283 | |
| 1284 | )]}' |
| 1285 | { |
| 1286 | "changes_per_page": 25, |
Milutin Kristofic | 8aea375 | 2022-05-20 12:54:52 +0200 | [diff] [blame] | 1287 | "theme": "AUTO", |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1288 | "date_format": "STD", |
| 1289 | "time_format": "HHMM_12", |
Doug Kelly | 9538d20 | 2016-04-28 09:28:39 -0500 | [diff] [blame] | 1290 | "diff_view": "SIDE_BY_SIDE", |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1291 | "size_bar_in_change_table": true, |
Doug Kelly | 9538d20 | 2016-04-28 09:28:39 -0500 | [diff] [blame] | 1292 | "mute_common_path_prefixes": true, |
Dave Borowitz | d6ee48e | 2017-04-27 10:32:42 -0400 | [diff] [blame] | 1293 | "publish_comments_on_push": true, |
David Ostrovsky | 821c532 | 2018-06-10 16:36:42 +0200 | [diff] [blame] | 1294 | "work_in_progress_by_default": true, |
Edwin Kempin | d540a25 | 2016-09-08 13:29:03 +0200 | [diff] [blame] | 1295 | "default_base_for_merges": "FIRST_PARENT", |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1296 | "my": [ |
| 1297 | { |
| 1298 | "url": "#/dashboard/self", |
| 1299 | "name": "Changes" |
| 1300 | }, |
| 1301 | { |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1302 | "url": "#/q/has:draft", |
| 1303 | "name": "Draft Comments" |
| 1304 | }, |
| 1305 | { |
| 1306 | "url": "#/q/is:watched+is:open", |
| 1307 | "name": "Watched Changes" |
| 1308 | }, |
| 1309 | { |
| 1310 | "url": "#/q/is:starred", |
| 1311 | "name": "Starred Changes" |
| 1312 | }, |
| 1313 | { |
| 1314 | "url": "#/groups/self", |
| 1315 | "name": "Groups" |
Becky Siegel | e450a31 | 2016-12-16 10:30:50 -0800 | [diff] [blame] | 1316 | }, |
| 1317 | change_table: [] |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1318 | ] |
| 1319 | } |
| 1320 | ---- |
| 1321 | |
| 1322 | [[set-user-preferences]] |
| 1323 | === Set User Preferences |
| 1324 | -- |
| 1325 | 'PUT /accounts/link:#account-id[\{account-id\}]/preferences' |
| 1326 | -- |
| 1327 | |
| 1328 | Sets the user's preferences. |
| 1329 | |
| 1330 | The new preferences must be provided in the request body as a |
| 1331 | link:#preferences-input[PreferencesInput] entity. |
| 1332 | |
| 1333 | .Request |
| 1334 | ---- |
David Pursehouse | 037d062 | 2014-10-20 16:51:50 +0900 | [diff] [blame] | 1335 | PUT /a/accounts/self/preferences HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1336 | Content-Type: application/json; charset=UTF-8 |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1337 | |
| 1338 | { |
| 1339 | "changes_per_page": 50, |
Paladox none | 4a59770 | 2020-07-03 13:55:59 +0000 | [diff] [blame] | 1340 | "theme": "DARK", |
Becky Siegel | e450a31 | 2016-12-16 10:30:50 -0800 | [diff] [blame] | 1341 | "expand_inline_diffs": true, |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1342 | "date_format": "STD", |
| 1343 | "time_format": "HHMM_12", |
| 1344 | "size_bar_in_change_table": true, |
paladox | a8dc615 | 2021-04-11 16:07:53 +0100 | [diff] [blame] | 1345 | "disable_keyboard_shortcuts": true, |
Chris Poucet | 8c47d56 | 2021-09-17 22:47:32 +0000 | [diff] [blame] | 1346 | "disable_token_highlighting": true, |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1347 | "diff_view": "SIDE_BY_SIDE", |
Doug Kelly | 9538d20 | 2016-04-28 09:28:39 -0500 | [diff] [blame] | 1348 | "mute_common_path_prefixes": true, |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1349 | "my": [ |
| 1350 | { |
| 1351 | "url": "#/dashboard/self", |
| 1352 | "name": "Changes" |
| 1353 | }, |
| 1354 | { |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1355 | "url": "#/q/has:draft", |
| 1356 | "name": "Draft Comments" |
| 1357 | }, |
| 1358 | { |
| 1359 | "url": "#/q/is:watched+is:open", |
| 1360 | "name": "Watched Changes" |
| 1361 | }, |
| 1362 | { |
| 1363 | "url": "#/q/is:starred", |
| 1364 | "name": "Starred Changes" |
| 1365 | }, |
| 1366 | { |
| 1367 | "url": "#/groups/self", |
| 1368 | "name": "Groups" |
| 1369 | } |
Becky Siegel | e450a31 | 2016-12-16 10:30:50 -0800 | [diff] [blame] | 1370 | ], |
| 1371 | "change_table": [ |
| 1372 | "Subject", |
| 1373 | "Owner" |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1374 | ] |
| 1375 | } |
| 1376 | ---- |
| 1377 | |
| 1378 | As result the new preferences of the user are returned as a |
| 1379 | link:#preferences-info[PreferencesInfo] entity. |
| 1380 | |
| 1381 | .Response |
| 1382 | ---- |
| 1383 | HTTP/1.1 200 OK |
| 1384 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1385 | Content-Type: application/json; charset=UTF-8 |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1386 | |
| 1387 | )]}' |
| 1388 | { |
| 1389 | "changes_per_page": 50, |
Paladox none | 4a59770 | 2020-07-03 13:55:59 +0000 | [diff] [blame] | 1390 | "theme" "DARK", |
Becky Siegel | e450a31 | 2016-12-16 10:30:50 -0800 | [diff] [blame] | 1391 | "expand_inline_diffs": true, |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1392 | "date_format": "STD", |
| 1393 | "time_format": "HHMM_12", |
| 1394 | "size_bar_in_change_table": true, |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1395 | "diff_view": "SIDE_BY_SIDE", |
Dave Borowitz | d6ee48e | 2017-04-27 10:32:42 -0400 | [diff] [blame] | 1396 | "publish_comments_on_push": true, |
paladox | a8dc615 | 2021-04-11 16:07:53 +0100 | [diff] [blame] | 1397 | "disable_keyboard_shortcuts": true, |
Chris Poucet | 8c47d56 | 2021-09-17 22:47:32 +0000 | [diff] [blame] | 1398 | "disable_token_highlighting": true, |
David Ostrovsky | 821c532 | 2018-06-10 16:36:42 +0200 | [diff] [blame] | 1399 | "work_in_progress_by_default": true, |
Doug Kelly | 9538d20 | 2016-04-28 09:28:39 -0500 | [diff] [blame] | 1400 | "mute_common_path_prefixes": true, |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1401 | "my": [ |
| 1402 | { |
| 1403 | "url": "#/dashboard/self", |
| 1404 | "name": "Changes" |
| 1405 | }, |
| 1406 | { |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1407 | "url": "#/q/has:draft", |
| 1408 | "name": "Draft Comments" |
| 1409 | }, |
| 1410 | { |
| 1411 | "url": "#/q/is:watched+is:open", |
| 1412 | "name": "Watched Changes" |
| 1413 | }, |
| 1414 | { |
| 1415 | "url": "#/q/is:starred", |
| 1416 | "name": "Starred Changes" |
| 1417 | }, |
| 1418 | { |
| 1419 | "url": "#/groups/self", |
| 1420 | "name": "Groups" |
| 1421 | } |
Becky Siegel | e450a31 | 2016-12-16 10:30:50 -0800 | [diff] [blame] | 1422 | ], |
| 1423 | "change_table": [ |
| 1424 | "Subject", |
| 1425 | "Owner" |
Khai Do | 38ba5cc | 2014-07-10 20:23:20 -0700 | [diff] [blame] | 1426 | ] |
| 1427 | } |
| 1428 | ---- |
| 1429 | |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1430 | [[get-diff-preferences]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1431 | === Get Diff Preferences |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1432 | -- |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1433 | 'GET /accounts/link:#account-id[\{account-id\}]/preferences.diff' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1434 | -- |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1435 | |
| 1436 | Retrieves the diff preferences of a user. |
| 1437 | |
| 1438 | .Request |
| 1439 | ---- |
| 1440 | GET /a/accounts/self/preferences.diff HTTP/1.0 |
| 1441 | ---- |
| 1442 | |
| 1443 | As result the diff preferences of the user are returned as a |
| 1444 | link:#diff-preferences-info[DiffPreferencesInfo] entity. |
| 1445 | |
| 1446 | .Response |
| 1447 | ---- |
| 1448 | HTTP/1.1 200 OK |
| 1449 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1450 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1451 | |
| 1452 | )]}' |
| 1453 | { |
| 1454 | "context": 10, |
David Ostrovsky | 09caa54 | 2015-10-24 13:03:34 +0200 | [diff] [blame] | 1455 | "ignore_whitespace": "IGNORE_ALL", |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1456 | "intraline_difference": true, |
| 1457 | "line_length": 100, |
David Ostrovsky | ca09f47 | 2015-06-20 13:19:34 +0200 | [diff] [blame] | 1458 | "cursor_blink_rate": 500, |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1459 | "show_tabs": true, |
| 1460 | "show_whitespace_errors": true, |
| 1461 | "syntax_highlighting": true, |
Becky Siegel | d7dbed6 | 2016-10-12 10:55:26 -0700 | [diff] [blame] | 1462 | "tab_size": 8, |
| 1463 | "font_size": 12 |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 1464 | } |
| 1465 | ---- |
| 1466 | |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1467 | [[set-diff-preferences]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1468 | === Set Diff Preferences |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1469 | -- |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1470 | 'PUT /accounts/link:#account-id[\{account-id\}]/preferences.diff' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1471 | -- |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1472 | |
| 1473 | Sets the diff preferences of a user. |
| 1474 | |
| 1475 | The new diff preferences must be provided in the request body as a |
| 1476 | link:#diff-preferences-input[DiffPreferencesInput] entity. |
| 1477 | |
| 1478 | .Request |
| 1479 | ---- |
David Pursehouse | b331dbd | 2016-05-12 20:45:52 +0900 | [diff] [blame] | 1480 | PUT /a/accounts/self/preferences.diff HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1481 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1482 | |
| 1483 | { |
| 1484 | "context": 10, |
David Ostrovsky | 09caa54 | 2015-10-24 13:03:34 +0200 | [diff] [blame] | 1485 | "ignore_whitespace": "IGNORE_ALL", |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1486 | "intraline_difference": true, |
| 1487 | "line_length": 100, |
David Ostrovsky | ca09f47 | 2015-06-20 13:19:34 +0200 | [diff] [blame] | 1488 | "cursor_blink_rate": 500, |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1489 | "show_line_endings": true, |
| 1490 | "show_tabs": true, |
| 1491 | "show_whitespace_errors": true, |
| 1492 | "syntax_highlighting": true, |
Becky Siegel | d7dbed6 | 2016-10-12 10:55:26 -0700 | [diff] [blame] | 1493 | "tab_size": 8, |
| 1494 | "font_size": 12 |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1495 | } |
| 1496 | ---- |
| 1497 | |
| 1498 | As result the new diff preferences of the user are returned as a |
| 1499 | link:#diff-preferences-info[DiffPreferencesInfo] entity. |
| 1500 | |
| 1501 | .Response |
| 1502 | ---- |
| 1503 | HTTP/1.1 200 OK |
| 1504 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1505 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1506 | |
| 1507 | )]}' |
| 1508 | { |
| 1509 | "context": 10, |
David Ostrovsky | 09caa54 | 2015-10-24 13:03:34 +0200 | [diff] [blame] | 1510 | "ignore_whitespace": "IGNORE_ALL", |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1511 | "intraline_difference": true, |
| 1512 | "line_length": 100, |
| 1513 | "show_line_endings": true, |
| 1514 | "show_tabs": true, |
| 1515 | "show_whitespace_errors": true, |
| 1516 | "syntax_highlighting": true, |
Becky Siegel | d7dbed6 | 2016-10-12 10:55:26 -0700 | [diff] [blame] | 1517 | "tab_size": 8, |
| 1518 | "font_size": 12 |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 1519 | } |
| 1520 | ---- |
| 1521 | |
David Ostrovsky | 0ca0182 | 2014-11-14 20:16:57 +0100 | [diff] [blame] | 1522 | [[get-edit-preferences]] |
| 1523 | === Get Edit Preferences |
| 1524 | -- |
| 1525 | 'GET /accounts/link:#account-id[\{account-id\}]/preferences.edit' |
| 1526 | -- |
| 1527 | |
| 1528 | Retrieves the edit preferences of a user. |
| 1529 | |
| 1530 | .Request |
| 1531 | ---- |
| 1532 | GET /a/accounts/self/preferences.edit HTTP/1.0 |
| 1533 | ---- |
| 1534 | |
| 1535 | As result the edit preferences of the user are returned as a |
| 1536 | link:#edit-preferences-info[EditPreferencesInfo] entity. |
| 1537 | |
| 1538 | .Response |
| 1539 | ---- |
| 1540 | HTTP/1.1 200 OK |
| 1541 | Content-Disposition: attachment |
| 1542 | Content-Type: application/json;charset=UTF-8 |
| 1543 | |
| 1544 | )]}' |
| 1545 | { |
David Ostrovsky | 0ca0182 | 2014-11-14 20:16:57 +0100 | [diff] [blame] | 1546 | "tab_size": 4, |
| 1547 | "line_length": 80, |
Björn Pedersen | dc05038 | 2016-04-13 11:04:24 +0200 | [diff] [blame] | 1548 | "indent_unit": 2, |
David Ostrovsky | 85f843a | 2015-05-14 23:25:06 +0200 | [diff] [blame] | 1549 | "cursor_blink_rate": 530, |
David Ostrovsky | 0ca0182 | 2014-11-14 20:16:57 +0100 | [diff] [blame] | 1550 | "hide_top_menu": true, |
| 1551 | "show_whitespace_errors": true, |
David Ostrovsky | c232840 | 2015-05-15 00:00:48 +0200 | [diff] [blame] | 1552 | "hide_line_numbers": true, |
David Ostrovsky | 3cd7a19 | 2015-05-15 00:28:40 +0200 | [diff] [blame] | 1553 | "match_brackets": true, |
Paladox | ee24b3c | 2016-09-05 23:51:02 +0100 | [diff] [blame] | 1554 | "line_wrapping": false, |
Paladox none | 6406b2c | 2017-06-28 17:03:33 +0000 | [diff] [blame] | 1555 | "indent_with_tabs": false, |
David Ostrovsky | 3cd7a19 | 2015-05-15 00:28:40 +0200 | [diff] [blame] | 1556 | "auto_close_brackets": true |
David Ostrovsky | 0ca0182 | 2014-11-14 20:16:57 +0100 | [diff] [blame] | 1557 | } |
| 1558 | ---- |
| 1559 | |
| 1560 | [[set-edit-preferences]] |
| 1561 | === Set Edit Preferences |
| 1562 | -- |
| 1563 | 'PUT /accounts/link:#account-id[\{account-id\}]/preferences.edit' |
| 1564 | -- |
| 1565 | |
| 1566 | Sets the edit preferences of a user. |
| 1567 | |
| 1568 | The new edit preferences must be provided in the request body as a |
| 1569 | link:#edit-preferences-info[EditPreferencesInfo] entity. |
| 1570 | |
| 1571 | .Request |
| 1572 | ---- |
| 1573 | PUT /a/accounts/self/preferences.edit HTTP/1.0 |
| 1574 | Content-Type: application/json;charset=UTF-8 |
| 1575 | |
| 1576 | { |
David Ostrovsky | 0ca0182 | 2014-11-14 20:16:57 +0100 | [diff] [blame] | 1577 | "tab_size": 4, |
| 1578 | "line_length": 80, |
Björn Pedersen | dc05038 | 2016-04-13 11:04:24 +0200 | [diff] [blame] | 1579 | "indent_unit": 2, |
David Ostrovsky | 85f843a | 2015-05-14 23:25:06 +0200 | [diff] [blame] | 1580 | "cursor_blink_rate": 530, |
David Ostrovsky | 0ca0182 | 2014-11-14 20:16:57 +0100 | [diff] [blame] | 1581 | "hide_top_menu": true, |
| 1582 | "show_tabs": true, |
| 1583 | "show_whitespace_errors": true, |
| 1584 | "syntax_highlighting": true, |
David Ostrovsky | c232840 | 2015-05-15 00:00:48 +0200 | [diff] [blame] | 1585 | "hide_line_numbers": true, |
David Ostrovsky | 3cd7a19 | 2015-05-15 00:28:40 +0200 | [diff] [blame] | 1586 | "match_brackets": true, |
Paladox | ee24b3c | 2016-09-05 23:51:02 +0100 | [diff] [blame] | 1587 | "line_wrapping": false, |
David Ostrovsky | 3cd7a19 | 2015-05-15 00:28:40 +0200 | [diff] [blame] | 1588 | "auto_close_brackets": true |
David Ostrovsky | 0ca0182 | 2014-11-14 20:16:57 +0100 | [diff] [blame] | 1589 | } |
| 1590 | ---- |
| 1591 | |
David Ostrovsky | fc83398 | 2016-04-04 21:59:13 +0200 | [diff] [blame] | 1592 | As result the new edit preferences of the user are returned as a |
| 1593 | link:#edit-preferences-info[EditPreferencesInfo] entity. |
David Ostrovsky | 0ca0182 | 2014-11-14 20:16:57 +0100 | [diff] [blame] | 1594 | |
| 1595 | .Response |
| 1596 | ---- |
David Ostrovsky | fc83398 | 2016-04-04 21:59:13 +0200 | [diff] [blame] | 1597 | HTTP/1.1 200 OK |
| 1598 | Content-Disposition: attachment |
| 1599 | Content-Type: application/json;charset=UTF-8 |
| 1600 | |
| 1601 | )]}' |
| 1602 | { |
David Ostrovsky | fc83398 | 2016-04-04 21:59:13 +0200 | [diff] [blame] | 1603 | "tab_size": 4, |
| 1604 | "line_length": 80, |
| 1605 | "cursor_blink_rate": 530, |
| 1606 | "hide_top_menu": true, |
| 1607 | "show_whitespace_errors": true, |
| 1608 | "hide_line_numbers": true, |
| 1609 | "match_brackets": true, |
| 1610 | "auto_close_brackets": true |
| 1611 | } |
David Ostrovsky | 0ca0182 | 2014-11-14 20:16:57 +0100 | [diff] [blame] | 1612 | ---- |
| 1613 | |
Patrick Hiesel | 79230f7 | 2016-04-27 17:05:17 +0200 | [diff] [blame] | 1614 | [[get-watched-projects]] |
| 1615 | === Get Watched Projects |
| 1616 | -- |
| 1617 | 'GET /accounts/link:#account-id[\{account-id\}]/watched.projects' |
| 1618 | -- |
| 1619 | |
| 1620 | Retrieves all projects a user is watching. |
| 1621 | |
| 1622 | .Request |
| 1623 | ---- |
| 1624 | GET /a/accounts/self/watched.projects HTTP/1.0 |
| 1625 | ---- |
| 1626 | |
| 1627 | As result the watched projects of the user are returned as a list of |
| 1628 | link:#project-watch-info[ProjectWatchInfo] entities. |
| 1629 | The result is sorted by project name in ascending order. |
| 1630 | |
| 1631 | .Response |
| 1632 | ---- |
| 1633 | HTTP/1.1 200 OK |
| 1634 | Content-Disposition: attachment |
| 1635 | Content-Type: application/json; charset=UTF-8 |
| 1636 | |
| 1637 | )]}' |
| 1638 | [ |
| 1639 | { |
| 1640 | "project": "Test Project 1", |
| 1641 | "notify_new_changes": true, |
| 1642 | "notify_new_patch_sets": true, |
| 1643 | "notify_all_comments": true, |
| 1644 | }, |
| 1645 | { |
| 1646 | "project": "Test Project 2", |
| 1647 | "filter": "branch:experimental", |
| 1648 | "notify_all_comments": true, |
| 1649 | "notify_submitted_changes": true, |
| 1650 | "notify_abandoned_changes": true |
| 1651 | } |
| 1652 | ] |
| 1653 | ---- |
| 1654 | |
Patrick Hiesel | bed6d98 | 2016-04-28 10:51:47 +0200 | [diff] [blame] | 1655 | [[set-watched-projects]] |
| 1656 | === Add/Update a List of Watched Project Entities |
| 1657 | -- |
| 1658 | 'POST /accounts/link:#account-id[\{account-id\}]/watched.projects' |
| 1659 | -- |
| 1660 | |
| 1661 | Add new projects to watch or update existing watched projects. |
| 1662 | Projects that are already watched by a user will be updated with |
| 1663 | the provided configuration. All other projects in the request |
| 1664 | will be watched using the provided configuration. The posted body |
| 1665 | can contain link:#project-watch-info[ProjectWatchInfo] entities. |
| 1666 | Omitted boolean values will be set to false. |
| 1667 | |
| 1668 | .Request |
| 1669 | ---- |
| 1670 | POST /a/accounts/self/watched.projects HTTP/1.0 |
| 1671 | Content-Type: application/json;charset=UTF-8 |
| 1672 | |
| 1673 | [ |
| 1674 | { |
| 1675 | "project": "Test Project 1", |
| 1676 | "notify_new_changes": true, |
| 1677 | "notify_new_patch_sets": true, |
| 1678 | "notify_all_comments": true, |
| 1679 | } |
| 1680 | ] |
| 1681 | ---- |
| 1682 | |
| 1683 | As result the watched projects of the user are returned as a list of |
| 1684 | link:#project-watch-info[ProjectWatchInfo] entities. |
| 1685 | The result is sorted by project name in ascending order. |
| 1686 | |
| 1687 | .Response |
| 1688 | ---- |
| 1689 | HTTP/1.1 200 OK |
| 1690 | Content-Disposition: attachment |
| 1691 | Content-Type: application/json; charset=UTF-8 |
| 1692 | |
| 1693 | )]}' |
| 1694 | [ |
| 1695 | { |
| 1696 | "project": "Test Project 1", |
| 1697 | "notify_new_changes": true, |
| 1698 | "notify_new_patch_sets": true, |
| 1699 | "notify_all_comments": true, |
| 1700 | }, |
| 1701 | { |
| 1702 | "project": "Test Project 2", |
| 1703 | "notify_new_changes": true, |
| 1704 | "notify_new_patch_sets": true, |
| 1705 | "notify_all_comments": true, |
| 1706 | } |
| 1707 | ] |
| 1708 | ---- |
| 1709 | |
| 1710 | [[delete-watched-projects]] |
| 1711 | === Delete Watched Projects |
| 1712 | -- |
| 1713 | 'POST /accounts/link:#account-id[\{account-id\}]/watched.projects:delete' |
| 1714 | -- |
| 1715 | |
| 1716 | Projects posted to this endpoint will no longer be watched. The posted body |
Patrick Hiesel | 57d5075 | 2016-05-17 17:32:42 -0700 | [diff] [blame] | 1717 | can contain a list of link:#project-watch-info[ProjectWatchInfo] entities. |
Patrick Hiesel | bed6d98 | 2016-04-28 10:51:47 +0200 | [diff] [blame] | 1718 | |
| 1719 | .Request |
| 1720 | ---- |
| 1721 | POST /a/accounts/self/watched.projects:delete HTTP/1.0 |
| 1722 | Content-Type: application/json;charset=UTF-8 |
| 1723 | |
| 1724 | [ |
Patrick Hiesel | 57d5075 | 2016-05-17 17:32:42 -0700 | [diff] [blame] | 1725 | { |
| 1726 | "project": "Test Project 1", |
| 1727 | "filter": "branch:master" |
| 1728 | } |
Patrick Hiesel | bed6d98 | 2016-04-28 10:51:47 +0200 | [diff] [blame] | 1729 | ] |
| 1730 | ---- |
| 1731 | |
Patrick Hiesel | bed6d98 | 2016-04-28 10:51:47 +0200 | [diff] [blame] | 1732 | .Response |
| 1733 | ---- |
Edwin Kempin | 4020664 | 2016-07-07 11:03:36 +0200 | [diff] [blame] | 1734 | HTTP/1.1 204 No Content |
Patrick Hiesel | bed6d98 | 2016-04-28 10:51:47 +0200 | [diff] [blame] | 1735 | ---- |
| 1736 | |
Changcheng Xiao | 0748e74 | 2017-01-10 13:03:53 +0100 | [diff] [blame] | 1737 | [[get-account-external-ids]] |
| 1738 | === Get Account External IDs |
| 1739 | -- |
| 1740 | 'GET /accounts/link:#account-id[\{account-id\}]/external.ids' |
| 1741 | -- |
| 1742 | |
| 1743 | Retrieves the external ids of a user account. |
| 1744 | |
Patrick Hiesel | db627ec | 2020-02-26 13:02:19 +0100 | [diff] [blame] | 1745 | Only external ids belonging to the caller may be requested. Users that have |
| 1746 | link:access-control.html#capability_modifyAccount[Modify Account] can request |
| 1747 | external ids that belong to other accounts. |
| 1748 | |
Changcheng Xiao | 0748e74 | 2017-01-10 13:03:53 +0100 | [diff] [blame] | 1749 | .Request |
| 1750 | ---- |
| 1751 | GET /a/accounts/self/external.ids HTTP/1.0 |
| 1752 | ---- |
| 1753 | |
| 1754 | As result the external ids of the user are returned as a list of |
| 1755 | link:#account-external-id-info[AccountExternalIdInfo] entities. |
| 1756 | |
| 1757 | .Response |
| 1758 | ---- |
| 1759 | HTTP/1.1 200 OK |
| 1760 | Content-Disposition: attachment |
| 1761 | Content-Type: application/json; charset=UTF-8 |
| 1762 | |
| 1763 | )]}' |
| 1764 | [ |
| 1765 | { |
| 1766 | "identity": "username:john", |
Paladox none | c691a067 | 2021-07-10 01:00:10 +0000 | [diff] [blame] | 1767 | "email_address": "john.doe@example.com", |
Edwin Kempin | c044e74 | 2017-01-13 08:23:16 +0100 | [diff] [blame] | 1768 | "trusted": true |
Changcheng Xiao | 0748e74 | 2017-01-10 13:03:53 +0100 | [diff] [blame] | 1769 | } |
| 1770 | ] |
| 1771 | ---- |
| 1772 | |
Changcheng Xiao | 402c249 | 2017-01-16 11:38:03 +0100 | [diff] [blame] | 1773 | [[delete-account-external-ids]] |
| 1774 | === Delete Account External IDs |
| 1775 | -- |
| 1776 | 'POST /accounts/link:#account-id[\{account-id\}]/external.ids:delete' |
| 1777 | -- |
| 1778 | |
| 1779 | Delete a list of external ids for a user account. The target external ids must |
| 1780 | be provided as a list in the request body. |
| 1781 | |
Patrick Hiesel | db627ec | 2020-02-26 13:02:19 +0100 | [diff] [blame] | 1782 | Only external ids belonging to the caller may be deleted. Users that have |
| 1783 | link:access-control.html#capability_modifyAccount[Modify Account] can delete |
Matthias Sohn | 5bf213c | 2021-04-08 14:58:50 +0200 | [diff] [blame] | 1784 | external ids that belong to other accounts. External ids in the 'username:' |
| 1785 | scheme can only be deleted by users that have |
| 1786 | link:access-control.html#capability_administrateServer[Administrate Server] |
| 1787 | or both |
| 1788 | link:access-control.html#capability_maintainServer[Maintain Server] and |
| 1789 | link:access-control.html#capability__modifyAccount[Modify Account] |
| 1790 | since the user may not be able to login anymore, after the removal of the |
| 1791 | external id with scheme 'username:'. Users cannot delete their own external id |
| 1792 | with scheme 'username:' in order to prevent they can lock themselves out |
| 1793 | since they may not be able to login anymore. |
Changcheng Xiao | 402c249 | 2017-01-16 11:38:03 +0100 | [diff] [blame] | 1794 | |
| 1795 | .Request |
| 1796 | ---- |
| 1797 | POST /a/accounts/self/external.ids:delete HTTP/1.0 |
| 1798 | Content-Type: application/json;charset=UTF-8 |
| 1799 | |
Aaron Gable | 6a6285d | 2017-07-05 11:46:19 -0700 | [diff] [blame] | 1800 | [ |
Changcheng Xiao | 402c249 | 2017-01-16 11:38:03 +0100 | [diff] [blame] | 1801 | "mailto:john.doe@example.com" |
Aaron Gable | 6a6285d | 2017-07-05 11:46:19 -0700 | [diff] [blame] | 1802 | ] |
Changcheng Xiao | 402c249 | 2017-01-16 11:38:03 +0100 | [diff] [blame] | 1803 | ---- |
| 1804 | |
| 1805 | .Response |
| 1806 | ---- |
| 1807 | HTTP/1.1 204 No Content |
| 1808 | ---- |
| 1809 | |
Edwin Kempin | 2e88bb82 | 2018-04-10 09:33:22 +0200 | [diff] [blame] | 1810 | [[list-contributor-agreements]] |
| 1811 | === List Contributor Agreements |
| 1812 | -- |
| 1813 | 'GET /accounts/link:#account-id[\{account-id\}]/agreements' |
| 1814 | -- |
| 1815 | |
| 1816 | Gets a list of the user's signed contributor agreements. |
| 1817 | |
| 1818 | .Request |
| 1819 | ---- |
| 1820 | GET /a/accounts/self/agreements HTTP/1.0 |
| 1821 | ---- |
| 1822 | |
| 1823 | As response the user's signed agreements are returned as a list |
| 1824 | of link:#contributor-agreement-info[ContributorAgreementInfo] entities. |
| 1825 | |
| 1826 | .Response |
| 1827 | ---- |
| 1828 | HTTP/1.1 200 OK |
| 1829 | Content-Disposition: attachment |
| 1830 | Content-Type: application/json; charset=UTF-8 |
| 1831 | |
| 1832 | )]}' |
| 1833 | [ |
| 1834 | { |
| 1835 | "name": "Individual", |
| 1836 | "description": "If you are going to be contributing code on your own, this is the one you want. You can sign this one online.", |
| 1837 | "url": "static/cla_individual.html" |
| 1838 | } |
| 1839 | ] |
| 1840 | ---- |
| 1841 | |
Dave Borowitz | 6f3ee4b | 2018-09-07 13:18:10 -0700 | [diff] [blame] | 1842 | [delete-draft-comments] |
| 1843 | === Delete Draft Comments |
| 1844 | -- |
| 1845 | 'POST /accounts/link:#account-id[\{account-id\}]/drafts:delete' |
| 1846 | -- |
| 1847 | |
| 1848 | Deletes some or all of a user's draft comments. The set of comments to delete is |
| 1849 | specified as a link:#delete-draft-comments-input[DeleteDraftCommentsInput] |
| 1850 | entity. An empty input entity deletes all comments. |
| 1851 | |
| 1852 | Only drafts belonging to the caller may be deleted. |
| 1853 | |
| 1854 | .Request |
| 1855 | ---- |
| 1856 | POST /accounts/self/drafts.delete HTTP/1.0 |
| 1857 | Content-Type: application/json; charset=UTF-8 |
| 1858 | |
| 1859 | { |
| 1860 | "query": "is:abandoned" |
| 1861 | } |
| 1862 | ---- |
| 1863 | |
| 1864 | As a response, a list of |
| 1865 | link:#deleted-draft-comment-info[DeletedDraftCommentInfo] entities is returned. |
| 1866 | |
| 1867 | .Response |
| 1868 | ---- |
| 1869 | HTTP/1.1 200 OK |
| 1870 | Content-Disposition: attachment |
| 1871 | Content-Type: application/json; charset=UTF-8 |
| 1872 | |
| 1873 | )]}' |
| 1874 | [ |
| 1875 | { |
| 1876 | "change": { |
| 1877 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1878 | "project": "myProject", |
| 1879 | "branch": "master", |
| 1880 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1881 | "subject": "Implementing Feature X", |
| 1882 | "status": "ABANDONED", |
| 1883 | "created": "2013-02-01 09:59:32.126000000", |
| 1884 | "updated": "2013-02-21 11:16:36.775000000", |
| 1885 | "insertions": 34, |
| 1886 | "deletions": 101, |
| 1887 | "_number": 3965, |
| 1888 | "owner": { |
| 1889 | "name": "John Doe" |
| 1890 | } |
| 1891 | }, |
| 1892 | "deleted": [ |
| 1893 | { |
| 1894 | "id": "TvcXrmjM", |
| 1895 | "path": "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java", |
| 1896 | "line": 23, |
| 1897 | "message": "[nit] trailing whitespace", |
| 1898 | "updated": "2013-02-26 15:40:43.986000000" |
| 1899 | } |
| 1900 | ] |
| 1901 | } |
| 1902 | ] |
| 1903 | ---- |
| 1904 | |
Edwin Kempin | 2e88bb82 | 2018-04-10 09:33:22 +0200 | [diff] [blame] | 1905 | [[sign-contributor-agreement]] |
| 1906 | === Sign Contributor Agreement |
| 1907 | -- |
| 1908 | 'PUT /accounts/link:#account-id[\{account-id\}]/agreements' |
| 1909 | -- |
| 1910 | |
| 1911 | Signs a contributor agreement. |
| 1912 | |
| 1913 | The contributor agreement must be provided in the request body as |
| 1914 | a link:#contributor-agreement-input[ContributorAgreementInput]. |
| 1915 | |
| 1916 | .Request |
| 1917 | ---- |
| 1918 | PUT /accounts/self/agreements HTTP/1.0 |
| 1919 | Content-Type: application/json; charset=UTF-8 |
| 1920 | |
| 1921 | { |
| 1922 | "name": "Individual" |
| 1923 | } |
| 1924 | ---- |
| 1925 | |
| 1926 | As response the contributor agreement name is returned. |
| 1927 | |
| 1928 | .Response |
| 1929 | ---- |
| 1930 | HTTP/1.1 200 OK |
| 1931 | Content-Disposition: attachment |
| 1932 | Content-Type: application/json; charset=UTF-8 |
| 1933 | |
| 1934 | )]}' |
| 1935 | "Individual" |
| 1936 | ---- |
| 1937 | |
| 1938 | [[index-account]] |
| 1939 | === Index Account |
| 1940 | -- |
| 1941 | 'POST /accounts/link:#account-id[\{account-id\}]/index' |
| 1942 | -- |
| 1943 | |
| 1944 | Adds or updates the account in the secondary index. |
| 1945 | |
| 1946 | .Request |
| 1947 | ---- |
| 1948 | POST /accounts/1000096/index HTTP/1.0 |
| 1949 | ---- |
| 1950 | |
| 1951 | .Response |
| 1952 | ---- |
| 1953 | HTTP/1.1 204 No Content |
| 1954 | ---- |
| 1955 | |
Edwin Kempin | 9e972cc | 2016-04-15 10:39:13 +0200 | [diff] [blame] | 1956 | [[default-star-endpoints]] |
| 1957 | == Default Star Endpoints |
| 1958 | |
| 1959 | [[get-changes-with-default-star]] |
| 1960 | === Get Changes With Default Star |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1961 | -- |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 1962 | 'GET /accounts/link:#account-id[\{account-id\}]/starred.changes' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1963 | -- |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 1964 | |
Edwin Kempin | 9e972cc | 2016-04-15 10:39:13 +0200 | [diff] [blame] | 1965 | Gets the changes that were starred with the default star by the |
| 1966 | identified user account. This URL endpoint is functionally identical |
| 1967 | to the changes query `GET /changes/?q=is:starred`. The result is a list |
| 1968 | of link:rest-api-changes.html#change-info[ChangeInfo] entities. |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 1969 | |
| 1970 | .Request |
| 1971 | ---- |
| 1972 | GET /a/accounts/self/starred.changes |
| 1973 | ---- |
| 1974 | |
| 1975 | .Response |
| 1976 | ---- |
| 1977 | HTTP/1.1 200 OK |
| 1978 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1979 | Content-Type: application/json; charset=UTF-8 |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 1980 | |
| 1981 | )]}' |
| 1982 | [ |
| 1983 | { |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 1984 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1985 | "project": "myProject", |
| 1986 | "branch": "master", |
| 1987 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1988 | "subject": "Implementing Feature X", |
| 1989 | "status": "NEW", |
| 1990 | "created": "2013-02-01 09:59:32.126000000", |
| 1991 | "updated": "2013-02-21 11:16:36.775000000", |
Edwin Kempin | cb19d4e | 2015-11-19 18:02:18 -0800 | [diff] [blame] | 1992 | "starred": true, |
Edwin Kempin | 9e972cc | 2016-04-15 10:39:13 +0200 | [diff] [blame] | 1993 | "stars": [ |
| 1994 | "star" |
| 1995 | ], |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 1996 | "mergeable": true, |
Edwin Kempin | cb19d4e | 2015-11-19 18:02:18 -0800 | [diff] [blame] | 1997 | "submittable": false, |
| 1998 | "insertions": 145, |
| 1999 | "deletions": 12, |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 2000 | "_number": 3965, |
| 2001 | "owner": { |
| 2002 | "name": "John Doe" |
| 2003 | } |
| 2004 | } |
| 2005 | ] |
| 2006 | ---- |
| 2007 | |
David Ostrovsky | 210e4d4 | 2013-11-11 08:35:28 +0100 | [diff] [blame] | 2008 | [[star-change]] |
Edwin Kempin | 9e972cc | 2016-04-15 10:39:13 +0200 | [diff] [blame] | 2009 | === Put Default Star On Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2010 | -- |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 2011 | '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] | 2012 | -- |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 2013 | |
Edwin Kempin | 9e972cc | 2016-04-15 10:39:13 +0200 | [diff] [blame] | 2014 | Star a change with the default label. Changes starred with the default |
Gal Paikin | 1da4db8 | 2021-08-27 12:28:49 +0200 | [diff] [blame] | 2015 | label are returned for the search query `is:starred` or `has:star` |
Edwin Kempin | 9e972cc | 2016-04-15 10:39:13 +0200 | [diff] [blame] | 2016 | and automatically notify the user whenever updates are made to the |
| 2017 | change. |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 2018 | |
| 2019 | .Request |
| 2020 | ---- |
| 2021 | PUT /a/accounts/self/starred.changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940 HTTP/1.0 |
| 2022 | ---- |
| 2023 | |
| 2024 | .Response |
| 2025 | ---- |
| 2026 | HTTP/1.1 204 No Content |
| 2027 | ---- |
| 2028 | |
David Ostrovsky | 210e4d4 | 2013-11-11 08:35:28 +0100 | [diff] [blame] | 2029 | [[unstar-change]] |
Edwin Kempin | 9e972cc | 2016-04-15 10:39:13 +0200 | [diff] [blame] | 2030 | === Remove Default Star From Change |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2031 | -- |
Christian Aistleitner | fbf5f2c | 2015-06-05 01:37:11 +0200 | [diff] [blame] | 2032 | 'DELETE /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] | 2033 | -- |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 2034 | |
Edwin Kempin | 9e972cc | 2016-04-15 10:39:13 +0200 | [diff] [blame] | 2035 | Remove the default star label from a change. This stops notifications. |
Shawn Pearce | d4765db | 2013-11-08 19:19:45 -0800 | [diff] [blame] | 2036 | |
| 2037 | .Request |
| 2038 | ---- |
| 2039 | DELETE /a/accounts/self/starred.changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940 HTTP/1.0 |
| 2040 | ---- |
| 2041 | |
| 2042 | .Response |
| 2043 | ---- |
| 2044 | HTTP/1.1 204 No Content |
| 2045 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2046 | |
Edwin Kempin | f502dd0 | 2013-02-14 14:22:25 +0100 | [diff] [blame] | 2047 | [[ids]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2048 | == IDs |
Edwin Kempin | f502dd0 | 2013-02-14 14:22:25 +0100 | [diff] [blame] | 2049 | |
| 2050 | [[account-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2051 | === \{account-id\} |
Edwin Kempin | f502dd0 | 2013-02-14 14:22:25 +0100 | [diff] [blame] | 2052 | Identifier that uniquely identifies one account. |
| 2053 | |
| 2054 | This can be: |
| 2055 | |
Dave Borowitz | 540f4b4 | 2019-01-29 12:07:00 -0800 | [diff] [blame] | 2056 | * `self` or `me` for the calling user |
| 2057 | * a bare account ID ("18419") |
| 2058 | * an account ID following a name in parentheses ("Full Name (18419)") |
Edwin Kempin | f502dd0 | 2013-02-14 14:22:25 +0100 | [diff] [blame] | 2059 | * a string of the format "Full Name <email@example.com>" |
| 2060 | * just the email address ("email@example") |
Dave Borowitz | 540f4b4 | 2019-01-29 12:07:00 -0800 | [diff] [blame] | 2061 | * a full name ("Full Name") |
Edwin Kempin | f502dd0 | 2013-02-14 14:22:25 +0100 | [diff] [blame] | 2062 | * a user name ("username") |
Dave Borowitz | 540f4b4 | 2019-01-29 12:07:00 -0800 | [diff] [blame] | 2063 | |
| 2064 | In all cases, accounts that are not |
Gal Paikin | 44fbfe6 | 2019-11-15 15:09:47 -0800 | [diff] [blame] | 2065 | link:config-gerrit.html#accounts.visibility[visible] to the calling user are not |
Dave Borowitz | 540f4b4 | 2019-01-29 12:07:00 -0800 | [diff] [blame] | 2066 | considered. |
| 2067 | |
Dave Borowitz | 9f46d2e | 2019-02-08 15:01:44 -0800 | [diff] [blame] | 2068 | In all cases _except_ a bare account ID and `self`/`me`, inactive accounts are |
| 2069 | not considered. Inactive accounts should only be referenced by bare ID. |
Dave Borowitz | 540f4b4 | 2019-01-29 12:07:00 -0800 | [diff] [blame] | 2070 | |
| 2071 | If the input is a bare account ID, this will always resolve to exactly |
| 2072 | one account if there is a visible account with that ID, and zero accounts |
| 2073 | otherwise. (This is true even in corner cases like a user having a full name |
| 2074 | which is exactly a numeric account ID belonging to a different user; such a user |
| 2075 | cannot be identified by this number.) |
| 2076 | |
| 2077 | If the identifier is ambiguous or only refers to inactive accounts, the error |
| 2078 | message from the API should contain a human-readable description of how to |
| 2079 | disambiguate the request. |
| 2080 | |
| 2081 | *Note*: Except as noted above, callers should not rely on the particular |
| 2082 | priorities of any of the identifiers in the account resolution algorithm. Any |
| 2083 | other formats may be subject to future deprecation. If callers require specific |
| 2084 | searching semantics, they should use the link:#query-account[Query Account] |
| 2085 | endpoint to resolve a string to one or more accounts, then access the API using |
| 2086 | the account ID. |
Edwin Kempin | f502dd0 | 2013-02-14 14:22:25 +0100 | [diff] [blame] | 2087 | |
Edwin Kempin | 9144479 | 2013-02-15 10:09:49 +0100 | [diff] [blame] | 2088 | [[capability-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2089 | === \{capability-id\} |
Edwin Kempin | 9144479 | 2013-02-15 10:09:49 +0100 | [diff] [blame] | 2090 | Identifier of a global capability. Valid values are all field names of |
| 2091 | the link:#capability-info[CapabilityInfo] entity. |
| 2092 | |
Edwin Kempin | 493efd5 | 2013-05-16 13:32:17 +0200 | [diff] [blame] | 2093 | [[email-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2094 | === \{email-id\} |
Edwin Kempin | 0ae7af0 | 2013-05-16 13:52:53 +0200 | [diff] [blame] | 2095 | An email address, or `preferred` for the preferred email address of the |
| 2096 | user. |
Edwin Kempin | 493efd5 | 2013-05-16 13:32:17 +0200 | [diff] [blame] | 2097 | |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 2098 | [[username]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2099 | === \{username\} |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 2100 | The user name. |
| 2101 | |
Edwin Kempin | c6824ee | 2013-05-29 16:18:39 +0200 | [diff] [blame] | 2102 | [[ssh-key-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2103 | === \{ssh-key-id\} |
Edwin Kempin | c6824ee | 2013-05-29 16:18:39 +0200 | [diff] [blame] | 2104 | The sequence number of the SSH key. |
| 2105 | |
Dave Borowitz | ed170f3 | 2015-07-27 17:31:49 -0700 | [diff] [blame] | 2106 | [[gpg-key-id]] |
| 2107 | === \{gpg-key-id\} |
| 2108 | A GPG key identifier, either the 8-character hex key reported by |
| 2109 | `gpg --list-keys`, or the 40-character hex fingerprint (whitespace is |
| 2110 | ignored) reported by `gpg --list-keys --with-fingerprint`. |
| 2111 | |
Edwin Kempin | f502dd0 | 2013-02-14 14:22:25 +0100 | [diff] [blame] | 2112 | |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 2113 | [[json-entities]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2114 | == JSON Entities |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 2115 | |
Edwin Kempin | cf77a69 | 2015-07-28 11:02:40 +0200 | [diff] [blame] | 2116 | [[account-detail-info]] |
| 2117 | === AccountDetailInfo |
Edwin Kempin | 21b2a3f | 2016-07-01 11:26:35 +0200 | [diff] [blame] | 2118 | The `AccountDetailInfo` entity contains detailed information about an |
Edwin Kempin | cf77a69 | 2015-07-28 11:02:40 +0200 | [diff] [blame] | 2119 | account. |
| 2120 | |
| 2121 | `AccountDetailInfo` has the same fields as link:#account-info[ |
Edwin Kempin | cec70ccd | 2019-09-13 11:21:18 +0200 | [diff] [blame] | 2122 | AccountInfo]. In addition `AccountDetailInfo` has the following field: |
Edwin Kempin | cf77a69 | 2015-07-28 11:02:40 +0200 | [diff] [blame] | 2123 | |
| 2124 | [options="header",cols="1,^1,5"] |
| 2125 | |================================= |
| 2126 | |Field Name ||Description |
| 2127 | |`registered_on` || |
| 2128 | The link:rest-api.html#timestamp[timestamp] of when the account was |
| 2129 | registered. |
Edwin Kempin | cf77a69 | 2015-07-28 11:02:40 +0200 | [diff] [blame] | 2130 | |================================= |
| 2131 | |
Edwin Kempin | e8b63f0 | 2017-01-13 07:58:10 +0100 | [diff] [blame] | 2132 | [[account-external-id-info]] |
| 2133 | === AccountExternalIdInfo |
| 2134 | The `AccountExternalIdInfo` entity contains information for an external id of |
| 2135 | an account. |
| 2136 | |
| 2137 | [options="header",cols="1,^1,5"] |
| 2138 | |============================ |
| 2139 | |Field Name ||Description |
| 2140 | |`identity` ||The account external id. |
Paladox none | c691a067 | 2021-07-10 01:00:10 +0000 | [diff] [blame] | 2141 | |`email_address` |optional|The email address for the external id. |
Edwin Kempin | e8b63f0 | 2017-01-13 07:58:10 +0100 | [diff] [blame] | 2142 | |`trusted` |not set if `false`| |
| 2143 | Whether the external id is trusted. |
| 2144 | |`can_delete` |not set if `false`| |
| 2145 | Whether the external id can be deleted by the calling user. |
| 2146 | |============================ |
| 2147 | |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 2148 | [[account-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2149 | === AccountInfo |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 2150 | The `AccountInfo` entity contains information about an account. |
| 2151 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2152 | [options="header",cols="1,^1,5"] |
Edwin Kempin | 2eadde4 | 2016-07-01 13:33:32 +0200 | [diff] [blame] | 2153 | |=============================== |
| 2154 | |Field Name ||Description |
| 2155 | |`_account_id` ||The numeric ID of the account. |
| 2156 | |`name` |optional|The full name of the user. + |
Edwin Kempin | 2e8e9dc | 2016-07-01 11:03:57 +0200 | [diff] [blame] | 2157 | Only set if detailed account information is requested. + |
| 2158 | See option link:rest-api-changes.html#detailed-accounts[ |
| 2159 | DETAILED_ACCOUNTS] for change queries + |
Edwin Kempin | b5a8072 | 2016-07-01 16:26:54 +0200 | [diff] [blame] | 2160 | and option link:#details[DETAILS] for account queries. |
Ben Rohlfs | 9c960cb | 2020-02-02 22:12:30 +0100 | [diff] [blame] | 2161 | |`display_name` |optional|The display name of the user. + |
| 2162 | Only set if detailed account information is requested. + |
| 2163 | See option link:rest-api-changes.html#detailed-accounts[ |
| 2164 | DETAILED_ACCOUNTS] for change queries + |
| 2165 | and option link:#details[DETAILS] for account queries. |
Edwin Kempin | 2eadde4 | 2016-07-01 13:33:32 +0200 | [diff] [blame] | 2166 | |`email` |optional| |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 2167 | The email address the user prefers to be contacted through. + |
Edwin Kempin | 2e8e9dc | 2016-07-01 11:03:57 +0200 | [diff] [blame] | 2168 | Only set if detailed account information is requested. + |
| 2169 | See option link:rest-api-changes.html#detailed-accounts[ |
| 2170 | DETAILED_ACCOUNTS] for change queries + |
Edwin Kempin | 2eadde4 | 2016-07-01 13:33:32 +0200 | [diff] [blame] | 2171 | and options link:#details[DETAILS] and link:#all-emails[ |
| 2172 | ALL_EMAILS] for account queries. |
| 2173 | |`secondary_emails`|optional| |
| 2174 | A list of the secondary email addresses of the user. + |
| 2175 | Only set for account queries when the link:#all-emails[ALL_EMAILS] |
Edwin Kempin | ed77716 | 2017-11-15 08:23:40 -0800 | [diff] [blame] | 2176 | option or the link:#suggest-account[suggest] parameter is set. + |
| 2177 | Secondary emails are only included if the calling user has the |
| 2178 | link:access-control.html#capability_modifyAccount[Modify Account], and |
| 2179 | hence is allowed to see secondary emails of other users. |
Edwin Kempin | 2eadde4 | 2016-07-01 13:33:32 +0200 | [diff] [blame] | 2180 | |`username` |optional|The username of the user. + |
Edwin Kempin | 2e8e9dc | 2016-07-01 11:03:57 +0200 | [diff] [blame] | 2181 | Only set if detailed account information is requested. + |
| 2182 | See option link:rest-api-changes.html#detailed-accounts[ |
| 2183 | DETAILED_ACCOUNTS] for change queries + |
Edwin Kempin | b5a8072 | 2016-07-01 16:26:54 +0200 | [diff] [blame] | 2184 | and option link:#details[DETAILS] for account queries. |
Edwin Kempin | c9b4c6c | 2019-09-13 10:42:06 +0200 | [diff] [blame] | 2185 | |`avatars` |optional|List of link:#avatar-info[AvatarInfo] + |
| 2186 | entities that provide information about avatar images of the account. |
Edwin Kempin | 2eadde4 | 2016-07-01 13:33:32 +0200 | [diff] [blame] | 2187 | |`_more_accounts` |optional, not set if `false`| |
Edwin Kempin | 7bb93e4 | 2016-06-30 15:29:05 +0200 | [diff] [blame] | 2188 | Whether the query would deliver more results if not limited. + |
| 2189 | Only set on the last account that is returned. |
Edwin Kempin | c9b4c6c | 2019-09-13 10:42:06 +0200 | [diff] [blame] | 2190 | |`status` |optional|Status message of the account. |
Edwin Kempin | cec70ccd | 2019-09-13 11:21:18 +0200 | [diff] [blame] | 2191 | |`inactive` |not set if `false`| |
| 2192 | Whether the account is inactive. |
Patrick Hiesel | 90d26fd | 2020-08-07 16:15:54 +0200 | [diff] [blame] | 2193 | |`tags` |optional, not set if empty| |
| 2194 | List of additional tags that this account has. The only + |
| 2195 | current tag an account can have is `SERVICE_USER`. + |
| 2196 | Only set if detailed account information is requested. + |
| 2197 | See option link:rest-api-changes.html#detailed-accounts[ |
| 2198 | DETAILED_ACCOUNTS] |
Edwin Kempin | 2eadde4 | 2016-07-01 13:33:32 +0200 | [diff] [blame] | 2199 | |=============================== |
Edwin Kempin | 963dfd0 | 2013-02-27 12:39:32 +0100 | [diff] [blame] | 2200 | |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 2201 | [[account-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2202 | === AccountInput |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 2203 | The `AccountInput` entity contains information for the creation of |
| 2204 | a new account. |
| 2205 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2206 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 2207 | |============================ |
| 2208 | |Field Name ||Description |
| 2209 | |`username` |optional| |
| 2210 | The user name. If provided, must match the user name from the URL. |
| 2211 | |`name` |optional|The full name of the user. |
Ben Rohlfs | 9c960cb | 2020-02-02 22:12:30 +0100 | [diff] [blame] | 2212 | |`display_name` |optional|The display name of the user. |
Edwin Kempin | 1967a6d | 2013-05-02 09:24:34 +0200 | [diff] [blame] | 2213 | |`email` |optional|The email address of the user. |
| 2214 | |`ssh_key` |optional|The public SSH key of the user. |
| 2215 | |`http_password`|optional|The HTTP password of the user. |
| 2216 | |`groups` |optional| |
| 2217 | A list of link:rest-api-groups.html#group-id[group IDs] that identify |
| 2218 | the groups to which the user should be added. |
| 2219 | |============================ |
| 2220 | |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 2221 | [[account-name-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2222 | === AccountNameInput |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 2223 | The `AccountNameInput` entity contains information for setting a name |
| 2224 | for an account. |
| 2225 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2226 | [options="header",cols="1,^2,4"] |
Edwin Kempin | b6df039 | 2013-05-16 10:36:44 +0200 | [diff] [blame] | 2227 | |============================= |
| 2228 | |Field Name ||Description |
| 2229 | |`name` |optional|The new full name of the account. + |
| 2230 | If not set or if set to an empty string, the account name is deleted. |
| 2231 | |============================= |
| 2232 | |
Kasper Nilsson | eb64a0a | 2017-01-27 13:51:07 -0800 | [diff] [blame] | 2233 | [[account-status-input]] |
| 2234 | === AccountStatusInput |
| 2235 | The `AccountStatusInput` entity contains information for setting a status |
| 2236 | for an account. |
| 2237 | |
| 2238 | [options="header",cols="1,^2,4"] |
| 2239 | |============================= |
| 2240 | |Field Name ||Description |
| 2241 | |`status` |optional|The new status of the account. + |
| 2242 | If not set or if set to an empty string, the account status is deleted. |
| 2243 | |============================= |
| 2244 | |
Edwin Kempin | c9b4c6c | 2019-09-13 10:42:06 +0200 | [diff] [blame] | 2245 | [[avatar-info]] |
| 2246 | === AvatarInfo |
| 2247 | The `AccountInfo` entity contains information about an avatar image of |
| 2248 | an account. |
| 2249 | |
| 2250 | [options="header",cols="1,6"] |
| 2251 | |====================== |
| 2252 | |Field Name|Description |
| 2253 | |`url` |The URL to the avatar image. |
| 2254 | |`height` |The height of the avatar image in pixels. |
| 2255 | |`width` |The width of the avatar image in pixels. |
| 2256 | |====================== |
| 2257 | |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 2258 | [[capability-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2259 | === CapabilityInfo |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 2260 | The `CapabilityInfo` entity contains information about the global |
| 2261 | capabilities of a user. |
| 2262 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2263 | [options="header",cols="1,^1,5"] |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 2264 | |================================= |
| 2265 | |Field Name ||Description |
Edwin Kempin | 8f489a4 | 2013-11-15 16:26:51 +0100 | [diff] [blame] | 2266 | |`accessDatabase` |not set if `false`|Whether the user has the |
| 2267 | link:access-control.html#capability_accessDatabase[Access Database] |
| 2268 | capability. |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 2269 | |`administrateServer`|not set if `false`|Whether the user has the |
| 2270 | link:access-control.html#capability_administrateServer[Administrate |
| 2271 | Server] capability. |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 2272 | |`createAccount` |not set if `false`|Whether the user has the |
| 2273 | link:access-control.html#capability_createAccount[Create Account] |
| 2274 | capability. |
| 2275 | |`createGroup` |not set if `false`|Whether the user has the |
| 2276 | link:access-control.html#capability_createGroup[Create Group] |
| 2277 | capability. |
| 2278 | |`createProject` |not set if `false`|Whether the user has the |
| 2279 | link:access-control.html#capability_createProject[Create Project] |
| 2280 | capability. |
| 2281 | |`emailReviewers` |not set if `false`|Whether the user has the |
| 2282 | link:access-control.html#capability_emailReviewers[Email Reviewers] |
| 2283 | capability. |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 2284 | |`flushCaches` |not set if `false`|Whether the user has the |
| 2285 | link:access-control.html#capability_flushCaches[Flush Caches] |
| 2286 | capability. |
Edwin Kempin | 8f489a4 | 2013-11-15 16:26:51 +0100 | [diff] [blame] | 2287 | |`killTask` |not set if `false`|Whether the user has the |
| 2288 | link:access-control.html#capability_kill[Kill Task] capability. |
Dave Borowitz | 664d040 | 2015-06-11 15:35:48 -0400 | [diff] [blame] | 2289 | |`maintainServer` |not set if `false`|Whether the user has the |
| 2290 | link:access-control.html#capability_maintainServer[Maintain |
| 2291 | Server] capability. |
Edwin Kempin | 8f489a4 | 2013-11-15 16:26:51 +0100 | [diff] [blame] | 2292 | |`priority` |not set if `INTERACTIVE`|The name of the thread |
| 2293 | pool used by the user, see link:access-control.html#capability_priority[ |
| 2294 | Priority] capability. |
| 2295 | |`queryLimit` ||The link:access-control.html#capability_queryLimit[ |
| 2296 | Query Limit] of the user as link:#query-limit-info[QueryLimitInfo]. |
| 2297 | |`runAs` |not set if `false`|Whether the user has the |
| 2298 | link:access-control.html#capability_runAs[Run As] capability. |
| 2299 | |`runGC` |not set if `false`|Whether the user has the |
| 2300 | link:access-control.html#capability_runGC[Run Garbage Collection] |
| 2301 | capability. |
| 2302 | |`streamEvents` |not set if `false`|Whether the user has the |
| 2303 | link:access-control.html#capability_streamEvents[Stream Events] |
| 2304 | capability. |
Dave Borowitz | f3548a9 | 2014-02-20 11:02:19 -0800 | [diff] [blame] | 2305 | |`viewAllAccounts` |not set if `false`|Whether the user has the |
| 2306 | link:access-control.html#capability_viewAllAccounts[View All Accounts] |
| 2307 | capability. |
Edwin Kempin | 8f489a4 | 2013-11-15 16:26:51 +0100 | [diff] [blame] | 2308 | |`viewCaches` |not set if `false`|Whether the user has the |
| 2309 | link:access-control.html#capability_viewCaches[View Caches] capability. |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 2310 | |`viewConnections` |not set if `false`|Whether the user has the |
| 2311 | link:access-control.html#capability_viewConnections[View Connections] |
| 2312 | capability. |
Edwin Kempin | 362b14d1 | 2014-05-09 14:18:12 +0200 | [diff] [blame] | 2313 | |`viewPlugins` |not set if `false`|Whether the user has the |
| 2314 | link:access-control.html#capability_viewPlugins[View Plugins] capability. |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 2315 | |`viewQueue` |not set if `false`|Whether the user has the |
| 2316 | link:access-control.html#capability_viewQueue[View Queue] capability. |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 2317 | |================================= |
| 2318 | |
David Pursehouse | 4578763 | 2016-05-02 22:30:59 +0900 | [diff] [blame] | 2319 | [[contributor-agreement-info]] |
| 2320 | === ContributorAgreementInfo |
| 2321 | |
| 2322 | The `ContributorAgreementInfo` entity contains information about a |
| 2323 | contributor agreement. |
| 2324 | |
Edwin Kempin | 54a0fad | 2019-12-30 13:21:28 +0100 | [diff] [blame] | 2325 | [options="header",cols="1,^1,5"] |
| 2326 | |================================ |
| 2327 | |Field Name ||Description |
| 2328 | |`name` ||The unique name of the contributor agreement. |
| 2329 | |`description` ||The description of the contributor agreement. |
| 2330 | |`url` ||The URL of the contributor agreement. |
| 2331 | |`auto_verify_group`|optional| |
| 2332 | The group to which a user that signs the contributor agreement online |
| 2333 | is added automatically as a link:rest-api-groups.html#group-info[ |
| 2334 | GroupInfo] entity. If not set, users cannot sign the contributor |
| 2335 | agreement online. |
| 2336 | |================================ |
David Pursehouse | 4578763 | 2016-05-02 22:30:59 +0900 | [diff] [blame] | 2337 | |
| 2338 | [[contributor-agreement-input]] |
| 2339 | === ContributorAgreementInput |
| 2340 | The `ContributorAgreementInput` entity contains information about a |
| 2341 | new contributor agreement. |
| 2342 | |
| 2343 | [options="header",cols="1,6"] |
| 2344 | |================================= |
| 2345 | |Field Name |Description |
| 2346 | |`name` |The name of the agreement. |
| 2347 | |================================= |
| 2348 | |
Dave Borowitz | 6f3ee4b | 2018-09-07 13:18:10 -0700 | [diff] [blame] | 2349 | [[delete-draft-comments-input]] |
| 2350 | === DeleteDraftCommentsInput |
| 2351 | The `DeleteDraftCommentsInput` entity contains information specifying a set of |
| 2352 | draft comments that should be deleted. |
| 2353 | |
| 2354 | [options="header",cols="1,^1,5"] |
| 2355 | |================================= |
| 2356 | |Field Name ||Description |
| 2357 | |`query` |optional| |
| 2358 | A link:user-search.html[change query] limiting results to changes matching this |
| 2359 | query; `has:draft` is implied and not necessary to list explicitly. If not set, |
| 2360 | matches all changes with drafts. |
| 2361 | |================================= |
| 2362 | |
| 2363 | [[deleted-draft-comment-info]] |
| 2364 | === DeletedDraftCommentInfo |
| 2365 | The `DeletedDraftCommentInfo` entity contains information about draft comments |
| 2366 | that were deleted. |
| 2367 | |
| 2368 | [options="header",cols="1,6"] |
| 2369 | |================================= |
| 2370 | |Field Name |Description |
| 2371 | |`change` | |
| 2372 | link:rest-api-changes.html#change-info[ChangeInfo] entity describing the change |
Patrick Hiesel | a4824db | 2019-12-20 10:55:26 +0100 | [diff] [blame] | 2373 | on which one or more comments was deleted. Populated with no change list |
| 2374 | options. |
Dave Borowitz | 6f3ee4b | 2018-09-07 13:18:10 -0700 | [diff] [blame] | 2375 | |`deleted` | |
| 2376 | List of link:rest-api-changes.html#comment-info[CommentInfo] entities for each |
| 2377 | comment that was deleted. |
| 2378 | |================================= |
| 2379 | |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2380 | [[diff-preferences-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2381 | === DiffPreferencesInfo |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2382 | The `DiffPreferencesInfo` entity contains information about the diff |
| 2383 | preferences of a user. |
| 2384 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2385 | [options="header",cols="1,^1,5"] |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2386 | |=========================================== |
| 2387 | |Field Name ||Description |
| 2388 | |`context` || |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2389 | The number of lines of context when viewing a patch. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2390 | |`expand_all_comments` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2391 | Whether all inline comments should be automatically expanded. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2392 | |`ignore_whitespace` || |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2393 | Whether whitespace changes should be ignored and if yes, which |
| 2394 | whitespace changes should be ignored. + |
David Ostrovsky | 09caa54 | 2015-10-24 13:03:34 +0200 | [diff] [blame] | 2395 | Allowed values are `IGNORE_NONE`, `IGNORE_TRAILING`, |
| 2396 | `IGNORE_LEADING_AND_TRAILING`, `IGNORE_ALL`. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2397 | |`intraline_difference` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2398 | Whether intraline differences should be highlighted. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2399 | |`line_length` || |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2400 | Number of characters that should be displayed in one line. |
David Ostrovsky | ca09f47 | 2015-06-20 13:19:34 +0200 | [diff] [blame] | 2401 | |`cursor_blink_rate` || |
| 2402 | Half-period in milliseconds used for cursor blinking. |
| 2403 | Setting it to 0 disables cursor blinking. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2404 | |`manual_review` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2405 | Whether the 'Reviewed' flag should not be set automatically on a patch |
| 2406 | when it is viewed. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2407 | |`retain_header` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2408 | Whether the header that is displayed above the patch (that either shows |
| 2409 | the commit message, the diff preferences, the patch sets or the files) |
| 2410 | should be retained on file switch. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2411 | |`show_line_endings` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2412 | Whether Windows EOL/Cr-Lf should be displayed as '\r' in a dotted-line |
| 2413 | box. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2414 | |`show_tabs` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2415 | Whether tabs should be shown. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2416 | |`show_whitespace_errors` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2417 | Whether whitespace errors should be shown. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2418 | |`skip_deleted` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2419 | Whether deleted files should be skipped on file switch. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2420 | |`skip_uncommented` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2421 | Whether uncommented files should be skipped on file switch. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2422 | |`syntax_highlighting` |not set if `false`| |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2423 | Whether syntax highlighting should be enabled. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2424 | |`hide_top_menu` |not set if `false`| |
David Ostrovsky | 0ca0182 | 2014-11-14 20:16:57 +0100 | [diff] [blame] | 2425 | If true the top menu header and site header are hidden. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2426 | |`auto_hide_diff_table_header` |not set if `false`| |
| 2427 | If true the diff table header is automatically hidden when |
| 2428 | scrolling down more than half of a page. |
| 2429 | |`hide_line_numbers` |not set if `false`| |
Shawn Pearce | ba312d2e | 2013-12-12 16:36:03 -0800 | [diff] [blame] | 2430 | If true the line numbers are hidden. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2431 | |`tab_size` || |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2432 | Number of spaces that should be used to display one tab. |
Becky Siegel | d7dbed6 | 2016-10-12 10:55:26 -0700 | [diff] [blame] | 2433 | |`font_size` || |
| 2434 | Default font size in pixels for change to be displayed in the diff view. |
David Ostrovsky | 0214244 | 2014-11-24 08:52:14 +0100 | [diff] [blame] | 2435 | |'hide_empty_pane' |not set if `false`| |
| 2436 | Whether empty panes should be hidden. The left pane is empty when a |
| 2437 | file was added; the right pane is empty when a file was deleted. |
David Ostrovsky | 188b823 | 2015-06-20 13:57:35 +0200 | [diff] [blame] | 2438 | |`match_brackets` |not set if `false`| |
| 2439 | Whether matching brackets should be highlighted. |
Paladox | ee24b3c | 2016-09-05 23:51:02 +0100 | [diff] [blame] | 2440 | |`line_wrapping` |not set if `false`| |
| 2441 | Whether to enable line wrapping or not. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2442 | |=========================================== |
Edwin Kempin | e5d563f5 | 2013-03-21 09:35:38 +0100 | [diff] [blame] | 2443 | |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2444 | [[diff-preferences-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2445 | === DiffPreferencesInput |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2446 | The `DiffPreferencesInput` entity contains information for setting the |
| 2447 | diff preferences of a user. Fields which are not set will not be |
| 2448 | updated. |
| 2449 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2450 | [options="header",cols="1,^1,5"] |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2451 | |=========================================== |
| 2452 | |Field Name ||Description |
| 2453 | |`context` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2454 | The number of lines of context when viewing a patch. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2455 | |`expand_all_comments` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2456 | Whether all inline comments should be automatically expanded. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2457 | |`ignore_whitespace` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2458 | Whether whitespace changes should be ignored and if yes, which |
| 2459 | whitespace changes should be ignored. + |
David Ostrovsky | 09caa54 | 2015-10-24 13:03:34 +0200 | [diff] [blame] | 2460 | Allowed values are `IGNORE_NONE`, `IGNORE_TRAILING`, |
| 2461 | `IGNORE_LEADING_AND_TRAILING`, `IGNORE_ALL`. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2462 | |`intraline_difference` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2463 | Whether intraline differences should be highlighted. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2464 | |`line_length` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2465 | Number of characters that should be displayed in one line. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2466 | |`manual_review` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2467 | Whether the 'Reviewed' flag should not be set automatically on a patch |
| 2468 | when it is viewed. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2469 | |`retain_header` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2470 | Whether the header that is displayed above the patch (that either shows |
| 2471 | the commit message, the diff preferences, the patch sets or the files) |
| 2472 | should be retained on file switch. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2473 | |`show_line_endings` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2474 | Whether Windows EOL/Cr-Lf should be displayed as '\r' in a dotted-line |
| 2475 | box. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2476 | |`show_tabs` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2477 | Whether tabs should be shown. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2478 | |`show_whitespace_errors` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2479 | Whether whitespace errors should be shown. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2480 | |`skip_deleted` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2481 | Whether deleted files should be skipped on file switch. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2482 | |`skip_uncommented` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2483 | Whether uncommented files should be skipped on file switch. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2484 | |`syntax_highlighting` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2485 | Whether syntax highlighting should be enabled. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2486 | |`hide_top_menu` |optional| |
Shawn Pearce | ba312d2e | 2013-12-12 16:36:03 -0800 | [diff] [blame] | 2487 | True if the top menu header and site header should be hidden. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2488 | |`auto_hide_diff_table_header` |optional| |
| 2489 | True if the diff table header is automatically hidden when |
| 2490 | scrolling down more than half of a page. |
| 2491 | |`hide_line_numbers` |optional| |
Shawn Pearce | ba312d2e | 2013-12-12 16:36:03 -0800 | [diff] [blame] | 2492 | True if the line numbers should be hidden. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2493 | |`tab_size` |optional| |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2494 | Number of spaces that should be used to display one tab. |
Becky Siegel | d7dbed6 | 2016-10-12 10:55:26 -0700 | [diff] [blame] | 2495 | |`font_size` |optional| |
| 2496 | Default font size in pixels for change to be displayed in the diff view. |
Paladox | ee24b3c | 2016-09-05 23:51:02 +0100 | [diff] [blame] | 2497 | |`line_wrapping` |optional| |
| 2498 | Whether to enable line wrapping or not. |
Paladox none | 6406b2c | 2017-06-28 17:03:33 +0000 | [diff] [blame] | 2499 | |`indent_with_tabs` |optional| |
| 2500 | Whether to enable indent with tabs or not. |
Edwin Kempin | 1b6c6d8 | 2014-09-11 23:36:43 +0200 | [diff] [blame] | 2501 | |=========================================== |
Edwin Kempin | 3cdd0e0 | 2013-03-22 09:42:15 +0100 | [diff] [blame] | 2502 | |
David Ostrovsky | 0ca0182 | 2014-11-14 20:16:57 +0100 | [diff] [blame] | 2503 | [[edit-preferences-info]] |
| 2504 | === EditPreferencesInfo |
| 2505 | The `EditPreferencesInfo` entity contains information about the edit |
| 2506 | preferences of a user. |
| 2507 | |
| 2508 | [options="header",cols="1,^1,5"] |
| 2509 | |=========================================== |
| 2510 | |Field Name ||Description |
David Ostrovsky | 0ca0182 | 2014-11-14 20:16:57 +0100 | [diff] [blame] | 2511 | |`tab_size` || |
| 2512 | Number of spaces that should be used to display one tab. |
| 2513 | |`line_length` || |
| 2514 | Number of characters that should be displayed per line. |
Björn Pedersen | dc05038 | 2016-04-13 11:04:24 +0200 | [diff] [blame] | 2515 | |`indent_unit` || |
| 2516 | Number of spaces that should be used for auto-indent. |
David Ostrovsky | 85f843a | 2015-05-14 23:25:06 +0200 | [diff] [blame] | 2517 | |`cursor_blink_rate` || |
| 2518 | Half-period in milliseconds used for cursor blinking. |
| 2519 | Setting it to 0 disables cursor blinking. |
David Ostrovsky | 0ca0182 | 2014-11-14 20:16:57 +0100 | [diff] [blame] | 2520 | |`hide_top_menu` |not set if `false`| |
| 2521 | If true the top menu header and site header is hidden. |
| 2522 | |`show_tabs` |not set if `false`| |
| 2523 | Whether tabs should be shown. |
| 2524 | |`show_whitespace_errors` |not set if `false`| |
| 2525 | Whether whitespace errors should be shown. |
| 2526 | |`syntax_highlighting` |not set if `false`| |
| 2527 | Whether syntax highlighting should be enabled. |
| 2528 | |`hide_line_numbers` |not set if `false`| |
| 2529 | Whether line numbers should be hidden. |
David Ostrovsky | c232840 | 2015-05-15 00:00:48 +0200 | [diff] [blame] | 2530 | |`match_brackets` |not set if `false`| |
| 2531 | Whether matching brackets should be highlighted. |
Paladox | ee24b3c | 2016-09-05 23:51:02 +0100 | [diff] [blame] | 2532 | |`line_wrapping` |not set if `false`| |
| 2533 | Whether to enable line wrapping or not. |
Paladox none | a22c508 | 2017-12-30 16:45:46 +0000 | [diff] [blame] | 2534 | |`indent_with_tabs` |not set if `false`| |
| 2535 | Whether to indent with tabs or not. |
David Ostrovsky | 3cd7a19 | 2015-05-15 00:28:40 +0200 | [diff] [blame] | 2536 | |`auto_close_brackets` |not set if `false`| |
| 2537 | Whether brackets and quotes should be auto-closed during typing. |
Paladox none | a22c508 | 2017-12-30 16:45:46 +0000 | [diff] [blame] | 2538 | |`show_base` |not set if `false`| |
| 2539 | Whether to show the inline edit base version or not. |
David Ostrovsky | 0ca0182 | 2014-11-14 20:16:57 +0100 | [diff] [blame] | 2540 | |=========================================== |
| 2541 | |
Edwin Kempin | a1be4c2 | 2013-05-16 13:00:11 +0200 | [diff] [blame] | 2542 | [[email-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2543 | === EmailInfo |
Edwin Kempin | a1be4c2 | 2013-05-16 13:00:11 +0200 | [diff] [blame] | 2544 | The `EmailInfo` entity contains information about an email address of a |
| 2545 | user. |
| 2546 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2547 | [options="header",cols="1,^1,5"] |
Edwin Kempin | a1be4c2 | 2013-05-16 13:00:11 +0200 | [diff] [blame] | 2548 | |======================== |
| 2549 | |Field Name ||Description |
| 2550 | |`email` ||The email address. |
| 2551 | |`preferred`|not set if `false`| |
| 2552 | Whether this is the preferred email address of the user. |
Shawn Pearce | 3982088 | 2013-05-23 08:00:58 -0700 | [diff] [blame] | 2553 | |`pending_confirmation`|not set if `false`| |
| 2554 | Set true if the user must confirm control of the email address |
| 2555 | by following a verification link before Gerrit will permit use of |
| 2556 | this address. |
Edwin Kempin | a1be4c2 | 2013-05-16 13:00:11 +0200 | [diff] [blame] | 2557 | |======================== |
| 2558 | |
Edwin Kempin | 3f48c24 | 2013-05-17 10:55:07 +0200 | [diff] [blame] | 2559 | [[email-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2560 | === EmailInput |
Edwin Kempin | 3f48c24 | 2013-05-17 10:55:07 +0200 | [diff] [blame] | 2561 | The `EmailInput` entity contains information for registering a new |
| 2562 | email address. |
| 2563 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2564 | [options="header",cols="1,^1,5"] |
Edwin Kempin | c99e5a6 | 2013-05-17 11:21:27 +0200 | [diff] [blame] | 2565 | |============================== |
| 2566 | |Field Name ||Description |
| 2567 | |`email` || |
Edwin Kempin | 3f48c24 | 2013-05-17 10:55:07 +0200 | [diff] [blame] | 2568 | The email address. If provided, must match the email address from the |
| 2569 | URL. |
Edwin Kempin | c99e5a6 | 2013-05-17 11:21:27 +0200 | [diff] [blame] | 2570 | |`preferred` |`false` if not set| |
Edwin Kempin | 3f48c24 | 2013-05-17 10:55:07 +0200 | [diff] [blame] | 2571 | Whether the new email address should become the preferred email address |
Edwin Kempin | 4c454e6 | 2013-05-27 11:21:55 +0200 | [diff] [blame] | 2572 | of the user (only supported if `no_confirmation` is set or if the |
| 2573 | authentication type is `DEVELOPMENT_BECOME_ANY_ACCOUNT`). |
Edwin Kempin | c99e5a6 | 2013-05-17 11:21:27 +0200 | [diff] [blame] | 2574 | |`no_confirmation`|`false` if not set| |
| 2575 | Whether the email address should be added without confirmation. In this |
| 2576 | case no verification email is sent to the user. + |
| 2577 | Only Gerrit administrators are allowed to add email addresses without |
| 2578 | confirmation. |
| 2579 | |============================== |
Edwin Kempin | 3f48c24 | 2013-05-17 10:55:07 +0200 | [diff] [blame] | 2580 | |
Dave Borowitz | ed170f3 | 2015-07-27 17:31:49 -0700 | [diff] [blame] | 2581 | [[gpg-key-info]] |
| 2582 | === GpgKeyInfo |
| 2583 | The `GpgKeyInfo` entity contains information about a GPG public key. |
| 2584 | |
| 2585 | [options="header",cols="1,^1,5"] |
| 2586 | |======================== |
| 2587 | |Field Name ||Description |
| 2588 | |`id` |Not set in map context|The 8-char hex GPG key ID. |
Dave Borowitz | eab3aff | 2015-08-04 14:15:50 -0700 | [diff] [blame] | 2589 | |`fingerprint`|Not set for deleted keys|The 40-char (plus spaces) hex GPG key fingerprint. |
| 2590 | |`user_ids` |Not set for deleted keys| |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 2591 | link:https://tools.ietf.org/html/rfc4880#section-5.11[OpenPGP User IDs,role=external,window=_blank] |
Dave Borowitz | ed170f3 | 2015-07-27 17:31:49 -0700 | [diff] [blame] | 2592 | associated with the public key. |
Dave Borowitz | eab3aff | 2015-08-04 14:15:50 -0700 | [diff] [blame] | 2593 | |`key` |Not set for deleted keys|ASCII armored public key material. |
Dave Borowitz | 36b35b9 | 2015-09-14 12:34:13 -0400 | [diff] [blame] | 2594 | |`status` |Not set for deleted keys| |
| 2595 | The result of server-side checks on the key; one of `BAD`, `OK`, or `TRUSTED`. |
| 2596 | `BAD` keys have serious problems and should not be used. If a key is `OK, |
| 2597 | inspecting only that key found no problems, but the system does not fully trust |
| 2598 | the key's origin. A `TRUSTED` key is valid, and the system knows enough about |
| 2599 | the key and its origin to trust it. |
| 2600 | |`problems` |Not set for deleted keys| |
| 2601 | A list of human-readable problem strings found in the course of checking whether |
| 2602 | the key is valid and trusted. |
Dave Borowitz | ed170f3 | 2015-07-27 17:31:49 -0700 | [diff] [blame] | 2603 | |======================== |
| 2604 | |
Dave Borowitz | 73cfbe6 | 2015-08-27 16:36:41 -0400 | [diff] [blame] | 2605 | [[gpg-keys-input]] |
| 2606 | === GpgKeysInput |
| 2607 | The `GpgKeysInput` entity contains information for adding/deleting GPG keys. |
Dave Borowitz | ed170f3 | 2015-07-27 17:31:49 -0700 | [diff] [blame] | 2608 | |
| 2609 | [options="header",cols="1,6"] |
| 2610 | |======================== |
| 2611 | |Field Name|Description |
| 2612 | |`add` |List of ASCII armored public key strings to add. |
Dave Borowitz | eab3aff | 2015-08-04 14:15:50 -0700 | [diff] [blame] | 2613 | |`delete` |List of link:#gpg-key-id[`\{gpg-key-id\}`]s to delete. |
Dave Borowitz | ed170f3 | 2015-07-27 17:31:49 -0700 | [diff] [blame] | 2614 | |======================== |
| 2615 | |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 2616 | [[http-password-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2617 | === HttpPasswordInput |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 2618 | The `HttpPasswordInput` entity contains information for setting/generating |
| 2619 | an HTTP password. |
| 2620 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2621 | [options="header",cols="1,^1,5"] |
Edwin Kempin | d9cdf5e | 2013-05-28 11:23:10 +0200 | [diff] [blame] | 2622 | |============================ |
| 2623 | |Field Name ||Description |
| 2624 | |`generate` |`false` if not set| |
| 2625 | Whether a new HTTP password should be generated |
| 2626 | |`http_password`|optional| |
| 2627 | The new HTTP password. Only Gerrit administrators may set the HTTP |
| 2628 | password directly. + |
| 2629 | If empty or not set and `generate` is false or not set, the HTTP |
| 2630 | password is deleted. |
| 2631 | |============================ |
| 2632 | |
Michael Ochmann | e56acd6 | 2015-12-15 15:59:42 +0100 | [diff] [blame] | 2633 | [[oauth-token-info]] |
| 2634 | === OAuthTokenInfo |
| 2635 | The `OAuthTokenInfo` entity contains information about an OAuth access token. |
| 2636 | |
| 2637 | [options="header",cols="1,^1,5"] |
| 2638 | |======================== |
| 2639 | |Field Name ||Description |
| 2640 | |`username` ||The owner of the OAuth access token. |
| 2641 | |`resource_host` ||The host of the Gerrit instance. |
| 2642 | |`access_token` ||The actual token value. |
| 2643 | |`provider_id` |optional| |
| 2644 | The identifier of the OAuth provider in the form `plugin-name:provider-name`. |
| 2645 | |`expires_at` |optional|Time of expiration of this token in milliseconds. |
| 2646 | |`type` ||The type of the OAuth access token, always `bearer`. |
| 2647 | |======================== |
| 2648 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2649 | [[preferences-info]] |
| 2650 | === PreferencesInfo |
| 2651 | The `PreferencesInfo` entity contains information about a user's preferences. |
| 2652 | |
| 2653 | [options="header",cols="1,^1,5"] |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2654 | |============================================ |
| 2655 | |Field Name ||Description |
| 2656 | |`changes_per_page` || |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2657 | The number of changes to show on each page. |
| 2658 | Allowed values are `10`, `25`, `50`, `100`. |
Paladox none | 4a59770 | 2020-07-03 13:55:59 +0000 | [diff] [blame] | 2659 | |`theme` || |
| 2660 | Which theme to use. |
Milutin Kristofic | 03527b2 | 2022-05-20 10:07:30 +0200 | [diff] [blame] | 2661 | Allowed values are `AUTO` or `DARK` or `LIGHT`. |
Becky Siegel | e450a31 | 2016-12-16 10:30:50 -0800 | [diff] [blame] | 2662 | |`expand_inline_diffs` |not set if `false`| |
| 2663 | Whether to expand diffs inline instead of opening as separate page |
Ben Rohlfs | da0a62b | 2021-04-26 17:02:19 +0200 | [diff] [blame] | 2664 | (Gerrit web app UI only). |
Marco Miller | a8614b7 | 2016-04-28 10:51:24 -0400 | [diff] [blame] | 2665 | |`download_scheme` |optional| |
Dave Borowitz | b06b93f | 2015-09-03 16:38:54 -0400 | [diff] [blame] | 2666 | The type of download URL the user prefers to use. May be any key from |
| 2667 | the `schemes` map in |
| 2668 | link:rest-api-config.html#download-info[DownloadInfo]. |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2669 | |`date_format` || |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2670 | The format to display the date in. |
| 2671 | Allowed values are `STD`, `US`, `ISO`, `EURO`, `UK`. |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2672 | |`time_format` || |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2673 | The format to display the time in. |
| 2674 | Allowed values are `HHMM_12`, `HHMM_24`. |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2675 | |`relative_date_in_change_table`|not set if `false`| |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2676 | Whether to show relative dates in the changes table. |
Edwin Kempin | d0caa06 | 2016-09-16 14:04:12 +0200 | [diff] [blame] | 2677 | |`diff_view` || |
| 2678 | The type of diff view to show. |
| 2679 | Allowed values are `SIDE_BY_SIDE`, `UNIFIED_DIFF`. |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2680 | |`size_bar_in_change_table` |not set if `false`| |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2681 | Whether to show the change sizes as colored bars in the change table. |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2682 | |`legacycid_in_change_table` |not set if `false`| |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2683 | Whether to show change number in the change table. |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2684 | |`mute_common_path_prefixes` |not set if `false`| |
David Pursehouse | 751441f | 2015-01-30 15:54:52 +0900 | [diff] [blame] | 2685 | Whether to mute common path prefixes in file names in the file table. |
David Ostrovsky | 5d8f62c | 2015-11-01 22:49:28 +0100 | [diff] [blame] | 2686 | |`signed_off_by` |not set if `false`| |
| 2687 | Whether to insert Signed-off-by footer in changes created with the |
| 2688 | inline edit feature. |
Edwin Kempin | 964ea93 | 2015-07-16 13:32:58 +0200 | [diff] [blame] | 2689 | |`my` || |
| 2690 | The menu items of the `MY` top menu as a list of |
| 2691 | link:rest-api-config.html#top-menu-item-info[TopMenuItemInfo] entities. |
Becky Siegel | e450a31 | 2016-12-16 10:30:50 -0800 | [diff] [blame] | 2692 | |`change_table` || |
Ben Rohlfs | da0a62b | 2021-04-26 17:02:19 +0200 | [diff] [blame] | 2693 | The columns to display in the change table (Gerrit web app UI only). The |
| 2694 | default is empty, which will default columns as determined by the frontend. |
Marco Miller | a8614b7 | 2016-04-28 10:51:24 -0400 | [diff] [blame] | 2695 | |`email_strategy` || |
Mani Chandel | 207fa6e | 2014-07-08 17:13:12 +0530 | [diff] [blame] | 2696 | The type of email strategy to use. On `ENABLED`, the user will receive emails |
| 2697 | from Gerrit. On `CC_ON_OWN_COMMENTS` the user will also receive emails for |
Gal Paikin | fd23888 | 2020-10-09 18:40:52 +0200 | [diff] [blame] | 2698 | their own comments. On `ATTENTION_SET_ONLY`, on emails about changes, the user |
| 2699 | will receive emails only if they are in the attention set of that change. |
| 2700 | On `DISABLED` the user will not receive any email notifications from Gerrit. |
| 2701 | Allowed values are `ENABLED`, `CC_ON_OWN_COMMENTS`, `ATTENTION_SET_ONLY`, |
| 2702 | `DISABLED`. |
Edwin Kempin | d540a25 | 2016-09-08 13:29:03 +0200 | [diff] [blame] | 2703 | |`default_base_for_merges` || |
| 2704 | The base which should be pre-selected in the 'Diff Against' drop-down |
| 2705 | list when the change screen is opened for a merge commit. |
| 2706 | Allowed values are `AUTO_MERGE` and `FIRST_PARENT`. |
Dhruv Srivastava | a5867c0 | 2020-12-21 18:18:20 +0100 | [diff] [blame] | 2707 | |`disable_keyboard_shortcuts` |not set if `false`| |
| 2708 | Whether to disable all keyboard shortcuts. |
Chris Poucet | 8c47d56 | 2021-09-17 22:47:32 +0000 | [diff] [blame] | 2709 | |`disable_token_highlighting` [not set if `false`] |
| 2710 | Whether to disable token highlighting on hover. |
Dave Borowitz | d6ee48e | 2017-04-27 10:32:42 -0400 | [diff] [blame] | 2711 | |`publish_comments_on_push` |not set if `false`| |
| 2712 | Whether to link:user-upload.html#publish-comments[publish draft comments] on |
| 2713 | push by default. |
David Ostrovsky | 821c532 | 2018-06-10 16:36:42 +0200 | [diff] [blame] | 2714 | |`work_in_progress_by_default` |not set if `false`| |
| 2715 | Whether to link:user-upload.html#wip[set work-in-progress] on |
| 2716 | push or on create changes online by default. |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2717 | |============================================ |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2718 | |
| 2719 | [[preferences-input]] |
| 2720 | === PreferencesInput |
| 2721 | The `PreferencesInput` entity contains information for setting the |
| 2722 | user preferences. Fields which are not set will not be updated. |
| 2723 | |
| 2724 | [options="header",cols="1,^1,5"] |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2725 | |============================================ |
| 2726 | |Field Name ||Description |
| 2727 | |`changes_per_page` |optional| |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2728 | The number of changes to show on each page. |
| 2729 | Allowed values are `10`, `25`, `50`, `100`. |
Paladox none | 4a59770 | 2020-07-03 13:55:59 +0000 | [diff] [blame] | 2730 | |`theme` |optional| |
| 2731 | Which theme to use. |
Milutin Kristofic | 03527b2 | 2022-05-20 10:07:30 +0200 | [diff] [blame] | 2732 | Allowed values are `AUTO` or `DARK` or `LIGHT`. |
Becky Siegel | e450a31 | 2016-12-16 10:30:50 -0800 | [diff] [blame] | 2733 | |`expand_inline_diffs` |not set if `false`| |
| 2734 | Whether to expand diffs inline instead of opening as separate page |
Ben Rohlfs | da0a62b | 2021-04-26 17:02:19 +0200 | [diff] [blame] | 2735 | (Gerrit web app UI only). |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2736 | |`download_scheme` |optional| |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2737 | The type of download URL the user prefers to use. |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2738 | |`date_format` |optional| |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2739 | The format to display the date in. |
| 2740 | Allowed values are `STD`, `US`, `ISO`, `EURO`, `UK`. |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2741 | |`time_format` |optional| |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2742 | The format to display the time in. |
| 2743 | Allowed values are `HHMM_12`, `HHMM_24`. |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2744 | |`relative_date_in_change_table`|optional| |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2745 | Whether to show relative dates in the changes table. |
Edwin Kempin | d0caa06 | 2016-09-16 14:04:12 +0200 | [diff] [blame] | 2746 | |`diff_view` |optional| |
| 2747 | The type of diff view to show. |
| 2748 | Allowed values are `SIDE_BY_SIDE`, `UNIFIED_DIFF`. |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2749 | |`size_bar_in_change_table` |optional| |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2750 | Whether to show the change sizes as colored bars in the change table. |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2751 | |`legacycid_in_change_table` |optional| |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2752 | Whether to show change number in the change table. |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2753 | |`mute_common_path_prefixes` |optional| |
David Pursehouse | 751441f | 2015-01-30 15:54:52 +0900 | [diff] [blame] | 2754 | Whether to mute common path prefixes in file names in the file table. |
David Ostrovsky | 5d8f62c | 2015-11-01 22:49:28 +0100 | [diff] [blame] | 2755 | |`signed_off_by` |optional| |
| 2756 | Whether to insert Signed-off-by footer in changes created with the |
| 2757 | inline edit feature. |
Edwin Kempin | 964ea93 | 2015-07-16 13:32:58 +0200 | [diff] [blame] | 2758 | |`my` |optional| |
| 2759 | The menu items of the `MY` top menu as a list of |
| 2760 | link:rest-api-config.html#top-menu-item-info[TopMenuItemInfo] entities. |
Becky Siegel | e450a31 | 2016-12-16 10:30:50 -0800 | [diff] [blame] | 2761 | |`change_table` || |
Ben Rohlfs | da0a62b | 2021-04-26 17:02:19 +0200 | [diff] [blame] | 2762 | The columns to display in the change table (Gerrit web app UI only). The |
| 2763 | default is empty, which will default columns as determined by the frontend. |
Marco Miller | a8614b7 | 2016-04-28 10:51:24 -0400 | [diff] [blame] | 2764 | |`email_strategy` |optional| |
| 2765 | The type of email strategy to use. On `ENABLED`, the user will receive emails |
| 2766 | from Gerrit. On `CC_ON_OWN_COMMENTS` the user will also receive emails for |
Gal Paikin | fd23888 | 2020-10-09 18:40:52 +0200 | [diff] [blame] | 2767 | their own comments. On `ATTENTION_SET_ONLY`, on emails about changes, the user |
| 2768 | will receive emails only if they are in the attention set of that change. |
| 2769 | On `DISABLED` the user will not receive any email notifications from Gerrit. |
| 2770 | Allowed values are `ENABLED`, `CC_ON_OWN_COMMENTS`, `ATTENTION_SET_ONLY`, |
| 2771 | `DISABLED`. |
Edwin Kempin | d540a25 | 2016-09-08 13:29:03 +0200 | [diff] [blame] | 2772 | |`default_base_for_merges` |optional| |
| 2773 | The base which should be pre-selected in the 'Diff Against' drop-down |
| 2774 | list when the change screen is opened for a merge commit. |
| 2775 | Allowed values are `AUTO_MERGE` and `FIRST_PARENT`. |
paladox | a8dc615 | 2021-04-11 16:07:53 +0100 | [diff] [blame] | 2776 | |`disable_keyboard_shortcuts` |not set if `false`| |
| 2777 | Whether to disable all keyboard shortcuts. |
Edwin Kempin | 66705cc | 2015-07-16 13:28:15 +0200 | [diff] [blame] | 2778 | |============================================ |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2779 | |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 2780 | [[query-limit-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2781 | === QueryLimitInfo |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 2782 | The `QueryLimitInfo` entity contains information about the |
| 2783 | link:access-control.html#capability_queryLimit[Query Limit] of a user. |
| 2784 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2785 | [options="header",cols="1,6"] |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 2786 | |================================ |
| 2787 | |Field Name |Description |
| 2788 | |`min` |Lower limit. |
| 2789 | |`max` |Upper limit. |
| 2790 | |================================ |
| 2791 | |
Edwin Kempin | ebccb84 | 2013-05-29 13:33:06 +0200 | [diff] [blame] | 2792 | [[ssh-key-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2793 | === SshKeyInfo |
Edwin Kempin | ebccb84 | 2013-05-29 13:33:06 +0200 | [diff] [blame] | 2794 | The `SshKeyInfo` entity contains information about an SSH key of a |
| 2795 | user. |
| 2796 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2797 | [options="header",cols="1,^1,5"] |
Edwin Kempin | ebccb84 | 2013-05-29 13:33:06 +0200 | [diff] [blame] | 2798 | |============================= |
| 2799 | |Field Name ||Description |
| 2800 | |`seq` ||The sequence number of the SSH key. |
| 2801 | |`ssh_public_key`||The complete public SSH key. |
| 2802 | |`encoded_key` ||The encoded key. |
| 2803 | |`algorithm` ||The algorithm of the SSH key. |
| 2804 | |`comment` |optional|The comment of the SSH key. |
| 2805 | |`valid` ||Whether the SSH key is valid. |
| 2806 | |============================= |
| 2807 | |
Edwin Kempin | f07e98b | 2015-07-24 11:47:57 +0200 | [diff] [blame] | 2808 | [[username-input]] |
| 2809 | === UsernameInput |
| 2810 | The `UsernameInput` entity contains information for setting the |
| 2811 | username for an account. |
| 2812 | |
| 2813 | [options="header",cols="1,6"] |
| 2814 | |======================= |
| 2815 | |Field Name |Description |
| 2816 | |`username` |The new username of the account. |
| 2817 | |======================= |
| 2818 | |
Ben Rohlfs | 9c960cb | 2020-02-02 22:12:30 +0100 | [diff] [blame] | 2819 | [[display-name-input]] |
| 2820 | === DisplayNameInput |
| 2821 | The `DisplayNameInput` entity contains information for setting the |
| 2822 | display name for an account. |
| 2823 | |
| 2824 | [options="header",cols="1,6"] |
| 2825 | |======================= |
| 2826 | |Field Name |Description |
| 2827 | |`display_name` |The new display name of the account. |
| 2828 | |======================= |
| 2829 | |
Patrick Hiesel | 79230f7 | 2016-04-27 17:05:17 +0200 | [diff] [blame] | 2830 | [[project-watch-info]] |
| 2831 | === ProjectWatchInfo |
| 2832 | The `WatchedProjectsInfo` entity contains information about a project watch |
| 2833 | for a user. |
| 2834 | |
| 2835 | [options="header",cols="1,^1,5"] |
| 2836 | |======================= |
| 2837 | |Field Name | |Description |
| 2838 | |`project` | |The name of the project. |
| 2839 | |`filter` |optional|A filter string to be applied to the project. |
| 2840 | |`notify_new_changes` |optional|Notify on new changes. |
| 2841 | |`notify_new_patch_sets` |optional|Notify on new patch sets. |
| 2842 | |`notify_all_comments` |optional|Notify on comments. |
| 2843 | |`notify_submitted_changes` |optional|Notify on submitted changes. |
| 2844 | |`notify_abandoned_changes` |optional|Notify on abandoned changes. |
| 2845 | |======================= |
Edwin Kempin | 5944d64 | 2013-02-15 09:31:42 +0100 | [diff] [blame] | 2846 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2847 | GERRIT |
| 2848 | ------ |
| 2849 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 2850 | |
| 2851 | SEARCHBOX |
| 2852 | --------- |