Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1 | = Gerrit Code Review - /projects/ REST API |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2 | |
| 3 | This page describes the project related REST endpoints. |
| 4 | Please also take note of the general information on the |
| 5 | link:rest-api.html[REST API]. |
| 6 | |
Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 7 | [[project-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 8 | == Project Endpoints |
Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 9 | |
Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 10 | [[list-projects]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 11 | === List Projects |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 12 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 13 | 'GET /projects/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 14 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 15 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 16 | Lists the projects accessible by the caller. This is the same as |
| 17 | using the link:cmd-ls-projects.html[ls-projects] command over SSH, |
| 18 | and accepts the same options as query parameters. |
| 19 | |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 20 | As result a map is returned that maps the project names to |
| 21 | link:#project-info[ProjectInfo] entries. The entries in the map are sorted |
| 22 | by project name. |
| 23 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 24 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 25 | ---- |
| 26 | GET /projects/?d HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 27 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 28 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 29 | .Response |
| 30 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 31 | HTTP/1.1 200 OK |
| 32 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 33 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 34 | |
| 35 | )]}' |
| 36 | { |
| 37 | "external/bison": { |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 38 | "id": "external%2Fbison", |
| 39 | "description": "GNU parser generator" |
| 40 | }, |
| 41 | "external/gcc": { |
Edwin Kempin | 068511b | 2015-01-20 09:17:12 +0100 | [diff] [blame] | 42 | "id": "external%2Fgcc" |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 43 | }, |
| 44 | "external/openssl": { |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 45 | "id": "external%2Fopenssl", |
| 46 | "description": "encryption\ncrypto routines" |
| 47 | }, |
| 48 | "test": { |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 49 | "id": "test", |
| 50 | "description": "\u003chtml\u003e is escaped" |
| 51 | } |
| 52 | } |
| 53 | ---- |
| 54 | |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 55 | [[project-options]] |
| 56 | ==== Project Options |
| 57 | |
| 58 | Branch(b):: |
| 59 | Limit the results to the projects having the specified branch and |
| 60 | include the sha1 of the branch in the results. |
| 61 | + |
| 62 | Get projects that have a 'master' branch: |
| 63 | + |
| 64 | .Request |
| 65 | ---- |
| 66 | GET /projects/?b=master HTTP/1.0 |
| 67 | ---- |
| 68 | + |
| 69 | .Response |
| 70 | ---- |
| 71 | HTTP/1.1 200 OK |
| 72 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 73 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 74 | |
| 75 | )]}' |
| 76 | { |
| 77 | "some-project": { |
| 78 | "id": "some-project", |
| 79 | "branches": { |
| 80 | "master": "c5ed9dfcbf002ca0e432d788dab6ca2387829ca7" |
| 81 | } |
| 82 | }, |
| 83 | "some-other-project": { |
| 84 | "id": "some-other-project", |
| 85 | "branches": { |
| 86 | "master": "ef1c270142f9581ecf768f4193fc8f8a81102ec2" |
| 87 | } |
| 88 | }, |
| 89 | } |
| 90 | ---- |
| 91 | |
| 92 | Description(d):: |
| 93 | Include project description in the results. |
| 94 | + |
| 95 | Get all the projects with their description: |
| 96 | + |
| 97 | .Request |
| 98 | ---- |
| 99 | GET /projects/?d HTTP/1.0 |
| 100 | ---- |
| 101 | + |
| 102 | .Response |
| 103 | ---- |
| 104 | HTTP/1.1 200 OK |
| 105 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 106 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 107 | |
| 108 | )]}' |
| 109 | { |
| 110 | "some-project": { |
| 111 | "id": "some-project", |
| 112 | "description": "Description of some project." |
| 113 | }, |
| 114 | "some-other-project": { |
| 115 | "id": "some-other-project", |
| 116 | "description": "Description of some other project." |
| 117 | } |
| 118 | }, |
| 119 | } |
| 120 | ---- |
| 121 | |
| 122 | Limit(n):: |
| 123 | Limit the number of projects to be included in the results. |
| 124 | + |
| 125 | Query the first project in the project list: |
| 126 | + |
| 127 | .Request |
| 128 | ---- |
| 129 | GET /projects/?n=1 HTTP/1.0 |
| 130 | ---- |
| 131 | + |
| 132 | .Response |
| 133 | ---- |
| 134 | HTTP/1.1 200 OK |
| 135 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 136 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 137 | |
| 138 | )]}' |
| 139 | { |
| 140 | "some-project": { |
| 141 | "id": "some-project" |
| 142 | } |
| 143 | } |
| 144 | ---- |
| 145 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 146 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 147 | [[suggest-projects]] |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 148 | Prefix(p):: |
| 149 | Limit the results to those projects that start with the specified |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 150 | prefix. |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 151 | + |
David Pursehouse | 0c2e4b8 | 2017-07-13 10:28:37 +0900 | [diff] [blame] | 152 | The match is case sensitive. May not be used together with `m` or `r`. |
| 153 | + |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 154 | List all projects that start with `platform/`: |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 155 | + |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 156 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 157 | ---- |
| 158 | GET /projects/?p=platform%2F HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 159 | ---- |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 160 | + |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 161 | .Response |
| 162 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 163 | HTTP/1.1 200 OK |
| 164 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 165 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 166 | |
| 167 | )]}' |
| 168 | { |
| 169 | "platform/drivers": { |
Edwin Kempin | 068511b | 2015-01-20 09:17:12 +0100 | [diff] [blame] | 170 | "id": "platform%2Fdrivers" |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 171 | }, |
| 172 | "platform/tools": { |
Edwin Kempin | 068511b | 2015-01-20 09:17:12 +0100 | [diff] [blame] | 173 | "id": "platform%2Ftools" |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 174 | } |
| 175 | } |
| 176 | ---- |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 177 | + |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 178 | E.g. this feature can be used by suggestion client UI's to limit results. |
| 179 | |
Hugo Arès | b8aae41 | 2014-07-08 11:04:43 -0400 | [diff] [blame] | 180 | Regex(r):: |
| 181 | Limit the results to those projects that match the specified regex. |
| 182 | + |
| 183 | Boundary matchers '^' and '$' are implicit. For example: the regex 'test.*' will |
| 184 | match any projects that start with 'test' and regex '.*test' will match any |
| 185 | project that end with 'test'. |
| 186 | + |
David Pursehouse | 0c2e4b8 | 2017-07-13 10:28:37 +0900 | [diff] [blame] | 187 | The match is case sensitive. May not be used together with `m` or `p`. |
| 188 | + |
Hugo Arès | b8aae41 | 2014-07-08 11:04:43 -0400 | [diff] [blame] | 189 | List all projects that match regex `test.*project`: |
| 190 | + |
| 191 | .Request |
| 192 | ---- |
| 193 | GET /projects/?r=test.*project HTTP/1.0 |
| 194 | ---- |
| 195 | + |
| 196 | .Response |
| 197 | ---- |
| 198 | HTTP/1.1 200 OK |
| 199 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 200 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | b8aae41 | 2014-07-08 11:04:43 -0400 | [diff] [blame] | 201 | |
| 202 | )]}' |
| 203 | { |
| 204 | "test/some-project": { |
Edwin Kempin | 068511b | 2015-01-20 09:17:12 +0100 | [diff] [blame] | 205 | "id": "test%2Fsome-project" |
Hugo Arès | b8aae41 | 2014-07-08 11:04:43 -0400 | [diff] [blame] | 206 | }, |
| 207 | "test/some-other-project": { |
Edwin Kempin | 068511b | 2015-01-20 09:17:12 +0100 | [diff] [blame] | 208 | "id": "test%2Fsome-other-project" |
Hugo Arès | b8aae41 | 2014-07-08 11:04:43 -0400 | [diff] [blame] | 209 | } |
| 210 | } |
| 211 | |
| 212 | ---- |
| 213 | |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 214 | Skip(S):: |
| 215 | Skip the given number of projects from the beginning of the list. |
| 216 | + |
| 217 | Query the second project in the project list: |
| 218 | + |
| 219 | .Request |
Anthony Chin | 5f44cc5 | 2014-03-12 10:37:10 -0400 | [diff] [blame] | 220 | ---- |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 221 | GET /projects/?n=1&S=1 HTTP/1.0 |
| 222 | ---- |
| 223 | + |
| 224 | .Response |
| 225 | ---- |
| 226 | HTTP/1.1 200 OK |
| 227 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 228 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 229 | |
| 230 | )]}' |
| 231 | { |
| 232 | "some-other-project": { |
| 233 | "id": "some-other-project" |
| 234 | } |
| 235 | } |
Anthony Chin | 5f44cc5 | 2014-03-12 10:37:10 -0400 | [diff] [blame] | 236 | ---- |
| 237 | |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 238 | Substring(m):: |
| 239 | Limit the results to those projects that match the specified substring. |
| 240 | + |
David Pursehouse | 0c2e4b8 | 2017-07-13 10:28:37 +0900 | [diff] [blame] | 241 | The match is case insensitive. May not be used together with `r` or `p`. |
| 242 | + |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 243 | List all projects that match substring `test/`: |
| 244 | + |
| 245 | .Request |
Anthony Chin | 5f44cc5 | 2014-03-12 10:37:10 -0400 | [diff] [blame] | 246 | ---- |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 247 | GET /projects/?m=test%2F HTTP/1.0 |
| 248 | ---- |
| 249 | + |
| 250 | .Response |
| 251 | ---- |
| 252 | HTTP/1.1 200 OK |
| 253 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 254 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 255 | |
| 256 | )]}' |
| 257 | { |
| 258 | "test/some-project": { |
Edwin Kempin | 068511b | 2015-01-20 09:17:12 +0100 | [diff] [blame] | 259 | "id": "test%2Fsome-project" |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 260 | }, |
| 261 | "some-path/test/some-other-project": { |
Edwin Kempin | 068511b | 2015-01-20 09:17:12 +0100 | [diff] [blame] | 262 | "id": "some-path%2Ftest%2Fsome-other-project" |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 263 | } |
| 264 | } |
| 265 | ---- |
| 266 | |
| 267 | Tree(t):: |
| 268 | Get projects inheritance in a tree-like format. This option does |
| 269 | not work together with the branch option. |
| 270 | + |
| 271 | Get all the projects with tree option: |
| 272 | + |
| 273 | .Request |
| 274 | ---- |
| 275 | GET /projects/?t HTTP/1.0 |
| 276 | ---- |
| 277 | + |
| 278 | .Response |
| 279 | ---- |
| 280 | HTTP/1.1 200 OK |
| 281 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 282 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 283 | |
| 284 | )]}' |
| 285 | { |
| 286 | "All-Projects" { |
| 287 | "id": "All-Projects" |
| 288 | }, |
| 289 | "child-project": { |
| 290 | "id": "child-project", |
| 291 | "parent":"parent-project" |
| 292 | }, |
| 293 | "parent-project": { |
| 294 | "id": "parent-project", |
| 295 | "parent":"All-Projects" |
| 296 | } |
| 297 | } |
| 298 | ---- |
| 299 | |
| 300 | Type(type):: |
| 301 | Get projects with specified type: ALL, CODE, PERMISSIONS. |
| 302 | + |
| 303 | Get all the projects of type 'PERMISSIONS': |
| 304 | + |
| 305 | .Request |
| 306 | ---- |
| 307 | GET /projects/?type=PERMISSIONS HTTP/1.0 |
| 308 | ---- |
| 309 | + |
| 310 | .Response |
| 311 | ---- |
| 312 | HTTP/1.1 200 OK |
| 313 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 314 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 315 | |
| 316 | )]}' |
| 317 | { |
| 318 | "All-Projects" { |
| 319 | "id": "All-Projects" |
| 320 | }, |
| 321 | "some-parent-project": { |
| 322 | "id": "some-parent-project" |
| 323 | } |
| 324 | } |
Anthony Chin | 5f44cc5 | 2014-03-12 10:37:10 -0400 | [diff] [blame] | 325 | ---- |
| 326 | |
David Pursehouse | c141bd3 | 2017-11-15 21:42:14 +0900 | [diff] [blame] | 327 | All:: |
David Pursehouse | 5450876 | 2017-11-28 13:37:48 +0900 | [diff] [blame] | 328 | Get all projects, including those whose state is "HIDDEN". May not be used |
| 329 | together with the `state` option. |
David Pursehouse | c141bd3 | 2017-11-15 21:42:14 +0900 | [diff] [blame] | 330 | + |
| 331 | .Request |
| 332 | ---- |
| 333 | GET /projects/?all HTTP/1.0 |
| 334 | ---- |
| 335 | + |
| 336 | .Response |
| 337 | ---- |
| 338 | HTTP/1.1 200 OK |
| 339 | Content-Disposition: attachment |
| 340 | Content-Type: application/json; charset=UTF-8 |
| 341 | |
| 342 | )]}' |
| 343 | { |
| 344 | "All-Projects" { |
| 345 | "id": "All-Projects", |
| 346 | "state": "ACTIVE" |
| 347 | }, |
| 348 | "some-other-project": { |
| 349 | "id": "some-other-project", |
| 350 | "state": "HIDDEN" |
| 351 | } |
| 352 | } |
| 353 | ---- |
| 354 | |
David Pursehouse | 5450876 | 2017-11-28 13:37:48 +0900 | [diff] [blame] | 355 | State(s):: |
| 356 | Get all projects with the given state. May not be used together with the |
| 357 | `all` option. |
| 358 | + |
| 359 | .Request |
| 360 | ---- |
| 361 | GET /projects/?state=HIDDEN HTTP/1.0 |
| 362 | ---- |
| 363 | + |
| 364 | .Response |
| 365 | ---- |
| 366 | HTTP/1.1 200 OK |
| 367 | Content-Disposition: attachment |
| 368 | Content-Type: application/json; charset=UTF-8 |
| 369 | |
| 370 | )]}' |
| 371 | { |
| 372 | "some-other-project": { |
| 373 | "id": "some-other-project", |
| 374 | "state": "HIDDEN" |
| 375 | } |
| 376 | } |
| 377 | ---- |
| 378 | |
Xin Sun | d8dd153 | 2017-07-18 17:13:52 -0700 | [diff] [blame] | 379 | [[query-projects]] |
| 380 | === Query Projects |
| 381 | -- |
| 382 | 'GET /projects/?query=<query>' |
| 383 | -- |
| 384 | |
| 385 | Queries projects visible to the caller. The |
| 386 | link:user-search-projects.html#_search_operators[query string] must be |
| 387 | provided by the `query` parameter. The `start` and `limit` parameters |
| 388 | can be used to skip/limit results. |
| 389 | |
| 390 | As result a list of link:#project-info[ProjectInfo] entities is returned. |
| 391 | |
| 392 | .Request |
| 393 | ---- |
| 394 | GET /projects/?query=name:test HTTP/1.0 |
| 395 | ---- |
| 396 | |
| 397 | .Response |
| 398 | ---- |
| 399 | HTTP/1.1 200 OK |
| 400 | Content-Disposition: attachment |
| 401 | Content-Type: application/json; charset=UTF-8 |
| 402 | |
| 403 | )]}' |
| 404 | { |
| 405 | "test": { |
| 406 | "id": "test", |
| 407 | "description": "\u003chtml\u003e is escaped" |
| 408 | } |
| 409 | } |
| 410 | ---- |
| 411 | |
| 412 | [[project-query-limit]] |
| 413 | ==== Project Limit |
| 414 | The `/projects/?query=<query>` URL also accepts a limit integer in the |
| 415 | `limit` parameter. This limits the results to `limit` projects. |
| 416 | |
| 417 | Query the first 25 projects in project list. |
| 418 | ---- |
| 419 | GET /projects/?query=<query>&limit=25 HTTP/1.0 |
| 420 | ---- |
| 421 | |
| 422 | The `/projects/` URL also accepts a start integer in the `start` |
| 423 | parameter. The results will skip `start` groups from project list. |
| 424 | |
| 425 | Query 25 projects starting from index 50. |
| 426 | ---- |
| 427 | GET /groups/?query=<query>&limit=25&start=50 HTTP/1.0 |
| 428 | ---- |
| 429 | |
| 430 | [[project-query-options]] |
| 431 | ==== Project Options |
| 432 | Additional fields can be obtained by adding `o` parameters. Each option |
| 433 | requires more lookups and slows down the query response time to the |
| 434 | client so they are generally disabled by default. The supported fields |
| 435 | are described in the context of the link:#project-options[List Projects] |
| 436 | REST endpoint. |
| 437 | |
Edwin Kempin | 5c544e2 | 2013-03-06 13:35:45 +0100 | [diff] [blame] | 438 | [[get-project]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 439 | === Get Project |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 440 | -- |
Edwin Kempin | 5c544e2 | 2013-03-06 13:35:45 +0100 | [diff] [blame] | 441 | 'GET /projects/link:#project-name[\{project-name\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 442 | -- |
Edwin Kempin | 5c544e2 | 2013-03-06 13:35:45 +0100 | [diff] [blame] | 443 | |
| 444 | Retrieves a project. |
| 445 | |
| 446 | .Request |
| 447 | ---- |
| 448 | GET /projects/plugins%2Freplication HTTP/1.0 |
| 449 | ---- |
| 450 | |
| 451 | As response a link:#project-info[ProjectInfo] entity is returned that |
| 452 | describes the project. |
| 453 | |
| 454 | .Response |
| 455 | ---- |
| 456 | HTTP/1.1 200 OK |
| 457 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 458 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 5c544e2 | 2013-03-06 13:35:45 +0100 | [diff] [blame] | 459 | |
| 460 | )]}' |
| 461 | { |
Edwin Kempin | 5c544e2 | 2013-03-06 13:35:45 +0100 | [diff] [blame] | 462 | "id": "plugins%2Freplication", |
| 463 | "name": "plugins/replication", |
| 464 | "parent": "Public-Plugins", |
Shawn Pearce | 21a6c21 | 2014-04-23 12:35:10 -0700 | [diff] [blame] | 465 | "description": "Copies to other servers using the Git protocol", |
Han-Wen Nienhuys | 22f2774 | 2017-06-27 18:01:07 +0200 | [diff] [blame] | 466 | "state": "ACTIVE", |
| 467 | "labels": { |
| 468 | "Code-Review": { |
| 469 | "values": { |
| 470 | " 0": "No score", |
| 471 | "+1": "Approved" |
| 472 | }, |
| 473 | "default_value": 0 |
| 474 | } |
| 475 | } |
Edwin Kempin | 5c544e2 | 2013-03-06 13:35:45 +0100 | [diff] [blame] | 476 | } |
| 477 | ---- |
| 478 | |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 479 | [[create-project]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 480 | === Create Project |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 481 | -- |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 482 | 'PUT /projects/link:#project-name[\{project-name\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 483 | -- |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 484 | |
| 485 | Creates a new project. |
| 486 | |
| 487 | In the request body additional data for the project can be provided as |
| 488 | link:#project-input[ProjectInput]. |
| 489 | |
| 490 | .Request |
| 491 | ---- |
| 492 | PUT /projects/MyProject HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 493 | Content-Type: application/json; charset=UTF-8 |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 494 | |
| 495 | { |
| 496 | "description": "This is a demo project.", |
| 497 | "submit_type": "CHERRY_PICK", |
| 498 | "owners": [ |
| 499 | "MyProject-Owners" |
| 500 | ] |
| 501 | } |
| 502 | ---- |
| 503 | |
| 504 | As response the link:#project-info[ProjectInfo] entity is returned that |
| 505 | describes the created project. |
| 506 | |
| 507 | .Response |
| 508 | ---- |
| 509 | HTTP/1.1 201 Created |
| 510 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 511 | Content-Type: application/json; charset=UTF-8 |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 512 | |
| 513 | )]}' |
| 514 | { |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 515 | "id": "MyProject", |
| 516 | "name": "MyProject", |
| 517 | "parent": "All-Projects", |
Han-Wen Nienhuys | 22f2774 | 2017-06-27 18:01:07 +0200 | [diff] [blame] | 518 | "description": "This is a demo project.", |
| 519 | "labels": { |
| 520 | "Code-Review": { |
| 521 | "values": { |
| 522 | " 0": "No score", |
| 523 | "+1": "Approved" |
| 524 | }, |
| 525 | "default_value": 0 |
| 526 | } |
| 527 | } |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 528 | } |
| 529 | ---- |
| 530 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 531 | [[get-project-description]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 532 | === Get Project Description |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 533 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 534 | 'GET /projects/link:#project-name[\{project-name\}]/description' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 535 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 536 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 537 | Retrieves the description of a project. |
| 538 | |
| 539 | .Request |
| 540 | ---- |
| 541 | GET /projects/plugins%2Freplication/description HTTP/1.0 |
| 542 | ---- |
| 543 | |
| 544 | .Response |
| 545 | ---- |
| 546 | HTTP/1.1 200 OK |
| 547 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 548 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 549 | |
| 550 | )]}' |
| 551 | "Copies to other servers using the Git protocol" |
| 552 | ---- |
| 553 | |
Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 554 | If the project does not have a description an empty string is returned. |
| 555 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 556 | [[set-project-description]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 557 | === Set Project Description |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 558 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 559 | 'PUT /projects/link:#project-name[\{project-name\}]/description' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 560 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 561 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 562 | Sets the description of a project. |
| 563 | |
| 564 | The new project description must be provided in the request body inside |
| 565 | a link:#project-description-input[ProjectDescriptionInput] entity. |
| 566 | |
| 567 | .Request |
| 568 | ---- |
| 569 | PUT /projects/plugins%2Freplication/description HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 570 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 571 | |
| 572 | { |
| 573 | "description": "Plugin for Gerrit that handles the replication.", |
| 574 | "commit_message": "Update the project description" |
| 575 | } |
| 576 | ---- |
| 577 | |
| 578 | As response the new project description is returned. |
| 579 | |
| 580 | .Response |
| 581 | ---- |
| 582 | HTTP/1.1 200 OK |
| 583 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 584 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 585 | |
| 586 | )]}' |
| 587 | "Plugin for Gerrit that handles the replication." |
| 588 | ---- |
| 589 | |
Edwin Kempin | 114ab16 | 2013-02-28 09:25:37 +0100 | [diff] [blame] | 590 | If the description was deleted the response is "`204 No Content`". |
| 591 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 592 | [[delete-project-description]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 593 | === Delete Project Description |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 594 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 595 | 'DELETE /projects/link:#project-name[\{project-name\}]/description' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 596 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 597 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 598 | Deletes the description of a project. |
| 599 | |
Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 600 | The request body does not need to include a |
| 601 | link:#project-description-input[ProjectDescriptionInput] entity if no |
| 602 | commit message is specified. |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 603 | |
Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 604 | Please note that some proxies prohibit request bodies for DELETE |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 605 | requests. In this case, if you want to specify a commit message, use |
| 606 | link:#set-project-description[PUT] to delete the description. |
| 607 | |
| 608 | .Request |
| 609 | ---- |
| 610 | DELETE /projects/plugins%2Freplication/description HTTP/1.0 |
| 611 | ---- |
| 612 | |
| 613 | .Response |
| 614 | ---- |
| 615 | HTTP/1.1 204 No Content |
| 616 | ---- |
| 617 | |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 618 | [[get-project-parent]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 619 | === Get Project Parent |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 620 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 621 | 'GET /projects/link:#project-name[\{project-name\}]/parent' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 622 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 623 | |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 624 | Retrieves the name of a project's parent project. For the |
| 625 | `All-Projects` root project an empty string is returned. |
| 626 | |
| 627 | .Request |
| 628 | ---- |
| 629 | GET /projects/plugins%2Freplication/parent HTTP/1.0 |
| 630 | ---- |
| 631 | |
| 632 | .Response |
| 633 | ---- |
| 634 | HTTP/1.1 200 OK |
| 635 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 636 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 637 | |
| 638 | )]}' |
| 639 | "All-Projects" |
| 640 | ---- |
| 641 | |
| 642 | [[set-project-parent]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 643 | === Set Project Parent |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 644 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 645 | 'PUT /projects/link:#project-name[\{project-name\}]/parent' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 646 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 647 | |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 648 | Sets the parent project for a project. |
| 649 | |
| 650 | The new name of the parent project must be provided in the request body |
| 651 | inside a link:#project-parent-input[ProjectParentInput] entity. |
| 652 | |
| 653 | .Request |
| 654 | ---- |
| 655 | PUT /projects/plugins%2Freplication/parent HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 656 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 657 | |
| 658 | { |
| 659 | "parent": "Public-Plugins", |
| 660 | "commit_message": "Update the project parent" |
| 661 | } |
| 662 | ---- |
| 663 | |
| 664 | As response the new parent project name is returned. |
| 665 | |
| 666 | .Response |
| 667 | ---- |
| 668 | HTTP/1.1 200 OK |
| 669 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 670 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 671 | |
| 672 | )]}' |
| 673 | "Public-Plugins" |
| 674 | ---- |
| 675 | |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 676 | [[get-head]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 677 | === Get HEAD |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 678 | -- |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 679 | 'GET /projects/link:#project-name[\{project-name\}]/HEAD' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 680 | -- |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 681 | |
| 682 | Retrieves for a project the name of the branch to which `HEAD` points. |
| 683 | |
| 684 | .Request |
| 685 | ---- |
| 686 | GET /projects/plugins%2Freplication/HEAD HTTP/1.0 |
| 687 | ---- |
| 688 | |
| 689 | .Response |
| 690 | ---- |
| 691 | HTTP/1.1 200 OK |
| 692 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 693 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 694 | |
| 695 | )]}' |
| 696 | "refs/heads/master" |
| 697 | ---- |
| 698 | |
| 699 | [[set-head]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 700 | === Set HEAD |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 701 | -- |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 702 | 'PUT /projects/link:#project-name[\{project-name\}]/HEAD' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 703 | -- |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 704 | |
| 705 | Sets `HEAD` for a project. |
| 706 | |
| 707 | The new ref to which `HEAD` should point must be provided in the |
| 708 | request body inside a link:#head-input[HeadInput] entity. |
| 709 | |
| 710 | .Request |
| 711 | ---- |
| 712 | PUT /projects/plugins%2Freplication/HEAD HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 713 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 714 | |
| 715 | { |
| 716 | "ref": "refs/heads/stable" |
| 717 | } |
| 718 | ---- |
| 719 | |
| 720 | As response the new ref to which `HEAD` points is returned. |
| 721 | |
| 722 | .Response |
| 723 | ---- |
| 724 | HTTP/1.1 200 OK |
| 725 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 726 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 727 | |
| 728 | )]}' |
| 729 | "refs/heads/stable" |
| 730 | ---- |
| 731 | |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 732 | [[get-repository-statistics]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 733 | === Get Repository Statistics |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 734 | -- |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 735 | 'GET /projects/link:#project-name[\{project-name\}]/statistics.git' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 736 | -- |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 737 | |
| 738 | Return statistics for the repository of a project. |
| 739 | |
| 740 | .Request |
| 741 | ---- |
| 742 | GET /projects/plugins%2Freplication/statistics.git HTTP/1.0 |
| 743 | ---- |
| 744 | |
| 745 | The repository statistics are returned as a |
| 746 | link:#repository-statistics-info[RepositoryStatisticsInfo] entity. |
| 747 | |
| 748 | .Response |
| 749 | ---- |
| 750 | HTTP/1.1 200 OK |
| 751 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 752 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 753 | |
| 754 | )]}' |
| 755 | { |
| 756 | "number_of_loose_objects": 127, |
| 757 | "number_of_loose_refs": 15, |
| 758 | "number_of_pack_files": 15, |
| 759 | "number_of_packed_objects": 67, |
| 760 | "number_of_packed_refs": 0, |
| 761 | "size_of_loose_objects": 29466, |
| 762 | "size_of_packed_objects": 9646 |
| 763 | } |
| 764 | ---- |
| 765 | |
Dave Borowitz | 237073a | 2013-04-04 16:52:27 -0700 | [diff] [blame] | 766 | [[get-config]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 767 | === Get Config |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 768 | -- |
Dave Borowitz | 237073a | 2013-04-04 16:52:27 -0700 | [diff] [blame] | 769 | 'GET /projects/link:#project-name[\{project-name\}]/config' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 770 | -- |
Dave Borowitz | 237073a | 2013-04-04 16:52:27 -0700 | [diff] [blame] | 771 | |
| 772 | Gets some configuration information about a project. Note that this |
| 773 | config info is not simply the contents of `project.config`; it generally |
| 774 | contains fields that may have been inherited from parent projects. |
| 775 | |
| 776 | .Request |
| 777 | ---- |
| 778 | GET /projects/myproject/config |
| 779 | ---- |
| 780 | |
| 781 | A link:#config-info[ConfigInfo] entity is returned that describes the |
| 782 | project configuration. Some fields are only visible to users that have |
| 783 | read access to `refs/meta/config`. |
| 784 | |
| 785 | .Response |
| 786 | ---- |
| 787 | HTTP/1.1 200 OK |
| 788 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 789 | Content-Type: application/json; charset=UTF-8 |
Dave Borowitz | 237073a | 2013-04-04 16:52:27 -0700 | [diff] [blame] | 790 | |
| 791 | )]}' |
| 792 | { |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 793 | "description": "demo project", |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 794 | "use_contributor_agreements": { |
| 795 | "value": true, |
| 796 | "configured_value": "TRUE", |
| 797 | "inherited_value": false |
| 798 | }, |
| 799 | "use_content_merge": { |
| 800 | "value": true, |
| 801 | "configured_value": "INHERIT", |
| 802 | "inherited_value": true |
| 803 | }, |
| 804 | "use_signed_off_by": { |
| 805 | "value": false, |
| 806 | "configured_value": "INHERIT", |
| 807 | "inherited_value": false |
| 808 | }, |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 809 | "create_new_change_for_all_not_in_target": { |
| 810 | "value": false, |
| 811 | "configured_value": "INHERIT", |
| 812 | "inherited_value": false |
| 813 | }, |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 814 | "require_change_id": { |
| 815 | "value": false, |
| 816 | "configured_value": "FALSE", |
| 817 | "inherited_value": true |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 818 | }, |
| 819 | "max_object_size_limit": { |
| 820 | "value": "15m", |
| 821 | "configured_value": "15m", |
| 822 | "inherited_value": "20m" |
| 823 | }, |
| 824 | "submit_type": "MERGE_IF_NECESSARY", |
| 825 | "state": "ACTIVE", |
David Ostrovsky | 9e8b2fb | 2013-08-30 08:09:53 +0200 | [diff] [blame] | 826 | "commentlinks": {}, |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 827 | "plugin_config": { |
| 828 | "helloworld": { |
| 829 | "language": { |
| 830 | "display_name": "Preferred Language", |
| 831 | "type": "STRING", |
| 832 | "value": "en" |
| 833 | } |
| 834 | } |
| 835 | }, |
David Ostrovsky | 9e8b2fb | 2013-08-30 08:09:53 +0200 | [diff] [blame] | 836 | "actions": { |
| 837 | "cookbook~hello-project": { |
| 838 | "method": "POST", |
| 839 | "label": "Say hello", |
| 840 | "title": "Say hello in different languages", |
| 841 | "enabled": true |
| 842 | } |
| 843 | } |
Dave Borowitz | 237073a | 2013-04-04 16:52:27 -0700 | [diff] [blame] | 844 | } |
| 845 | ---- |
| 846 | |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 847 | [[set-config]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 848 | === Set Config |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 849 | -- |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 850 | 'PUT /projects/link:#project-name[\{project-name\}]/config' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 851 | -- |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 852 | |
| 853 | Sets the configuration of a project. |
| 854 | |
| 855 | The new configuration must be provided in the request body as a |
| 856 | link:#config-input[ConfigInput] entity. |
| 857 | |
| 858 | .Request |
| 859 | ---- |
| 860 | PUT /projects/myproject/config HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 861 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 862 | |
| 863 | { |
| 864 | "description": "demo project", |
| 865 | "use_contributor_agreements": "FALSE", |
| 866 | "use_content_merge": "INHERIT", |
| 867 | "use_signed_off_by": "INHERIT", |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 868 | "create_new_change_for_all_not_in_target": "INHERIT", |
Dave Borowitz | 5170e0f | 2015-06-18 21:05:29 -0400 | [diff] [blame] | 869 | "enable_signed_push": "INHERIT", |
Dave Borowitz | 0543c73 | 2015-10-20 10:35:26 -0400 | [diff] [blame] | 870 | "require_signed_push": "INHERIT", |
Saša Živkov | 225b7a7 | 2015-11-17 17:37:43 +0100 | [diff] [blame] | 871 | "reject_implicit_merges": "INHERIT", |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 872 | "require_change_id": "TRUE", |
| 873 | "max_object_size_limit": "10m", |
| 874 | "submit_type": "REBASE_IF_NECESSARY", |
| 875 | "state": "ACTIVE" |
| 876 | } |
| 877 | ---- |
| 878 | |
| 879 | As response the new configuration is returned as a link:#config-info[ |
| 880 | ConfigInfo] entity. |
| 881 | |
| 882 | .Response |
| 883 | ---- |
| 884 | HTTP/1.1 200 OK |
| 885 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 886 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 887 | |
| 888 | )]}' |
| 889 | { |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 890 | "use_contributor_agreements": { |
| 891 | "value": false, |
| 892 | "configured_value": "FALSE", |
| 893 | "inherited_value": false |
| 894 | }, |
| 895 | "use_content_merge": { |
| 896 | "value": true, |
| 897 | "configured_value": "INHERIT", |
| 898 | "inherited_value": true |
| 899 | }, |
| 900 | "use_signed_off_by": { |
| 901 | "value": false, |
| 902 | "configured_value": "INHERIT", |
| 903 | "inherited_value": false |
| 904 | }, |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 905 | "create_new_change_for_all_not_in_target": { |
| 906 | "value": true, |
| 907 | "configured_value": "INHERIT", |
| 908 | "inherited_value": false |
| 909 | }, |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 910 | "require_change_id": { |
| 911 | "value": true, |
| 912 | "configured_value": "TRUE", |
| 913 | "inherited_value": true |
| 914 | }, |
Dave Borowitz | 5170e0f | 2015-06-18 21:05:29 -0400 | [diff] [blame] | 915 | "enable_signed_push": { |
| 916 | "value": true, |
| 917 | "configured_value": "INHERIT", |
| 918 | "inherited_value": false |
| 919 | }, |
Dave Borowitz | 0543c73 | 2015-10-20 10:35:26 -0400 | [diff] [blame] | 920 | "require_signed_push": { |
| 921 | "value": false, |
| 922 | "configured_value": "INHERIT", |
| 923 | "inherited_value": false |
| 924 | }, |
Saša Živkov | 225b7a7 | 2015-11-17 17:37:43 +0100 | [diff] [blame] | 925 | "reject_implicit_merges": { |
| 926 | "value": false, |
| 927 | "configured_value": "INHERIT", |
| 928 | "inherited_value": false |
| 929 | }, |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 930 | "max_object_size_limit": { |
| 931 | "value": "10m", |
| 932 | "configured_value": "10m", |
| 933 | "inherited_value": "20m" |
| 934 | }, |
| 935 | "submit_type": "REBASE_IF_NECESSARY", |
| 936 | "state": "ACTIVE", |
| 937 | "commentlinks": {} |
| 938 | } |
| 939 | ---- |
| 940 | |
Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 941 | [[run-gc]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 942 | === Run GC |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 943 | -- |
Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 944 | 'POST /projects/link:#project-name[\{project-name\}]/gc' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 945 | -- |
Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 946 | |
| 947 | Run the Git garbage collection for the repository of a project. |
| 948 | |
Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 949 | Options for the Git garbage collection can be specified in the |
| 950 | request body as a link:#gc-input[GCInput] entity. |
| 951 | |
Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 952 | .Request |
| 953 | ---- |
| 954 | POST /projects/plugins%2Freplication/gc HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 955 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 956 | |
| 957 | { |
| 958 | "show_progress": true |
| 959 | } |
Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 960 | ---- |
| 961 | |
| 962 | The response is the streamed output of the garbage collection. |
| 963 | |
| 964 | .Response |
| 965 | ---- |
| 966 | HTTP/1.1 200 OK |
| 967 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 968 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 969 | |
| 970 | collecting garbage for "plugins/replication": |
| 971 | Pack refs: 100% (21/21) |
| 972 | Counting objects: 20 |
| 973 | Finding sources: 100% (20/20) |
| 974 | Getting sizes: 100% (13/13) |
| 975 | Compressing objects: 83% (5/6) |
| 976 | Writing objects: 100% (20/20) |
| 977 | Selecting commits: 100% (7/7) |
| 978 | Building bitmaps: 100% (7/7) |
| 979 | Finding sources: 100% (41/41) |
| 980 | Getting sizes: 100% (25/25) |
| 981 | Compressing objects: 52% (12/23) |
| 982 | Writing objects: 100% (41/41) |
| 983 | Prune loose objects also found in pack files: 100% (36/36) |
| 984 | Prune loose, unreferenced objects: 100% (36/36) |
| 985 | done. |
| 986 | ---- |
| 987 | |
Adrian Görler | 92410a1 | 2015-11-03 16:20:56 +0100 | [diff] [blame] | 988 | ==== Asynchronous Execution |
| 989 | |
| 990 | The option `async` allows to schedule a background task that asynchronously |
| 991 | executes a Git garbage collection. |
| 992 | |
| 993 | The `Location` header of the response refers to the link:rest-api-config.html#get-task[background task] |
| 994 | which allows to inspect the progress of its execution. In case of asynchronous |
| 995 | execution the `show_progress` option is ignored. |
| 996 | |
| 997 | .Request |
| 998 | ---- |
| 999 | POST /projects/plugins%2Freplication/gc HTTP/1.0 |
| 1000 | Content-Type: application/json;charset=UTF-8 |
| 1001 | |
| 1002 | { |
| 1003 | "async": true |
| 1004 | } |
| 1005 | ---- |
| 1006 | |
| 1007 | The response is empty. |
| 1008 | |
| 1009 | .Response |
| 1010 | ---- |
| 1011 | HTTP/1.1 202 Accepted |
| 1012 | Content-Disposition: attachment |
| 1013 | Location: https:<host>/a/config/server/tasks/383a0602 |
| 1014 | ---- |
| 1015 | |
Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 1016 | [[ban-commit]] |
| 1017 | === Ban Commit |
| 1018 | -- |
| 1019 | 'PUT /projects/link:#project-name[\{project-name\}]/ban' |
| 1020 | -- |
| 1021 | |
| 1022 | Marks commits as banned for the project. If a commit is banned Gerrit |
| 1023 | rejects every push that includes this commit with |
| 1024 | link:error-contains-banned-commit.html[contains banned commit ...]. |
| 1025 | |
| 1026 | [NOTE] |
| 1027 | This REST endpoint only marks the commits as banned, but it does not |
| 1028 | remove the commits from the history of any central branch. This needs |
| 1029 | to be done manually. |
| 1030 | |
| 1031 | The commits to be banned must be specified in the request body as a |
| 1032 | link:#ban-input[BanInput] entity. |
| 1033 | |
| 1034 | The caller must be project owner. |
| 1035 | |
| 1036 | .Request |
| 1037 | ---- |
| 1038 | PUT /projects/plugins%2Freplication/ban HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1039 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 1040 | |
| 1041 | { |
| 1042 | "commits": [ |
| 1043 | "a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96", |
| 1044 | "cf5b56541f84b8b57e16810b18daca9c3adc377b" |
| 1045 | ], |
| 1046 | "reason": "Violates IP" |
| 1047 | } |
| 1048 | ---- |
| 1049 | |
| 1050 | As response a link:#ban-result-info[BanResultInfo] entity is returned. |
| 1051 | |
| 1052 | .Response |
| 1053 | ---- |
| 1054 | HTTP/1.1 200 OK |
| 1055 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1056 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 1057 | |
| 1058 | )]}' |
| 1059 | { |
| 1060 | "newly_banned": [ |
| 1061 | "a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96", |
| 1062 | "cf5b56541f84b8b57e16810b18daca9c3adc377b" |
| 1063 | ] |
| 1064 | } |
| 1065 | ---- |
| 1066 | |
Patrick Hiesel | 21816f1 | 2016-04-22 08:53:06 +0200 | [diff] [blame] | 1067 | [[get-access]] |
| 1068 | === List Access Rights for Project |
| 1069 | -- |
| 1070 | 'GET /projects/link:rest-api-projects.html#project-name[\{project-name\}]/access' |
| 1071 | -- |
| 1072 | |
| 1073 | Lists the access rights for a single project. |
| 1074 | |
| 1075 | As result a link:#project-access-info[ProjectAccessInfo] entity is returned. |
| 1076 | |
| 1077 | .Request |
| 1078 | ---- |
| 1079 | GET /projects/MyProject/access HTTP/1.0 |
| 1080 | ---- |
| 1081 | |
| 1082 | .Response |
| 1083 | ---- |
| 1084 | HTTP/1.1 200 OK |
| 1085 | Content-Type: application/json; charset=UTF-8 |
| 1086 | |
| 1087 | )]}' |
| 1088 | { |
| 1089 | "revision": "61157ed63e14d261b6dca40650472a9b0bd88474", |
| 1090 | "inherits_from": { |
| 1091 | "id": "All-Projects", |
| 1092 | "name": "All-Projects", |
| 1093 | "description": "Access inherited by all other projects." |
| 1094 | }, |
| 1095 | "local": { |
| 1096 | "refs/*": { |
| 1097 | "permissions": { |
| 1098 | "read": { |
| 1099 | "rules": { |
| 1100 | "c2ce4749a32ceb82cd6adcce65b8216e12afb41c": { |
| 1101 | "action": "ALLOW", |
| 1102 | "force": false |
| 1103 | }, |
| 1104 | "global:Anonymous-Users": { |
| 1105 | "action": "ALLOW", |
| 1106 | "force": false |
| 1107 | } |
| 1108 | } |
| 1109 | } |
| 1110 | } |
| 1111 | } |
| 1112 | }, |
| 1113 | "is_owner": true, |
| 1114 | "owner_of": [ |
| 1115 | "refs/*" |
| 1116 | ], |
| 1117 | "can_upload": true, |
| 1118 | "can_add": true, |
Han-Wen Nienhuys | e2258f6e | 2017-08-08 15:38:18 -0300 | [diff] [blame] | 1119 | "config_visible": true, |
| 1120 | "groups": { |
| 1121 | "c2ce4749a32ceb82cd6adcce65b8216e12afb41c": { |
| 1122 | "url": "#/admin/groups/uuid-c2ce4749a32ceb82cd6adcce65b8216e12afb41c", |
| 1123 | "options": {}, |
| 1124 | "description": "Users who perform batch actions on Gerrit", |
| 1125 | "group_id": 2, |
| 1126 | "owner": "Administrators", |
| 1127 | "owner_id": "d5b7124af4de52924ed397913e2c3b37bf186948", |
| 1128 | "created_on": "2009-06-08 23:31:00.000000000", |
| 1129 | "name": "Non-Interactive Users" |
| 1130 | }, |
| 1131 | "global:Anonymous-Users": { |
| 1132 | "options": {}, |
| 1133 | "name": "Anonymous Users" |
| 1134 | } |
| 1135 | } |
Patrick Hiesel | 21816f1 | 2016-04-22 08:53:06 +0200 | [diff] [blame] | 1136 | } |
| 1137 | ---- |
| 1138 | |
| 1139 | [[set-access]] |
| 1140 | === Add, Update and Delete Access Rights for Project |
| 1141 | -- |
| 1142 | 'POST /projects/link:rest-api-projects.html#project-name[\{project-name\}]/access' |
| 1143 | -- |
| 1144 | |
| 1145 | Sets access rights for the project using the diff schema provided by |
| 1146 | link:#project-access-input[ProjectAccessInput]. Deductions are used to |
| 1147 | remove access sections, permissions or permission rules. The backend will remove |
| 1148 | the entity with the finest granularity in the request, meaning that if an |
| 1149 | access section without permissions is posted, the access section will be |
| 1150 | removed; if an access section with a permission but no permission rules is |
| 1151 | posted, the permission will be removed; if an access section with a permission |
| 1152 | and a permission rule is posted, the permission rule will be removed. |
| 1153 | |
| 1154 | Additionally, access sections and permissions will be cleaned up after applying |
| 1155 | the deductions by removing items that have no child elements. |
| 1156 | |
| 1157 | After removals have been applied, additions will be applied. |
| 1158 | |
| 1159 | As result a link:#project-access-info[ProjectAccessInfo] entity is returned. |
| 1160 | |
| 1161 | .Request |
| 1162 | ---- |
| 1163 | POST /projects/MyProject/access HTTP/1.0 |
| 1164 | Content-Type: application/json; charset=UTF-8 |
| 1165 | |
| 1166 | { |
| 1167 | "remove": [ |
Hugo Arès | 0c4dabf | 2017-12-18 15:00:40 -0500 | [diff] [blame] | 1168 | { |
| 1169 | "refs/*": { |
| 1170 | "permissions": { |
| 1171 | "read": { |
| 1172 | "rules": { |
| 1173 | "c2ce4749a32ceb82cd6adcce65b8216e12afb41c": { |
| 1174 | "action": "ALLOW" |
| 1175 | } |
Patrick Hiesel | 21816f1 | 2016-04-22 08:53:06 +0200 | [diff] [blame] | 1176 | } |
| 1177 | } |
| 1178 | } |
| 1179 | } |
| 1180 | } |
| 1181 | ] |
| 1182 | } |
| 1183 | ---- |
| 1184 | |
| 1185 | .Response |
| 1186 | ---- |
| 1187 | HTTP/1.1 200 OK |
| 1188 | Content-Type: application/json; charset=UTF-8 |
| 1189 | |
| 1190 | )]}' |
| 1191 | { |
| 1192 | "revision": "61157ed63e14d261b6dca40650472a9b0bd88474", |
| 1193 | "inherits_from": { |
| 1194 | "id": "All-Projects", |
| 1195 | "name": "All-Projects", |
| 1196 | "description": "Access inherited by all other projects." |
| 1197 | }, |
| 1198 | "local": { |
| 1199 | "refs/*": { |
| 1200 | "permissions": { |
| 1201 | "read": { |
| 1202 | "rules": { |
| 1203 | "global:Anonymous-Users": { |
| 1204 | "action": "ALLOW", |
| 1205 | "force": false |
| 1206 | } |
| 1207 | } |
| 1208 | } |
| 1209 | } |
| 1210 | } |
| 1211 | }, |
| 1212 | "is_owner": true, |
| 1213 | "owner_of": [ |
| 1214 | "refs/*" |
| 1215 | ], |
| 1216 | "can_upload": true, |
| 1217 | "can_add": true, |
Han-Wen Nienhuys | e2258f6e | 2017-08-08 15:38:18 -0300 | [diff] [blame] | 1218 | "config_visible": true, |
| 1219 | "groups": { |
| 1220 | "global:Anonymous-Users": { |
| 1221 | "options": {}, |
| 1222 | "name": "Anonymous Users" |
| 1223 | } |
| 1224 | } |
Patrick Hiesel | 21816f1 | 2016-04-22 08:53:06 +0200 | [diff] [blame] | 1225 | } |
| 1226 | ---- |
| 1227 | |
Han-Wen Nienhuys | 4f6fab3 | 2017-09-07 15:26:54 +0200 | [diff] [blame] | 1228 | [[create-access-change]] |
| 1229 | === Create Access Rights Change for review. |
| 1230 | -- |
| 1231 | 'PUT /projects/link:rest-api-projects.html#project-name[\{project-name\}]/access:review |
| 1232 | -- |
| 1233 | |
| 1234 | Sets access rights for the project using the diff schema provided by |
| 1235 | link:#project-access-input[ProjectAccessInput] |
| 1236 | |
| 1237 | This takes the same input as link:#set-access[Update Access Rights], but creates a pending |
| 1238 | change for review. Like link:#create-change[Create Change], it returns |
| 1239 | a link:#change-info[ChangeInfo] entity describing the resulting change. |
| 1240 | |
| 1241 | .Request |
| 1242 | ---- |
| 1243 | PUT /projects/MyProject/access:review HTTP/1.0 |
| 1244 | Content-Type: application/json; charset=UTF-8 |
| 1245 | |
| 1246 | { |
| 1247 | "add":{ |
| 1248 | "refs/heads/*":{ |
| 1249 | "permissions":{ |
| 1250 | "read":{ |
| 1251 | "rules":{ |
| 1252 | "global:Anonymous-Users": { |
| 1253 | "action":"DENY", |
| 1254 | "force":false |
| 1255 | } |
| 1256 | } |
| 1257 | } |
| 1258 | } |
| 1259 | } |
| 1260 | } |
| 1261 | } |
| 1262 | ---- |
| 1263 | |
| 1264 | .Response |
| 1265 | ---- |
| 1266 | HTTP/1.1 200 OK |
| 1267 | Content-Type: application/json; charset=UTF-8 |
| 1268 | |
| 1269 | )]}' |
| 1270 | { |
| 1271 | "id": "testproj~refs%2Fmeta%2Fconfig~Ieaf185bf90a1fc3b58461e399385e158a20b31a2", |
| 1272 | "project": "testproj", |
| 1273 | "branch": "refs/meta/config", |
| 1274 | "hashtags": [], |
| 1275 | "change_id": "Ieaf185bf90a1fc3b58461e399385e158a20b31a2", |
| 1276 | "subject": "Review access change", |
| 1277 | "status": "NEW", |
| 1278 | "created": "2017-09-07 14:31:11.852000000", |
| 1279 | "updated": "2017-09-07 14:31:11.852000000", |
| 1280 | "submit_type": "CHERRY_PICK", |
| 1281 | "mergeable": true, |
| 1282 | "insertions": 2, |
| 1283 | "deletions": 0, |
| 1284 | "unresolved_comment_count": 0, |
| 1285 | "has_review_started": true, |
| 1286 | "_number": 7, |
| 1287 | "owner": { |
| 1288 | "_account_id": 1000000 |
| 1289 | } |
| 1290 | } |
| 1291 | ---- |
| 1292 | |
Han-Wen Nienhuys | d1ed08d | 2017-09-04 18:13:23 +0200 | [diff] [blame] | 1293 | [[check-access]] |
| 1294 | === Check Access |
| 1295 | -- |
| 1296 | 'POST /projects/MyProject/check.access' |
| 1297 | -- |
| 1298 | |
| 1299 | Runs access checks for other users. This requires the |
| 1300 | link:access-control.html#capability_administrateServer[Administrate Server] |
| 1301 | global capability. |
| 1302 | |
| 1303 | Input for the access checks that should be run must be provided in |
| 1304 | the request body inside a |
| 1305 | link:#access-check-input[AccessCheckInput] entity. |
| 1306 | |
| 1307 | .Request |
| 1308 | ---- |
| 1309 | POST /projects/MyProject/check.access HTTP/1.0 |
| 1310 | Content-Type: application/json; charset=UTF-8 |
| 1311 | |
| 1312 | { |
| 1313 | "account": "Kristen.Burns@gerritcodereview.com", |
| 1314 | "ref": "refs/heads/secret/bla" |
| 1315 | } |
| 1316 | ---- |
| 1317 | |
| 1318 | The result is a link:#access-check-info[AccessCheckInfo] entity |
| 1319 | detailing the read access of the given user for the given project (or |
| 1320 | project-ref combination). |
| 1321 | |
| 1322 | .Response |
| 1323 | ---- |
| 1324 | HTTP/1.1 200 OK |
| 1325 | Content-Type: application/json; charset=UTF-8 |
| 1326 | |
| 1327 | )]}' |
| 1328 | { |
| 1329 | "message": "user Kristen Burns \u003cKristen.Burns@gerritcodereview.com\u003e (1000098) cannot see ref refs/heads/secret/bla in project MyProject", |
| 1330 | "status": 403 |
| 1331 | } |
| 1332 | ---- |
Han-Wen Nienhuys | 4f6fab3 | 2017-09-07 15:26:54 +0200 | [diff] [blame] | 1333 | |
Hector Oswaldo Caballero | 2b4239a | 2017-02-13 07:40:33 -0500 | [diff] [blame] | 1334 | [[index]] |
| 1335 | === Index all changes in a project |
| 1336 | |
| 1337 | Adds or updates all the changes belonging to a project in the secondary index. |
| 1338 | The indexing task is executed asynchronously in background, so this command |
| 1339 | returns immediately. |
| 1340 | |
| 1341 | .Request |
| 1342 | ---- |
| 1343 | POST /projects/MyProject/index HTTP/1.0 |
| 1344 | ---- |
| 1345 | |
| 1346 | .Response |
| 1347 | ---- |
| 1348 | HTTP/1.1 202 Accepted |
| 1349 | Content-Disposition: attachment |
| 1350 | ---- |
| 1351 | |
Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1352 | [[branch-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1353 | == Branch Endpoints |
Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1354 | |
| 1355 | [[list-branches]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1356 | === List Branches |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1357 | -- |
Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1358 | 'GET /projects/link:#project-name[\{project-name\}]/branches/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1359 | -- |
Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1360 | |
| 1361 | List the branches of a project. |
| 1362 | |
| 1363 | As result a list of link:#branch-info[BranchInfo] entries is |
| 1364 | returned. |
| 1365 | |
| 1366 | .Request |
| 1367 | ---- |
| 1368 | GET /projects/work%2Fmy-project/branches/ HTTP/1.0 |
| 1369 | ---- |
| 1370 | |
| 1371 | .Response |
| 1372 | ---- |
| 1373 | HTTP/1.1 200 OK |
| 1374 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1375 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1376 | |
| 1377 | )]}' |
| 1378 | [ |
| 1379 | { |
| 1380 | "ref": "HEAD", |
| 1381 | "revision": "master" |
| 1382 | }, |
| 1383 | { |
| 1384 | "ref": "refs/meta/config", |
| 1385 | "revision": "76016386a0d8ecc7b6be212424978bb45959d668" |
| 1386 | }, |
| 1387 | { |
| 1388 | "ref": "refs/heads/master", |
| 1389 | "revision": "67ebf73496383c6777035e374d2d664009e2aa5c" |
| 1390 | }, |
| 1391 | { |
| 1392 | "ref": "refs/heads/stable", |
| 1393 | "revision": "64ca533bd0eb5252d2fee83f63da67caae9b4674", |
| 1394 | "can_delete": true |
| 1395 | } |
| 1396 | ] |
| 1397 | ---- |
| 1398 | |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1399 | [[branch-options]] |
| 1400 | ==== Branch Options |
| 1401 | |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1402 | Limit(n):: |
| 1403 | Limit the number of branches to be included in the results. |
| 1404 | + |
| 1405 | .Request |
| 1406 | ---- |
| 1407 | GET /projects/testproject/branches?n=1 HTTP/1.0 |
| 1408 | ---- |
| 1409 | + |
| 1410 | .Response |
| 1411 | ---- |
| 1412 | HTTP/1.1 200 OK |
| 1413 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1414 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1415 | |
| 1416 | )]}' |
| 1417 | [ |
| 1418 | { |
| 1419 | "ref": "HEAD", |
| 1420 | "revision": "master", |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1421 | } |
| 1422 | ] |
| 1423 | ---- |
| 1424 | |
David Pursehouse | 5cb3819 | 2017-07-28 16:11:33 +0100 | [diff] [blame] | 1425 | Skip(S):: |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1426 | Skip the given number of branches from the beginning of the list. |
| 1427 | + |
| 1428 | .Request |
| 1429 | ---- |
| 1430 | GET /projects/testproject/branches?n=1&s=0 HTTP/1.0 |
| 1431 | ---- |
| 1432 | + |
| 1433 | .Response |
| 1434 | ---- |
| 1435 | HTTP/1.1 200 OK |
| 1436 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1437 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1438 | |
| 1439 | )]}' |
| 1440 | [ |
| 1441 | { |
| 1442 | "ref": "HEAD", |
| 1443 | "revision": "master", |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1444 | } |
| 1445 | ] |
| 1446 | ---- |
| 1447 | |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1448 | Substring(m):: |
David Pursehouse | 1d4d67d | 2017-07-13 09:58:10 +0900 | [diff] [blame] | 1449 | Limit the results to those branches that match the specified substring. |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1450 | + |
David Pursehouse | 16a1a4b | 2017-07-13 10:22:28 +0900 | [diff] [blame] | 1451 | The match is case insensitive. May not be used together with `r`. |
David Pursehouse | 5851bfe | 2017-07-13 09:56:26 +0900 | [diff] [blame] | 1452 | + |
David Pursehouse | 1d4d67d | 2017-07-13 09:58:10 +0900 | [diff] [blame] | 1453 | List all branches that match substring `test`: |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1454 | + |
| 1455 | .Request |
| 1456 | ---- |
| 1457 | GET /projects/testproject/branches?m=test HTTP/1.0 |
| 1458 | ---- |
| 1459 | + |
| 1460 | .Response |
| 1461 | ---- |
| 1462 | HTTP/1.1 200 OK |
| 1463 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1464 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1465 | |
| 1466 | )]}' |
| 1467 | [ |
| 1468 | { |
| 1469 | "ref": "refs/heads/test1", |
| 1470 | "revision": "9c9d08a438e55e52f33b608415e6dddd9b18550d", |
| 1471 | "can_delete": true |
| 1472 | } |
| 1473 | ] |
| 1474 | ---- |
| 1475 | |
| 1476 | Regex(r):: |
| 1477 | Limit the results to those branches that match the specified regex. |
| 1478 | Boundary matchers '^' and '$' are implicit. For example: the regex 't*' will |
David Pursehouse | a6cd67f | 2017-07-13 16:40:58 +0900 | [diff] [blame] | 1479 | match any branches that start with 't' and regex '*t' will match any |
| 1480 | branches that end with 't'. |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1481 | + |
David Pursehouse | 16a1a4b | 2017-07-13 10:22:28 +0900 | [diff] [blame] | 1482 | The match is case sensitive. May not be used together with `m`. |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1483 | + |
| 1484 | List all branches that match regex `t.*1`: |
| 1485 | + |
| 1486 | .Request |
| 1487 | ---- |
| 1488 | GET /projects/testproject/branches?r=t.*1 HTTP/1.0 |
| 1489 | ---- |
| 1490 | + |
| 1491 | .Response |
| 1492 | ---- |
| 1493 | HTTP/1.1 200 OK |
| 1494 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1495 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1496 | |
| 1497 | )]}' |
| 1498 | [ |
| 1499 | { |
| 1500 | "ref": "refs/heads/test1", |
| 1501 | "revision": "9c9d08a438e55e52f33b608415e6dddd9b18550d", |
| 1502 | "can_delete": true |
| 1503 | } |
| 1504 | ] |
| 1505 | ---- |
| 1506 | |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1507 | [[get-branch]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1508 | === Get Branch |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1509 | -- |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1510 | 'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1511 | -- |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1512 | |
| 1513 | Retrieves a branch of a project. |
| 1514 | |
| 1515 | .Request |
| 1516 | ---- |
| 1517 | GET /projects/work%2Fmy-project/branches/master HTTP/1.0 |
| 1518 | ---- |
| 1519 | |
| 1520 | As response a link:#branch-info[BranchInfo] entity is returned that |
| 1521 | describes the branch. |
| 1522 | |
| 1523 | .Response |
| 1524 | ---- |
| 1525 | HTTP/1.1 200 OK |
| 1526 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1527 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1528 | |
| 1529 | )]}' |
| 1530 | { |
| 1531 | "ref": "refs/heads/master", |
| 1532 | "revision": "67ebf73496383c6777035e374d2d664009e2aa5c" |
| 1533 | } |
| 1534 | ---- |
| 1535 | |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1536 | [[create-branch]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1537 | === Create Branch |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1538 | -- |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1539 | 'PUT /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1540 | -- |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1541 | |
| 1542 | Creates a new branch. |
| 1543 | |
| 1544 | In the request body additional data for the branch can be provided as |
| 1545 | link:#branch-input[BranchInput]. |
| 1546 | |
| 1547 | .Request |
| 1548 | ---- |
| 1549 | PUT /projects/MyProject/branches/stable HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1550 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1551 | |
| 1552 | { |
| 1553 | "revision": "76016386a0d8ecc7b6be212424978bb45959d668" |
| 1554 | } |
| 1555 | ---- |
| 1556 | |
| 1557 | As response a link:#branch-info[BranchInfo] entity is returned that |
| 1558 | describes the created branch. |
| 1559 | |
| 1560 | .Response |
| 1561 | ---- |
| 1562 | HTTP/1.1 201 Created |
| 1563 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1564 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1565 | |
| 1566 | )]}' |
| 1567 | { |
| 1568 | "ref": "refs/heads/stable", |
| 1569 | "revision": "76016386a0d8ecc7b6be212424978bb45959d668", |
| 1570 | "can_delete": true |
| 1571 | } |
| 1572 | ---- |
| 1573 | |
Edwin Kempin | 6ce96a1 | 2013-06-06 13:20:01 +0200 | [diff] [blame] | 1574 | [[delete-branch]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1575 | === Delete Branch |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1576 | -- |
Edwin Kempin | 6ce96a1 | 2013-06-06 13:20:01 +0200 | [diff] [blame] | 1577 | 'DELETE /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1578 | -- |
Edwin Kempin | 6ce96a1 | 2013-06-06 13:20:01 +0200 | [diff] [blame] | 1579 | |
| 1580 | Deletes a branch. |
| 1581 | |
| 1582 | .Request |
| 1583 | ---- |
| 1584 | DELETE /projects/MyProject/branches/stable HTTP/1.0 |
| 1585 | ---- |
| 1586 | |
| 1587 | .Response |
| 1588 | ---- |
| 1589 | HTTP/1.1 204 No Content |
| 1590 | ---- |
| 1591 | |
Hugo Arès | ef8e320 | 2015-01-12 15:09:06 -0500 | [diff] [blame] | 1592 | [[delete-branches]] |
| 1593 | === Delete Branches |
| 1594 | -- |
| 1595 | 'POST /projects/link:#project-name[\{project-name\}]/branches:delete' |
| 1596 | -- |
| 1597 | |
| 1598 | Delete one or more branches. |
| 1599 | |
| 1600 | The branches to be deleted must be provided in the request body as a |
| 1601 | link:#delete-branches-input[DeleteBranchesInput] entity. |
| 1602 | |
| 1603 | .Request |
| 1604 | ---- |
| 1605 | POST /projects/MyProject/branches:delete HTTP/1.0 |
| 1606 | Content-Type: application/json;charset=UTF-8 |
| 1607 | |
| 1608 | { |
| 1609 | "branches": [ |
| 1610 | "stable-1.0", |
| 1611 | "stable-2.0" |
| 1612 | ] |
| 1613 | } |
| 1614 | ---- |
| 1615 | |
| 1616 | .Response |
| 1617 | ---- |
| 1618 | HTTP/1.1 204 No Content |
| 1619 | ---- |
| 1620 | |
| 1621 | If some branches could not be deleted, the response is "`409 Conflict`" and the |
| 1622 | error message is contained in the response body. |
| 1623 | |
Edwin Kempin | d31e558 | 2013-11-30 12:07:08 +0100 | [diff] [blame] | 1624 | [[get-content]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1625 | === Get Content |
Edwin Kempin | d31e558 | 2013-11-30 12:07:08 +0100 | [diff] [blame] | 1626 | -- |
| 1627 | 'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]/files/link:rest-api-changes.html#file-id[\{file-id\}]/content' |
| 1628 | -- |
| 1629 | |
| 1630 | Gets the content of a file from the HEAD revision of a certain branch. |
| 1631 | |
| 1632 | .Request |
| 1633 | ---- |
| 1634 | GET /projects/gerrit/branches/master/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/content HTTP/1.0 |
| 1635 | ---- |
| 1636 | |
| 1637 | The content is returned as base64 encoded string. |
| 1638 | |
| 1639 | .Response |
| 1640 | ---- |
| 1641 | HTTP/1.1 200 OK |
| 1642 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1643 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | d31e558 | 2013-11-30 12:07:08 +0100 | [diff] [blame] | 1644 | |
| 1645 | Ly8gQ29weXJpZ2h0IChDKSAyMDEwIFRoZSBBbmRyb2lkIE9wZW4gU291cmNlIFByb2plY... |
| 1646 | ---- |
| 1647 | |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 1648 | |
| 1649 | [[get-mergeable-info]] |
| 1650 | === Get Mergeable Information |
| 1651 | -- |
| 1652 | 'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]/mergeable' |
| 1653 | -- |
| 1654 | |
| 1655 | Gets whether the source is mergeable with the target branch. |
| 1656 | |
Zhen Chen | 8f00d55 | 2016-07-26 16:54:59 -0700 | [diff] [blame] | 1657 | The `source` query parameter is required, which can be anything that could be |
| 1658 | resolved to a commit, see examples of the `source` attribute in |
| 1659 | link:rest-api-changes.html#merge-input[MergeInput]. |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 1660 | |
| 1661 | Also takes an optional parameter `strategy`, which can be `recursive`, `resolve`, |
| 1662 | `simple-two-way-in-core`, `ours` or `theirs`, default will use project settings. |
| 1663 | |
| 1664 | .Request |
| 1665 | ---- |
| 1666 | GET /projects/test/branches/master/mergeable?source=testbranch&strategy=recursive HTTP/1.0 |
| 1667 | ---- |
| 1668 | |
Zhen Chen | 8f00d55 | 2016-07-26 16:54:59 -0700 | [diff] [blame] | 1669 | As response a link:rest-api-changes.html#mergeable-info[MergeableInfo] entity is returned. |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 1670 | |
| 1671 | .Response |
| 1672 | ---- |
| 1673 | HTTP/1.1 200 OK |
| 1674 | Content-Disposition: attachment |
| 1675 | Content-Type: application/json; charset=UTF-8 |
| 1676 | |
| 1677 | )]}' |
| 1678 | { |
Zhen Chen | 8f00d55 | 2016-07-26 16:54:59 -0700 | [diff] [blame] | 1679 | "submit_type": "MERGE_IF_NECESSARY", |
| 1680 | "strategy": "recursive", |
| 1681 | "mergeable": true, |
| 1682 | "commit_merged": false, |
| 1683 | "content_merged": false |
| 1684 | } |
| 1685 | ---- |
| 1686 | |
| 1687 | or when there were conflicts. |
| 1688 | |
| 1689 | .Response |
| 1690 | ---- |
| 1691 | HTTP/1.1 200 OK |
| 1692 | Content-Disposition: attachment |
| 1693 | Content-Type: application/json; charset=UTF-8 |
| 1694 | |
| 1695 | )]}' |
| 1696 | { |
| 1697 | "submit_type": "MERGE_IF_NECESSARY", |
| 1698 | "strategy": "recursive", |
| 1699 | "mergeable": false, |
| 1700 | "conflicts": [ |
| 1701 | "common.txt", |
| 1702 | "shared.txt" |
| 1703 | ] |
| 1704 | } |
| 1705 | ---- |
| 1706 | |
| 1707 | or when the 'testbranch' has been already merged. |
| 1708 | |
| 1709 | .Response |
| 1710 | ---- |
| 1711 | HTTP/1.1 200 OK |
| 1712 | Content-Disposition: attachment |
| 1713 | Content-Type: application/json; charset=UTF-8 |
| 1714 | |
| 1715 | )]}' |
| 1716 | { |
| 1717 | "submit_type": "MERGE_IF_NECESSARY", |
| 1718 | "strategy": "recursive", |
| 1719 | "mergeable": true, |
| 1720 | "commit_merged": true, |
| 1721 | "content_merged": true |
| 1722 | } |
| 1723 | ---- |
| 1724 | |
| 1725 | or when only the content of 'testbranch' has been merged. |
| 1726 | |
| 1727 | .Response |
| 1728 | ---- |
| 1729 | HTTP/1.1 200 OK |
| 1730 | Content-Disposition: attachment |
| 1731 | Content-Type: application/json; charset=UTF-8 |
| 1732 | |
| 1733 | )]}' |
| 1734 | { |
| 1735 | "submit_type": "MERGE_IF_NECESSARY", |
| 1736 | "strategy": "recursive", |
| 1737 | "mergeable": true, |
| 1738 | "commit_merged": false, |
| 1739 | "content_merged": true |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 1740 | } |
| 1741 | ---- |
| 1742 | |
Edwin Kempin | 87504d9 | 2014-07-04 12:59:19 +0200 | [diff] [blame] | 1743 | [[get-reflog]] |
| 1744 | === Get Reflog |
| 1745 | -- |
| 1746 | 'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]/reflog' |
| 1747 | -- |
| 1748 | |
| 1749 | Gets the reflog of a certain branch. |
| 1750 | |
| 1751 | The caller must be project owner. |
| 1752 | |
| 1753 | .Request |
| 1754 | ---- |
| 1755 | GET /projects/gerrit/branches/master/reflog HTTP/1.0 |
| 1756 | ---- |
| 1757 | |
| 1758 | As response a list of link:#reflog-entry-info[ReflogEntryInfo] entities |
| 1759 | is returned that describe the reflog entries. The reflog entries are |
| 1760 | returned in reverse order. |
| 1761 | |
| 1762 | .Response |
| 1763 | ---- |
| 1764 | HTTP/1.1 200 OK |
| 1765 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1766 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 87504d9 | 2014-07-04 12:59:19 +0200 | [diff] [blame] | 1767 | |
| 1768 | )]}' |
| 1769 | [ |
| 1770 | { |
| 1771 | "old_id": "976ced8f4fc0909d7e1584d18455299545881d60", |
| 1772 | "new_id": "2eaa94bac536654eb592c941e33b91f925698d16", |
| 1773 | "who": { |
| 1774 | "name": "Jane Roe", |
| 1775 | "email": "jane.roe@example.com", |
| 1776 | "date": "2014-06-30 11:53:43.000000000", |
| 1777 | "tz": 120 |
| 1778 | }, |
| 1779 | "comment": "merged: fast forward" |
| 1780 | }, |
| 1781 | { |
| 1782 | "old_id": "c271c6a7161b74f85560c5899c8c73ee89ca5e29", |
| 1783 | "new_id": "976ced8f4fc0909d7e1584d18455299545881d60", |
| 1784 | "who": { |
| 1785 | "name": "John Doe", |
| 1786 | "email": "john.doe@example.com", |
| 1787 | "date": "2013-10-02 10:45:26.000000000", |
| 1788 | "tz": 120 |
| 1789 | }, |
| 1790 | "comment": "merged: fast forward" |
| 1791 | }, |
| 1792 | { |
| 1793 | "old_id": "0000000000000000000000000000000000000000", |
| 1794 | "new_id": "c271c6a7161b74f85560c5899c8c73ee89ca5e29", |
| 1795 | "who": { |
| 1796 | "name": "John Doe", |
| 1797 | "email": "john.doe@example.com", |
| 1798 | "date": "2013-09-30 19:08:44.000000000", |
| 1799 | "tz": 120 |
| 1800 | }, |
| 1801 | "comment": "" |
| 1802 | } |
| 1803 | ] |
| 1804 | ---- |
| 1805 | |
| 1806 | The get reflog endpoint also accepts a limit integer in the `n` |
| 1807 | parameter. This limits the results to show the last `n` reflog entries. |
| 1808 | |
| 1809 | Query the last 25 reflog entries. |
| 1810 | ---- |
| 1811 | GET /projects/gerrit/branches/master/reflog?n=25 HTTP/1.0 |
| 1812 | ---- |
| 1813 | |
Edwin Kempin | 2a581fd | 2014-07-04 14:04:54 +0200 | [diff] [blame] | 1814 | The reflog can also be filtered by timestamp by specifying the `from` |
| 1815 | and `to` parameters. The timestamp for `from` and `to` must be given as |
| 1816 | UTC in the following format: `yyyyMMdd_HHmm`. |
| 1817 | |
| 1818 | ---- |
| 1819 | GET /projects/gerrit/branches/master/reflog?from=20130101_0000&to=20140101_0000=25 HTTP/1.0 |
| 1820 | ---- |
| 1821 | |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1822 | [[child-project-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1823 | == Child Project Endpoints |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1824 | |
| 1825 | [[list-child-projects]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1826 | === List Child Projects |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1827 | -- |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1828 | 'GET /projects/link:#project-name[\{project-name\}]/children/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1829 | -- |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1830 | |
| 1831 | List the direct child projects of a project. |
| 1832 | |
| 1833 | .Request |
| 1834 | ---- |
| 1835 | GET /projects/Public-Plugins/children/ HTTP/1.0 |
| 1836 | ---- |
| 1837 | |
| 1838 | As result a list of link:#project-info[ProjectInfo] entries is |
| 1839 | returned that describe the child projects. |
| 1840 | |
| 1841 | .Response |
| 1842 | ---- |
| 1843 | HTTP/1.1 200 OK |
| 1844 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1845 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1846 | |
| 1847 | )]}' |
| 1848 | [ |
| 1849 | { |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1850 | "id": "plugins%2Freplication", |
| 1851 | "name": "plugins/replication", |
| 1852 | "parent": "Public-Plugins", |
| 1853 | "description": "Copies to other servers using the Git protocol" |
| 1854 | }, |
| 1855 | { |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1856 | "id": "plugins%2Freviewnotes", |
| 1857 | "name": "plugins/reviewnotes", |
| 1858 | "parent": "Public-Plugins", |
| 1859 | "description": "Annotates merged commits using notes on refs/notes/review." |
| 1860 | }, |
| 1861 | { |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1862 | "id": "plugins%2Fsingleusergroup", |
| 1863 | "name": "plugins/singleusergroup", |
| 1864 | "parent": "Public-Plugins", |
| 1865 | "description": "GroupBackend enabling users to be directly added to access rules" |
| 1866 | } |
| 1867 | ] |
| 1868 | ---- |
| 1869 | |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 1870 | To resolve the child projects of a project recursively the parameter |
| 1871 | `recursive` can be set. |
| 1872 | |
| 1873 | Child projects that are not visible to the calling user are ignored and |
| 1874 | are not resolved further. |
| 1875 | |
| 1876 | .Request |
| 1877 | ---- |
| 1878 | GET /projects/Public-Projects/children/?recursive HTTP/1.0 |
| 1879 | ---- |
| 1880 | |
| 1881 | .Response |
| 1882 | ---- |
| 1883 | HTTP/1.1 200 OK |
| 1884 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1885 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 1886 | |
| 1887 | )]}' |
| 1888 | [ |
| 1889 | { |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 1890 | "id": "gerrit", |
| 1891 | "name": "gerrit", |
| 1892 | "parent": "Public-Projects", |
| 1893 | "description": "Gerrit Code Review" |
| 1894 | }, |
| 1895 | { |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 1896 | "id": "plugins%2Freplication", |
| 1897 | "name": "plugins/replication", |
| 1898 | "parent": "Public-Plugins", |
| 1899 | "description": "Copies to other servers using the Git protocol" |
| 1900 | }, |
| 1901 | { |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 1902 | "id": "plugins%2Freviewnotes", |
| 1903 | "name": "plugins/reviewnotes", |
| 1904 | "parent": "Public-Plugins", |
| 1905 | "description": "Annotates merged commits using notes on refs/notes/review." |
| 1906 | }, |
| 1907 | { |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 1908 | "id": "plugins%2Fsingleusergroup", |
| 1909 | "name": "plugins/singleusergroup", |
| 1910 | "parent": "Public-Plugins", |
| 1911 | "description": "GroupBackend enabling users to be directly added to access rules" |
| 1912 | }, |
| 1913 | { |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 1914 | "id": "Public-Plugins", |
| 1915 | "name": "Public-Plugins", |
| 1916 | "parent": "Public-Projects", |
| 1917 | "description": "Parent project for plugins/*" |
| 1918 | } |
| 1919 | ] |
| 1920 | ---- |
| 1921 | |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 1922 | [[get-child-project]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1923 | === Get Child Project |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1924 | -- |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 1925 | 'GET /projects/link:#project-name[\{project-name\}]/children/link:#project-name[\{project-name\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1926 | -- |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 1927 | |
Edwin Kempin | 8a3fb5b | 2013-03-21 15:02:22 +0100 | [diff] [blame] | 1928 | Retrieves a child project. If a non-direct child project should be |
| 1929 | retrieved the parameter `recursive` must be set. |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 1930 | |
| 1931 | .Request |
| 1932 | ---- |
| 1933 | GET /projects/Public-Plugins/children/plugins%2Freplication HTTP/1.0 |
| 1934 | ---- |
| 1935 | |
| 1936 | As response a link:#project-info[ProjectInfo] entity is returned that |
| 1937 | describes the child project. |
| 1938 | |
| 1939 | .Response |
| 1940 | ---- |
| 1941 | HTTP/1.1 200 OK |
| 1942 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1943 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 1944 | |
| 1945 | )]}' |
| 1946 | { |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 1947 | "id": "plugins%2Freplication", |
| 1948 | "name": "plugins/replication", |
| 1949 | "parent": "Public-Plugins", |
| 1950 | "description": "Copies to other servers using the Git protocol" |
| 1951 | } |
| 1952 | ---- |
| 1953 | |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 1954 | [[tag-endpoints]] |
| 1955 | == Tag Endpoints |
| 1956 | |
David Pursehouse | 6a44619 | 2016-06-03 10:00:34 +0900 | [diff] [blame] | 1957 | [[create-tag]] |
| 1958 | === Create Tag |
| 1959 | |
| 1960 | -- |
| 1961 | 'PUT /projects/link:#project-name[\{project-name\}]/tags/link:#tag-id[\{tag-id\}]' |
| 1962 | -- |
| 1963 | |
| 1964 | Create a new tag on the project. |
| 1965 | |
| 1966 | In the request body additional data for the tag can be provided as |
| 1967 | link:#tag-input[TagInput]. |
| 1968 | |
| 1969 | If a message is provided in the input, the tag is created as an |
| 1970 | annotated tag with the current user as tagger. Signed tags are not |
| 1971 | supported. |
| 1972 | |
| 1973 | .Request |
| 1974 | ---- |
| 1975 | PUT /projects/MyProject/tags/v1.0 HTTP/1.0 |
| 1976 | Content-Type: application/json; charset=UTF-8 |
| 1977 | |
| 1978 | { |
| 1979 | "message": "annotation", |
| 1980 | "revision": "c83117624b5b5d8a7f86093824e2f9c1ed309d63" |
| 1981 | } |
| 1982 | ---- |
| 1983 | |
| 1984 | As response a link:#tag-info[TagInfo] entity is returned that describes |
| 1985 | the created tag. |
| 1986 | |
| 1987 | .Response |
| 1988 | ---- |
| 1989 | HTTP/1.1 201 Created |
| 1990 | Content-Disposition: attachment |
| 1991 | Content-Type: application/json; charset=UTF-8 |
| 1992 | |
| 1993 | )]}' |
| 1994 | |
| 1995 | "object": "d48d304adc4b6674e11dc2c018ea05fcbdda32fd", |
| 1996 | "message": "annotation", |
| 1997 | "tagger": { |
| 1998 | "name": "David Pursehouse", |
| 1999 | "email": "dpursehouse@collab.net", |
| 2000 | "date": "2016-06-06 01:22:03.000000000", |
| 2001 | "tz": 540 |
| 2002 | }, |
| 2003 | "ref": "refs/tags/v1.0", |
| 2004 | "revision": "c83117624b5b5d8a7f86093824e2f9c1ed309d63" |
| 2005 | } |
| 2006 | ---- |
| 2007 | |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2008 | [[list-tags]] |
| 2009 | === List Tags |
| 2010 | -- |
| 2011 | 'GET /projects/link:#project-name[\{project-name\}]/tags/' |
| 2012 | -- |
| 2013 | |
| 2014 | List the tags of a project. |
| 2015 | |
| 2016 | As result a list of link:#tag-info[TagInfo] entries is returned. |
| 2017 | |
| 2018 | Only includes tags under the `refs/tags/` namespace. |
| 2019 | |
| 2020 | .Request |
| 2021 | ---- |
| 2022 | GET /projects/work%2Fmy-project/tags/ HTTP/1.0 |
| 2023 | ---- |
| 2024 | |
| 2025 | .Response |
| 2026 | ---- |
| 2027 | HTTP/1.1 200 OK |
| 2028 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2029 | Content-Type: application/json; charset=UTF-8 |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2030 | |
| 2031 | )]}' |
| 2032 | [ |
| 2033 | { |
| 2034 | "ref": "refs/tags/v1.0", |
| 2035 | "revision": "49ce77fdcfd3398dc0dedbe016d1a425fd52d666", |
| 2036 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2037 | "message": "Annotated tag", |
| 2038 | "tagger": { |
| 2039 | "name": "David Pursehouse", |
| 2040 | "email": "david.pursehouse@sonymobile.com", |
| 2041 | "date": "2014-10-06 07:35:03.000000000", |
| 2042 | "tz": 540 |
| 2043 | } |
| 2044 | }, |
| 2045 | { |
| 2046 | "ref": "refs/tags/v2.0", |
| 2047 | "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30" |
| 2048 | }, |
| 2049 | { |
| 2050 | "ref": "refs/tags/v3.0", |
| 2051 | "revision": "c628685b3c5a3614571ecb5c8fceb85db9112313", |
| 2052 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2053 | "message": "Signed tag\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.11 (GNU/Linux)\n\niQEcBAABAgAGBQJUMlqYAAoJEPI2qVPgglptp7MH/j+KFcittFbxfSnZjUl8n5IZ\nveZo7wE+syjD9sUbMH4EGv0WYeVjphNTyViBof+stGTNkB0VQzLWI8+uWmOeiJ4a\nzj0LsbDOxodOEMI5tifo02L7r4Lzj++EbqtKv8IUq2kzYoQ2xjhKfFiGjeYOn008\n9PGnhNblEHZgCHguGR6GsfN8bfA2XNl9B5Ysl5ybX1kAVs/TuLZR4oDMZ/pW2S75\nhuyNnSgcgq7vl2gLGefuPs9lxkg5Fj3GZr7XPZk4pt/x1oiH7yXxV4UzrUwg2CC1\nfHrBlNbQ4uJNY8TFcwof52Z0cagM5Qb/ZSLglHbqEDGA68HPqbwf5z2hQyU2/U4\u003d\n\u003dZtUX\n-----END PGP SIGNATURE-----", |
| 2054 | "tagger": { |
| 2055 | "name": "David Pursehouse", |
| 2056 | "email": "david.pursehouse@sonymobile.com", |
| 2057 | "date": "2014-10-06 09:02:16.000000000", |
| 2058 | "tz": 540 |
| 2059 | } |
| 2060 | } |
| 2061 | ] |
| 2062 | ---- |
| 2063 | |
David Pursehouse | b0ba151 | 2015-09-10 14:17:05 +0900 | [diff] [blame] | 2064 | [[tag-options]] |
| 2065 | ==== Tag Options |
| 2066 | |
| 2067 | Limit(n):: |
| 2068 | Limit the number of tags to be included in the results. |
| 2069 | + |
| 2070 | .Request |
| 2071 | ---- |
| 2072 | GET /projects/work%2Fmy-project/tags?n=2 HTTP/1.0 |
| 2073 | ---- |
| 2074 | + |
| 2075 | .Response |
| 2076 | ---- |
| 2077 | HTTP/1.1 200 OK |
| 2078 | Content-Disposition: attachment |
| 2079 | Content-Type: application/json; charset=UTF-8 |
| 2080 | |
| 2081 | )]}' |
| 2082 | [ |
| 2083 | { |
| 2084 | "ref": "refs/tags/v1.0", |
| 2085 | "revision": "49ce77fdcfd3398dc0dedbe016d1a425fd52d666", |
| 2086 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2087 | "message": "Annotated tag", |
| 2088 | "tagger": { |
| 2089 | "name": "David Pursehouse", |
| 2090 | "email": "david.pursehouse@sonymobile.com", |
| 2091 | "date": "2014-10-06 07:35:03.000000000", |
| 2092 | "tz": 540 |
| 2093 | } |
| 2094 | }, |
| 2095 | { |
| 2096 | "ref": "refs/tags/v2.0", |
| 2097 | "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30" |
| 2098 | } |
| 2099 | ] |
| 2100 | ---- |
| 2101 | |
David Pursehouse | 5cb3819 | 2017-07-28 16:11:33 +0100 | [diff] [blame] | 2102 | Skip(S):: |
David Pursehouse | b0ba151 | 2015-09-10 14:17:05 +0900 | [diff] [blame] | 2103 | Skip the given number of tags from the beginning of the list. |
| 2104 | + |
| 2105 | .Request |
| 2106 | ---- |
| 2107 | GET /projects/work%2Fmy-project/tags?n=2&s=1 HTTP/1.0 |
| 2108 | ---- |
| 2109 | + |
| 2110 | .Response |
| 2111 | ---- |
| 2112 | HTTP/1.1 200 OK |
| 2113 | Content-Disposition: attachment |
| 2114 | Content-Type: application/json; charset=UTF-8 |
| 2115 | |
| 2116 | )]}' |
| 2117 | [ |
| 2118 | { |
| 2119 | "ref": "refs/tags/v2.0", |
| 2120 | "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30" |
| 2121 | }, |
| 2122 | { |
| 2123 | "ref": "refs/tags/v3.0", |
| 2124 | "revision": "c628685b3c5a3614571ecb5c8fceb85db9112313", |
| 2125 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2126 | "message": "Signed tag\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.11 (GNU/Linux)\n\niQEcBAABAgAGBQJUMlqYAAoJEPI2qVPgglptp7MH/j+KFcittFbxfSnZjUl8n5IZ\nveZo7wE+syjD9sUbMH4EGv0WYeVjphNTyViBof+stGTNkB0VQzLWI8+uWmOeiJ4a\nzj0LsbDOxodOEMI5tifo02L7r4Lzj++EbqtKv8IUq2kzYoQ2xjhKfFiGjeYOn008\n9PGnhNblEHZgCHguGR6GsfN8bfA2XNl9B5Ysl5ybX1kAVs/TuLZR4oDMZ/pW2S75\nhuyNnSgcgq7vl2gLGefuPs9lxkg5Fj3GZr7XPZk4pt/x1oiH7yXxV4UzrUwg2CC1\nfHrBlNbQ4uJNY8TFcwof52Z0cagM5Qb/ZSLglHbqEDGA68HPqbwf5z2hQyU2/U4\u003d\n\u003dZtUX\n-----END PGP SIGNATURE-----", |
| 2127 | "tagger": { |
| 2128 | "name": "David Pursehouse", |
| 2129 | "email": "david.pursehouse@sonymobile.com", |
| 2130 | "date": "2014-10-06 09:02:16.000000000", |
| 2131 | "tz": 540 |
| 2132 | } |
| 2133 | } |
| 2134 | ] |
| 2135 | ---- |
| 2136 | |
David Pursehouse | cf1ed06 | 2017-07-13 10:05:43 +0900 | [diff] [blame] | 2137 | Substring(m):: |
| 2138 | Limit the results to those tags that match the specified substring. |
| 2139 | + |
David Pursehouse | 16a1a4b | 2017-07-13 10:22:28 +0900 | [diff] [blame] | 2140 | The match is case insensitive. May not be used together with `r`. |
David Pursehouse | cf1ed06 | 2017-07-13 10:05:43 +0900 | [diff] [blame] | 2141 | + |
| 2142 | List all tags that match substring `v2`: |
| 2143 | |
| 2144 | + |
| 2145 | .Request |
| 2146 | ---- |
| 2147 | GET /projects/testproject/tags?m=v2 HTTP/1.0 |
| 2148 | ---- |
| 2149 | + |
| 2150 | .Response |
| 2151 | ---- |
| 2152 | HTTP/1.1 200 OK |
| 2153 | Content-Disposition: attachment |
| 2154 | Content-Type: application/json; charset=UTF-8 |
| 2155 | |
| 2156 | )]}' |
| 2157 | [ |
| 2158 | { |
| 2159 | "ref": "refs/tags/v2.0", |
| 2160 | "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30" |
| 2161 | }, |
| 2162 | ] |
| 2163 | ---- |
| 2164 | |
| 2165 | Regex(r):: |
| 2166 | Limit the results to those tags that match the specified regex. |
| 2167 | Boundary matchers '^' and '$' are implicit. For example: the regex 't*' will |
| 2168 | match any tags that start with 't' and regex '*t' will match any |
| 2169 | tags that end with 't'. |
| 2170 | + |
David Pursehouse | 16a1a4b | 2017-07-13 10:22:28 +0900 | [diff] [blame] | 2171 | The match is case sensitive. May not be used together with `m`. |
David Pursehouse | f648e04 | 2017-07-13 10:08:46 +0900 | [diff] [blame] | 2172 | + |
David Pursehouse | cf1ed06 | 2017-07-13 10:05:43 +0900 | [diff] [blame] | 2173 | List all tags that match regex `v.*0`: |
| 2174 | + |
| 2175 | .Request |
| 2176 | ---- |
| 2177 | GET /projects/testproject/tags?r=v.*0 HTTP/1.0 |
| 2178 | ---- |
| 2179 | + |
| 2180 | .Response |
| 2181 | ---- |
| 2182 | HTTP/1.1 200 OK |
| 2183 | Content-Disposition: attachment |
| 2184 | Content-Type: application/json; charset=UTF-8 |
| 2185 | |
| 2186 | )]}' |
| 2187 | [ |
| 2188 | { |
| 2189 | "ref": "refs/tags/v1.0", |
| 2190 | "revision": "49ce77fdcfd3398dc0dedbe016d1a425fd52d666", |
| 2191 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2192 | "message": "Annotated tag", |
| 2193 | "tagger": { |
| 2194 | "name": "David Pursehouse", |
| 2195 | "email": "david.pursehouse@sonymobile.com", |
| 2196 | "date": "2014-10-06 07:35:03.000000000", |
| 2197 | "tz": 540 |
| 2198 | } |
| 2199 | }, |
| 2200 | { |
| 2201 | "ref": "refs/tags/v2.0", |
| 2202 | "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30" |
| 2203 | }, |
| 2204 | { |
| 2205 | "ref": "refs/tags/v3.0", |
| 2206 | "revision": "c628685b3c5a3614571ecb5c8fceb85db9112313", |
| 2207 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2208 | "message": "Signed tag\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.11 (GNU/Linux)\n\niQEcBAABAgAGBQJUMlqYAAoJEPI2qVPgglptp7MH/j+KFcittFbxfSnZjUl8n5IZ\nveZo7wE+syjD9sUbMH4EGv0WYeVjphNTyViBof+stGTNkB0VQzLWI8+uWmOeiJ4a\nzj0LsbDOxodOEMI5tifo02L7r4Lzj++EbqtKv8IUq2kzYoQ2xjhKfFiGjeYOn008\n9PGnhNblEHZgCHguGR6GsfN8bfA2XNl9B5Ysl5ybX1kAVs/TuLZR4oDMZ/pW2S75\nhuyNnSgcgq7vl2gLGefuPs9lxkg5Fj3GZr7XPZk4pt/x1oiH7yXxV4UzrUwg2CC1\nfHrBlNbQ4uJNY8TFcwof52Z0cagM5Qb/ZSLglHbqEDGA68HPqbwf5z2hQyU2/U4\u003d\n\u003dZtUX\n-----END PGP SIGNATURE-----", |
| 2209 | "tagger": { |
| 2210 | "name": "David Pursehouse", |
| 2211 | "email": "david.pursehouse@sonymobile.com", |
| 2212 | "date": "2014-10-06 09:02:16.000000000", |
| 2213 | "tz": 540 |
| 2214 | } |
| 2215 | } |
| 2216 | ] |
| 2217 | ---- |
David Pursehouse | b0ba151 | 2015-09-10 14:17:05 +0900 | [diff] [blame] | 2218 | |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2219 | [[get-tag]] |
| 2220 | === Get Tag |
| 2221 | -- |
| 2222 | 'GET /projects/link:#project-name[\{project-name\}]/tags/link:#tag-id[\{tag-id\}]' |
| 2223 | -- |
| 2224 | |
| 2225 | Retrieves a tag of a project. |
| 2226 | |
| 2227 | .Request |
| 2228 | ---- |
| 2229 | GET /projects/work%2Fmy-project/tags/v1.0 HTTP/1.0 |
| 2230 | ---- |
| 2231 | |
| 2232 | As response a link:#tag-info[TagInfo] entity is returned that describes the tag. |
| 2233 | |
| 2234 | .Response |
| 2235 | ---- |
| 2236 | HTTP/1.1 200 OK |
| 2237 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2238 | Content-Type: application/json; charset=UTF-8 |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2239 | |
| 2240 | )]}' |
| 2241 | { |
| 2242 | "ref": "refs/tags/v1.0", |
| 2243 | "revision": "49ce77fdcfd3398dc0dedbe016d1a425fd52d666", |
| 2244 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2245 | "message": "Annotated tag", |
| 2246 | "tagger": { |
| 2247 | "name": "David Pursehouse", |
| 2248 | "email": "david.pursehouse@sonymobile.com", |
| 2249 | "date": "2014-10-06 07:35:03.000000000", |
| 2250 | "tz": 540 |
| 2251 | } |
| 2252 | } |
| 2253 | ---- |
| 2254 | |
David Pursehouse | e113216 | 2016-11-30 20:42:33 +0900 | [diff] [blame] | 2255 | [[delete-tag]] |
| 2256 | === Delete Tag |
| 2257 | -- |
| 2258 | 'DELETE /projects/link:#project-name[\{project-name\}]/tags/link:#tag-id[\{tag-id\}]' |
| 2259 | -- |
| 2260 | |
| 2261 | Deletes a tag. |
| 2262 | |
| 2263 | .Request |
| 2264 | ---- |
| 2265 | DELETE /projects/MyProject/tags/v1.0 HTTP/1.0 |
| 2266 | ---- |
| 2267 | |
| 2268 | .Response |
| 2269 | ---- |
| 2270 | HTTP/1.1 204 No Content |
| 2271 | ---- |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2272 | |
David Pursehouse | 467aecb | 2016-12-02 14:18:42 +0900 | [diff] [blame] | 2273 | [[delete-tags]] |
| 2274 | === Delete Tags |
| 2275 | -- |
| 2276 | 'POST /projects/link:#project-name[\{project-name\}]/tags:delete' |
| 2277 | -- |
| 2278 | |
| 2279 | Delete one or more tags. |
| 2280 | |
| 2281 | The tags to be deleted must be provided in the request body as a |
| 2282 | link:#delete-tags-input[DeleteTagsInput] entity. |
| 2283 | |
| 2284 | .Request |
| 2285 | ---- |
| 2286 | POST /projects/MyProject/tags:delete HTTP/1.0 |
| 2287 | Content-Type: application/json;charset=UTF-8 |
| 2288 | |
| 2289 | { |
| 2290 | "tags": [ |
| 2291 | "v1.0", |
| 2292 | "v2.0" |
| 2293 | ] |
| 2294 | } |
| 2295 | ---- |
| 2296 | |
| 2297 | .Response |
| 2298 | ---- |
| 2299 | HTTP/1.1 204 No Content |
| 2300 | ---- |
| 2301 | |
| 2302 | If some tags could not be deleted, the response is "`409 Conflict`" and the |
| 2303 | error message is contained in the response body. |
| 2304 | |
Edwin Kempin | 1b99360 | 2014-07-08 16:18:45 +0200 | [diff] [blame] | 2305 | [[commit-endpoints]] |
| 2306 | == Commit Endpoints |
| 2307 | |
| 2308 | [[get-commit]] |
| 2309 | === Get Commit |
| 2310 | -- |
| 2311 | 'GET /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]' |
| 2312 | -- |
| 2313 | |
| 2314 | Retrieves a commit of a project. |
| 2315 | |
| 2316 | The commit must be visible to the caller. |
| 2317 | |
| 2318 | .Request |
| 2319 | ---- |
| 2320 | GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96 HTTP/1.0 |
| 2321 | ---- |
| 2322 | |
| 2323 | As response a link:rest-api-changes.html#commit-info[CommitInfo] entity |
| 2324 | is returned that describes the commit. |
| 2325 | |
| 2326 | .Response |
| 2327 | ---- |
| 2328 | HTTP/1.1 200 OK |
| 2329 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2330 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 1b99360 | 2014-07-08 16:18:45 +0200 | [diff] [blame] | 2331 | |
| 2332 | )]}' |
| 2333 | { |
| 2334 | "commit": "184ebe53805e102605d11f6b143486d15c23a09c", |
| 2335 | "parents": [ |
| 2336 | { |
| 2337 | "commit": "1eee2c9d8f352483781e772f35dc586a69ff5646", |
| 2338 | "subject": "Migrate contributor agreements to All-Projects." |
| 2339 | } |
| 2340 | ], |
| 2341 | "author": { |
| 2342 | "name": "Shawn O. Pearce", |
| 2343 | "email": "sop@google.com", |
| 2344 | "date": "2012-04-24 18:08:08.000000000", |
| 2345 | "tz": -420 |
| 2346 | }, |
| 2347 | "committer": { |
| 2348 | "name": "Shawn O. Pearce", |
| 2349 | "email": "sop@google.com", |
| 2350 | "date": "2012-04-24 18:08:08.000000000", |
| 2351 | "tz": -420 |
| 2352 | }, |
| 2353 | "subject": "Use an EventBus to manage star icons", |
| 2354 | "message": "Use an EventBus to manage star icons\n\nImage widgets that need to ..." |
| 2355 | } |
| 2356 | ---- |
| 2357 | |
Gustaf Lundh | 1386d59 | 2016-10-19 23:19:08 +0200 | [diff] [blame] | 2358 | [[get-included-in]] |
| 2359 | === Get Included In |
| 2360 | -- |
| 2361 | 'GET /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]/in' |
| 2362 | -- |
| 2363 | |
| 2364 | Retrieves the branches and tags in which a change is included. As result |
| 2365 | an link:rest-api-changes.html#included-in-info[IncludedInInfo] entity is returned. |
| 2366 | |
| 2367 | .Request |
| 2368 | ---- |
| 2369 | GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96/in HTTP/1.0 |
| 2370 | ---- |
| 2371 | |
| 2372 | .Response |
| 2373 | ---- |
| 2374 | HTTP/1.1 200 OK |
| 2375 | Content-Disposition: attachment |
| 2376 | Content-Type: application/json;charset=UTF-8 |
| 2377 | |
| 2378 | )]}' |
| 2379 | { |
| 2380 | "branches": [ |
| 2381 | "master" |
| 2382 | ], |
| 2383 | "tags": [] |
| 2384 | } |
| 2385 | ---- |
| 2386 | |
Zhen Chen | d1462d8 | 2016-05-12 13:55:37 -0700 | [diff] [blame] | 2387 | [[get-content-from-commit]] |
Edwin Kempin | 6f7410a | 2014-07-09 15:46:22 +0200 | [diff] [blame] | 2388 | === Get Content |
| 2389 | -- |
| 2390 | 'GET /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]/files/link:rest-api-changes.html#file-id[\{file-id\}]/content' |
| 2391 | -- |
| 2392 | |
| 2393 | Gets the content of a file from a certain commit. |
| 2394 | |
| 2395 | .Request |
| 2396 | ---- |
| 2397 | GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/content HTTP/1.0 |
| 2398 | ---- |
| 2399 | |
| 2400 | The content is returned as base64 encoded string. |
| 2401 | |
| 2402 | .Response |
| 2403 | ---- |
| 2404 | HTTP/1.1 200 OK |
| 2405 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2406 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | 6f7410a | 2014-07-09 15:46:22 +0200 | [diff] [blame] | 2407 | |
| 2408 | Ly8gQ29weXJpZ2h0IChDKSAyMDEwIFRoZSBBbmRyb2lkIE9wZW4gU291cmNlIFByb2plY... |
| 2409 | ---- |
| 2410 | |
Changcheng Xiao | 9d2ec04 | 2017-03-22 17:16:57 +0100 | [diff] [blame] | 2411 | |
| 2412 | [[cherry-pick-commit]] |
| 2413 | === Cherry Pick Commit |
| 2414 | -- |
| 2415 | 'POST /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]/cherrypick' |
| 2416 | -- |
| 2417 | |
| 2418 | Cherry-picks a commit of a project to a destination branch. |
| 2419 | |
Changcheng Xiao | 54b6c0c | 2017-10-23 14:57:42 +0200 | [diff] [blame] | 2420 | To cherry pick a change revision, see link:rest-api-changes.html#cherry-pick[CherryPick]. |
| 2421 | |
Changcheng Xiao | 9d2ec04 | 2017-03-22 17:16:57 +0100 | [diff] [blame] | 2422 | The destination branch must be provided in the request body inside a |
| 2423 | link:rest-api-changes.html#cherrypick-input[CherryPickInput] entity. |
| 2424 | If the commit message is not set, the commit message of the source |
| 2425 | commit will be used. |
| 2426 | |
| 2427 | .Request |
| 2428 | ---- |
| 2429 | POST /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96/cherrypick HTTP/1.0 |
| 2430 | Content-Type: application/json; charset=UTF-8 |
| 2431 | |
| 2432 | { |
| 2433 | "message" : "Implementing Feature X", |
| 2434 | "destination" : "release-branch" |
| 2435 | } |
| 2436 | ---- |
| 2437 | |
| 2438 | As response a link:rest-api-changes.html#change-info[ChangeInfo] entity is returned that |
| 2439 | describes the resulting cherry-picked change. |
| 2440 | |
| 2441 | .Response |
| 2442 | ---- |
| 2443 | HTTP/1.1 200 OK |
| 2444 | Content-Disposition: attachment |
| 2445 | Content-Type: application/json; charset=UTF-8 |
| 2446 | |
| 2447 | )]}' |
| 2448 | { |
| 2449 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 2450 | "project": "myProject", |
| 2451 | "branch": "release-branch", |
| 2452 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 2453 | "subject": "Implementing Feature X", |
| 2454 | "status": "NEW", |
| 2455 | "created": "2013-02-01 09:59:32.126000000", |
| 2456 | "updated": "2013-02-21 11:16:36.775000000", |
| 2457 | "mergeable": true, |
| 2458 | "insertions": 12, |
| 2459 | "deletions": 11, |
| 2460 | "_number": 3965, |
| 2461 | "owner": { |
| 2462 | "name": "John Doe" |
| 2463 | } |
| 2464 | } |
| 2465 | ---- |
| 2466 | |
Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 2467 | [[dashboard-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2468 | == Dashboard Endpoints |
Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 2469 | |
Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 2470 | [[list-dashboards]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2471 | === List Dashboards |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2472 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2473 | 'GET /projects/link:#project-name[\{project-name\}]/dashboards/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2474 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2475 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2476 | List custom dashboards for a project. |
| 2477 | |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 2478 | As result a list of link:#dashboard-info[DashboardInfo] entries is |
| 2479 | returned. |
| 2480 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2481 | List all dashboards for the `work/my-project` project: |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2482 | |
| 2483 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2484 | ---- |
| 2485 | GET /projects/work%2Fmy-project/dashboards/ HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2486 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2487 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2488 | .Response |
| 2489 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2490 | HTTP/1.1 200 OK |
| 2491 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2492 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2493 | |
| 2494 | )]}' |
| 2495 | [ |
| 2496 | { |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2497 | "id": "main:closed", |
| 2498 | "ref": "main", |
| 2499 | "path": "closed", |
| 2500 | "description": "Merged and abandoned changes in last 7 weeks", |
| 2501 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
David Pursehouse | 8edc199 | 2017-09-15 17:12:09 +0900 | [diff] [blame] | 2502 | "is_default": true, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2503 | "title": "Closed changes", |
| 2504 | "sections": [ |
| 2505 | { |
| 2506 | "name": "Merged", |
| 2507 | "query": "status:merged age:7w" |
| 2508 | }, |
| 2509 | { |
| 2510 | "name": "Abandoned", |
| 2511 | "query": "status:abandoned age:7w" |
| 2512 | } |
| 2513 | ] |
| 2514 | } |
| 2515 | ] |
| 2516 | ---- |
| 2517 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 2518 | .Get all dashboards of the 'All-Projects' project |
| 2519 | **** |
| 2520 | get::/projects/All-Projects/dashboards/ |
| 2521 | **** |
| 2522 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2523 | [[get-dashboard]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2524 | === Get Dashboard |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2525 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2526 | 'GET /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2527 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2528 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2529 | Retrieves a project dashboard. The dashboard can be defined on that |
| 2530 | project or be inherited from a parent project. |
| 2531 | |
| 2532 | .Request |
| 2533 | ---- |
| 2534 | GET /projects/work%2Fmy-project/dashboards/main:closed HTTP/1.0 |
| 2535 | ---- |
| 2536 | |
| 2537 | As response a link:#dashboard-info[DashboardInfo] entity is returned |
| 2538 | that describes the dashboard. |
| 2539 | |
| 2540 | .Response |
| 2541 | ---- |
| 2542 | HTTP/1.1 200 OK |
| 2543 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2544 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2545 | |
| 2546 | )]}' |
| 2547 | { |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2548 | "id": "main:closed", |
| 2549 | "ref": "main", |
| 2550 | "path": "closed", |
| 2551 | "description": "Merged and abandoned changes in last 7 weeks", |
| 2552 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
David Pursehouse | 8edc199 | 2017-09-15 17:12:09 +0900 | [diff] [blame] | 2553 | "is_default": true, |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2554 | "title": "Closed changes", |
| 2555 | "sections": [ |
| 2556 | { |
| 2557 | "name": "Merged", |
| 2558 | "query": "status:merged age:7w" |
| 2559 | }, |
| 2560 | { |
| 2561 | "name": "Abandoned", |
| 2562 | "query": "status:abandoned age:7w" |
| 2563 | } |
| 2564 | ] |
| 2565 | } |
| 2566 | ---- |
| 2567 | |
| 2568 | To retrieve the default dashboard of a project use `default` as |
| 2569 | dashboard-id. |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2570 | |
| 2571 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2572 | ---- |
| 2573 | GET /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2574 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2575 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2576 | .Response |
| 2577 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2578 | HTTP/1.1 200 OK |
| 2579 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2580 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2581 | |
| 2582 | )]}' |
| 2583 | { |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2584 | "id": "main:closed", |
| 2585 | "ref": "main", |
| 2586 | "path": "closed", |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2587 | "description": "Merged and abandoned changes in last 7 weeks", |
| 2588 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
David Pursehouse | 8edc199 | 2017-09-15 17:12:09 +0900 | [diff] [blame] | 2589 | "is_default": true, |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2590 | "title": "Closed changes", |
| 2591 | "sections": [ |
| 2592 | { |
| 2593 | "name": "Merged", |
| 2594 | "query": "status:merged age:7w" |
| 2595 | }, |
| 2596 | { |
| 2597 | "name": "Abandoned", |
| 2598 | "query": "status:abandoned age:7w" |
| 2599 | } |
| 2600 | ] |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2601 | } |
| 2602 | ---- |
| 2603 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2604 | [[set-dashboard]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2605 | === Set Dashboard |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2606 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2607 | 'PUT /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2608 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2609 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2610 | Updates/Creates a project dashboard. |
| 2611 | |
| 2612 | Currently only supported for the `default` dashboard. |
| 2613 | |
| 2614 | The creation/update information for the dashboard must be provided in |
| 2615 | the request body as a link:#dashboard-input[DashboardInput] entity. |
| 2616 | |
| 2617 | .Request |
| 2618 | ---- |
| 2619 | PUT /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2620 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2621 | |
| 2622 | { |
| 2623 | "id": "main:closed", |
| 2624 | "commit_message": "Define the default dashboard" |
| 2625 | } |
| 2626 | ---- |
| 2627 | |
| 2628 | As response the new/updated dashboard is returned as a |
| 2629 | link:#dashboard-info[DashboardInfo] entity. |
| 2630 | |
| 2631 | .Response |
| 2632 | ---- |
| 2633 | HTTP/1.1 200 OK |
| 2634 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2635 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2636 | |
| 2637 | )]}' |
| 2638 | { |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2639 | "id": "main:closed", |
| 2640 | "ref": "main", |
| 2641 | "path": "closed", |
| 2642 | "description": "Merged and abandoned changes in last 7 weeks", |
| 2643 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
David Pursehouse | 8edc199 | 2017-09-15 17:12:09 +0900 | [diff] [blame] | 2644 | "is_default": true, |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2645 | "title": "Closed changes", |
| 2646 | "sections": [ |
| 2647 | { |
| 2648 | "name": "Merged", |
| 2649 | "query": "status:merged age:7w" |
| 2650 | }, |
| 2651 | { |
| 2652 | "name": "Abandoned", |
| 2653 | "query": "status:abandoned age:7w" |
| 2654 | } |
| 2655 | ] |
| 2656 | } |
| 2657 | ---- |
| 2658 | |
| 2659 | [[delete-dashboard]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2660 | === Delete Dashboard |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2661 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2662 | 'DELETE /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2663 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2664 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2665 | Deletes a project dashboard. |
| 2666 | |
| 2667 | Currently only supported for the `default` dashboard. |
| 2668 | |
Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 2669 | The request body does not need to include a link:#dashboard-input[ |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 2670 | DashboardInput] entity if no commit message is specified. |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2671 | |
| 2672 | Please note that some proxies prohibit request bodies for DELETE |
| 2673 | requests. |
| 2674 | |
| 2675 | .Request |
| 2676 | ---- |
| 2677 | DELETE /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| 2678 | ---- |
| 2679 | |
| 2680 | .Response |
| 2681 | ---- |
| 2682 | HTTP/1.1 204 No Content |
| 2683 | ---- |
| 2684 | |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 2685 | |
| 2686 | [[ids]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2687 | == IDs |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 2688 | |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 2689 | [[branch-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2690 | === \{branch-id\} |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 2691 | The name of a branch or `HEAD`. The prefix `refs/heads/` can be |
| 2692 | omitted. |
| 2693 | |
Edwin Kempin | 1b99360 | 2014-07-08 16:18:45 +0200 | [diff] [blame] | 2694 | [[commit-id]] |
| 2695 | === \{commit-id\} |
| 2696 | Commit ID. |
| 2697 | |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2698 | [[tag-id]] |
| 2699 | === \{tag-id\} |
| 2700 | The name of a tag. The prefix `refs/tags/` can be omitted. |
| 2701 | |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2702 | [[dashboard-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2703 | === \{dashboard-id\} |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2704 | The ID of a dashboard in the format '<ref>:<path>'. |
| 2705 | |
| 2706 | A special dashboard ID is `default` which represents the default |
| 2707 | dashboard of a project. |
| 2708 | |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2709 | [[project-name]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2710 | === \{project-name\} |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 2711 | The name of the project. |
| 2712 | |
Edwin Kempin | a9e94ab | 2015-03-06 10:35:39 +0100 | [diff] [blame] | 2713 | If the name ends with `.git`, the suffix will be automatically removed. |
| 2714 | |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 2715 | |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 2716 | [[json-entities]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2717 | == JSON Entities |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 2718 | |
Han-Wen Nienhuys | d1ed08d | 2017-09-04 18:13:23 +0200 | [diff] [blame] | 2719 | [[access-check-info]] |
| 2720 | === AccessCheckInfo |
| 2721 | |
| 2722 | The `AccessCheckInfo` entity is the result of an access check. |
| 2723 | |
| 2724 | [options="header",cols="1,^1,5"] |
| 2725 | |========================================= |
| 2726 | |Field Name ||Description |
| 2727 | |`status` ||The HTTP status code for the access. |
| 2728 | 200 means success, 403 means denied and 404 means the project does not exist. |
| 2729 | |`message` |optional|A clarifying message if `status` is not 200. |
| 2730 | |========================================= |
| 2731 | |
| 2732 | [[access-check-input]] |
| 2733 | === AccessCheckInput |
| 2734 | The `AccessCheckInput` entity is either an account or |
| 2735 | (account, ref) tuple for which we want to check access. |
| 2736 | |
| 2737 | [options="header",cols="1,^1,5"] |
| 2738 | |========================================= |
| 2739 | |Field Name ||Description |
| 2740 | |`account` ||The account for which to check access |
| 2741 | |`ref` |optional|The refname for which to check access |
| 2742 | |========================================= |
| 2743 | |
Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 2744 | [[ban-input]] |
| 2745 | === BanInput |
| 2746 | The `BanInput` entity contains information for banning commits in a |
| 2747 | project. |
| 2748 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2749 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 2750 | |======================= |
| 2751 | |Field Name||Description |
| 2752 | |`commits` ||List of commits to be banned. |
| 2753 | |`reason` |optional|Reason for banning the commits. |
| 2754 | |======================= |
| 2755 | |
| 2756 | [[ban-result-info]] |
| 2757 | === BanResultInfo |
| 2758 | The `BanResultInfo` entity describes the result of banning commits. |
| 2759 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2760 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 2761 | |============================= |
| 2762 | |Field Name ||Description |
| 2763 | |`newly_banned` |optional|List of newly banned commits. |
| 2764 | |`already_banned`|optional|List of commits that were already banned. |
| 2765 | |`ignored` |optional|List of object IDs that were ignored. |
| 2766 | |============================= |
| 2767 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2768 | [[branch-info]] |
| 2769 | === BranchInfo |
| 2770 | The `BranchInfo` entity contains information about a branch. |
| 2771 | |
| 2772 | [options="header",cols="1,^2,4"] |
| 2773 | |========================= |
| 2774 | |Field Name ||Description |
| 2775 | |`ref` ||The ref of the branch. |
| 2776 | |`revision` ||The revision to which the branch points. |
David Pursehouse | d00515e | 2017-11-10 15:57:41 +0900 | [diff] [blame] | 2777 | |`can_delete`|not set if `false`| |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 2778 | Whether the calling user can delete this branch. |
| 2779 | |`web_links` |optional| |
| 2780 | Links to the branch in external sites as a list of |
| 2781 | link:rest-api-changes.html#web-link-info[WebLinkInfo] entries. |
| 2782 | |========================= |
| 2783 | |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 2784 | [[branch-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2785 | === BranchInput |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 2786 | The `BranchInput` entity contains information for the creation of |
| 2787 | a new branch. |
| 2788 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2789 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 2790 | |======================= |
| 2791 | |Field Name||Description |
| 2792 | |`ref` |optional| |
| 2793 | The name of the branch. The prefix `refs/heads/` can be |
| 2794 | omitted. + |
| 2795 | If set, must match the branch ID in the URL. |
| 2796 | |`revision`|optional| |
| 2797 | The base revision of the new branch. + |
| 2798 | If not set, `HEAD` will be used as base revision. |
| 2799 | |======================= |
| 2800 | |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 2801 | [[config-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2802 | === ConfigInfo |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 2803 | The `ConfigInfo` entity contains information about the effective project |
| 2804 | configuration. |
| 2805 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2806 | [options="header",cols="1,^2,4"] |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2807 | |======================================================= |
| 2808 | |Field Name ||Description |
| 2809 | |`description` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 2810 | The description of the project. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2811 | |`use_contributor_agreements` |optional| |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 2812 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 2813 | authors must complete a contributor agreement on the site before |
| 2814 | pushing any commits or changes to this project. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2815 | |`use_content_merge` |optional| |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 2816 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 2817 | Gerrit will try to perform a 3-way merge of text file content when a |
| 2818 | file has been modified by both the destination branch and the change |
| 2819 | being submitted. This option only takes effect if submit type is not |
| 2820 | FAST_FORWARD_ONLY. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2821 | |`use_signed_off_by` |optional| |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 2822 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 2823 | each change must contain a Signed-off-by line from either the author or |
| 2824 | the uploader in the commit message. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2825 | |`create_new_change_for_all_not_in_target` |optional| |
| 2826 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 2827 | a new change is created for every commit not in target branch. |
| 2828 | |`require_change_id` |optional| |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 2829 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether a |
| 2830 | valid link:user-changeid.html[Change-Id] footer in any commit uploaded |
| 2831 | for review is required. This does not apply to commits pushed directly |
| 2832 | to a branch or tag. |
Doug Claar | 1b0f7625 | 2016-03-23 13:34:55 -0700 | [diff] [blame] | 2833 | |`enable_signed_push`|optional, not set if signed push is disabled| |
Dave Borowitz | 5170e0f | 2015-06-18 21:05:29 -0400 | [diff] [blame] | 2834 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 2835 | signed push validation is enabled on the project. |
Doug Claar | 1b0f7625 | 2016-03-23 13:34:55 -0700 | [diff] [blame] | 2836 | |`require_signed_push`|optional, not set if signed push is disabled| |
Dave Borowitz | 0543c73 | 2015-10-20 10:35:26 -0400 | [diff] [blame] | 2837 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 2838 | signed push validation is required on the project. |
Saša Živkov | 225b7a7 | 2015-11-17 17:37:43 +0100 | [diff] [blame] | 2839 | |`reject_implicit_merges`|optional| |
| 2840 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 2841 | implicit merges should be rejected on changes pushed to the project. |
Changcheng Xiao | d089b4a | 2017-08-10 14:05:22 +0200 | [diff] [blame] | 2842 | |`private_by_default` || |
| 2843 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 2844 | all new changes are set as private by default. |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 2845 | |`max_object_size_limit` || |
| 2846 | The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size |
| 2847 | limit] of this project as a link:#max-object-size-limit-info[ |
| 2848 | MaxObjectSizeLimitInfo] entity. |
| 2849 | |`submit_type` || |
| 2850 | The default submit type of the project, can be `MERGE_IF_NECESSARY`, |
Gert van Dijk | a4e49d0 | 2017-08-27 22:50:40 +0200 | [diff] [blame] | 2851 | `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `REBASE_ALWAYS`, `MERGE_ALWAYS` or |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 2852 | `CHERRY_PICK`. |
Patrick Hiesel | 5a31635 | 2017-06-22 15:38:06 +0200 | [diff] [blame] | 2853 | |`match_author_to_committer_date` |optional| |
| 2854 | link:#inherited-boolean-info[InheritedBooleanInfo] that indicates whether |
| 2855 | a change's author date will be changed to match its submitter date upon submit. |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 2856 | |`state` |optional| |
| 2857 | The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. + |
| 2858 | Not set if the project state is `ACTIVE`. |
Edwin Kempin | 3660c13 | 2013-07-16 08:03:11 +0200 | [diff] [blame] | 2859 | |`commentlinks` || |
Edwin Kempin | 8aa53af | 2013-07-15 10:43:15 +0200 | [diff] [blame] | 2860 | Map with the comment link configurations of the project. The name of |
| 2861 | the comment link configuration is mapped to the comment link |
| 2862 | configuration, which has the same format as the |
| 2863 | link:config-gerrit.html#_a_id_commentlink_a_section_commentlink[ |
| 2864 | commentlink section] of `gerrit.config`. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2865 | |`theme` |optional| |
Edwin Kempin | 272402e | 2013-07-15 11:17:36 +0200 | [diff] [blame] | 2866 | The theme that is configured for the project as a link:#theme-info[ |
| 2867 | ThemeInfo] entity. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2868 | |`plugin_config` |optional| |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 2869 | Plugin configuration as map which maps the plugin name to a map of |
| 2870 | parameter names to link:#config-parameter-info[ConfigParameterInfo] |
| 2871 | entities. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2872 | |`actions` |optional| |
David Ostrovsky | 9e8b2fb | 2013-08-30 08:09:53 +0200 | [diff] [blame] | 2873 | Actions the caller might be able to perform on this project. The |
| 2874 | information is a map of view names to |
Patrick Hiesel | dc285c7 | 2018-01-08 17:20:15 +0100 | [diff] [blame^] | 2875 | |`reject_empty_commit` |optional| |
| 2876 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 2877 | empty commits should be rejected when a change is merged. |
David Ostrovsky | 9e8b2fb | 2013-08-30 08:09:53 +0200 | [diff] [blame] | 2878 | link:rest-api-changes.html#action-info[ActionInfo] entities. |
David Pursehouse | 510b87d | 2014-11-25 16:46:28 +0900 | [diff] [blame] | 2879 | |======================================================= |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 2880 | |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 2881 | [[config-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2882 | === ConfigInput |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 2883 | The `ConfigInput` entity describes a new project configuration. |
| 2884 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2885 | [options="header",cols="1,^2,4"] |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2886 | |====================================================== |
| 2887 | |Field Name ||Description |
| 2888 | |`description` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 2889 | The new description of the project. + |
| 2890 | If not set, the description is removed. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2891 | |`use_contributor_agreements` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 2892 | Whether authors must complete a contributor agreement on the site |
| 2893 | before pushing any commits or changes to this project. + |
| 2894 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 2895 | If not set, this setting is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2896 | |`use_content_merge` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 2897 | Whether Gerrit will try to perform a 3-way merge of text file content |
| 2898 | when a file has been modified by both the destination branch and the |
| 2899 | change being submitted. This option only takes effect if submit type is |
| 2900 | not FAST_FORWARD_ONLY. + |
| 2901 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 2902 | If not set, this setting is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2903 | |`use_signed_off_by` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 2904 | Whether each change must contain a Signed-off-by line from either the |
| 2905 | author or the uploader in the commit message. + |
| 2906 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 2907 | If not set, this setting is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2908 | |`create_new_change_for_all_not_in_target` |optional| |
| 2909 | Whether a new change will be created for every commit not in target |
| 2910 | branch. + |
| 2911 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 2912 | If not set, this setting is not updated. |
| 2913 | |`require_change_id` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 2914 | Whether a valid link:user-changeid.html[Change-Id] footer in any commit |
| 2915 | uploaded for review is required. This does not apply to commits pushed |
| 2916 | directly to a branch or tag. + |
| 2917 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 2918 | If not set, this setting is not updated. |
Saša Živkov | 225b7a7 | 2015-11-17 17:37:43 +0100 | [diff] [blame] | 2919 | |`reject_implicit_merges` |optional| |
| 2920 | Whether a check for implicit merges will be performed when changes |
| 2921 | are pushed for review. + |
| 2922 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 2923 | If not set, this setting is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2924 | |`max_object_size_limit` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 2925 | The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size |
| 2926 | limit] of this project as a link:#max-object-size-limit-info[ |
| 2927 | MaxObjectSizeLimitInfo] entity. + |
| 2928 | If set to `0`, the max object size limit is removed. + |
| 2929 | If not set, this setting is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2930 | |`submit_type` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 2931 | The default submit type of the project, can be `MERGE_IF_NECESSARY`, |
Gert van Dijk | a4e49d0 | 2017-08-27 22:50:40 +0200 | [diff] [blame] | 2932 | `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `REBASE_ALWAYS`, `MERGE_ALWAYS` or |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 2933 | `CHERRY_PICK`. + |
| 2934 | If not set, the submit type is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2935 | |`state` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 2936 | The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. + |
| 2937 | Not set if the project state is `ACTIVE`. + |
| 2938 | If not set, the project state is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2939 | |`plugin_config_values` |optional| |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 2940 | Plugin configuration values as map which maps the plugin name to a map |
| 2941 | of parameter names to values. |
Patrick Hiesel | dc285c7 | 2018-01-08 17:20:15 +0100 | [diff] [blame^] | 2942 | |`reject_empty_commit` |optional| |
| 2943 | Whether empty commits should be rejected when a change is merged. |
| 2944 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 2945 | If not set, this setting is not updated. |
David Pursehouse | 510b87d | 2014-11-25 16:46:28 +0900 | [diff] [blame] | 2946 | |====================================================== |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 2947 | |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 2948 | [[config-parameter-info]] |
David Pursehouse | b10c266 | 2016-12-06 08:41:33 +0900 | [diff] [blame] | 2949 | === ConfigParameterInfo |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 2950 | The `ConfigParameterInfo` entity describes a project configuration |
| 2951 | parameter. |
| 2952 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2953 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 2954 | |=============================== |
| 2955 | |Field Name ||Description |
| 2956 | |`display_name` |optional| |
| 2957 | The display name of the configuration parameter. |
Edwin Kempin | d92196d | 2014-01-27 21:55:46 +0100 | [diff] [blame] | 2958 | |`description` |optional| |
| 2959 | The description of the configuration parameter. |
Edwin Kempin | aec6132 | 2014-01-28 12:59:22 +0100 | [diff] [blame] | 2960 | |`warning` |optional| |
| 2961 | Warning message for the configuration parameter. |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 2962 | |`type` || |
David Ostrovsky | c6dd217 | 2014-02-01 19:13:27 +0100 | [diff] [blame] | 2963 | The type of the configuration parameter. Can be `STRING`, `INT`, |
| 2964 | `LONG`, `BOOLEAN`, `LIST` or `ARRAY`. |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 2965 | |`value` |optional| |
Edwin Kempin | d32beef | 2013-11-28 20:36:33 +0100 | [diff] [blame] | 2966 | The value of the configuration parameter as string. If the parameter |
| 2967 | is inheritable this is the effective value which is deduced from |
| 2968 | `configured_value` and `inherited_value`. |
David Ostrovsky | c6dd217 | 2014-02-01 19:13:27 +0100 | [diff] [blame] | 2969 | |`values` |optional| |
| 2970 | The list of values. Only set if the `type` is `ARRAY`. |
Doug Claar | 1b0f7625 | 2016-03-23 13:34:55 -0700 | [diff] [blame] | 2971 | |`editable` |`false` if not set| |
Edwin Kempin | 0d48523 | 2013-11-17 18:55:48 +0100 | [diff] [blame] | 2972 | Whether the value is editable. |
Edwin Kempin | 20f256fb | 2013-11-28 19:56:15 +0100 | [diff] [blame] | 2973 | |`permitted_values`|optional| |
David Ostrovsky | c6dd217 | 2014-02-01 19:13:27 +0100 | [diff] [blame] | 2974 | The list of permitted values. Only set if the `type` is `LIST`. |
Edwin Kempin | d32beef | 2013-11-28 20:36:33 +0100 | [diff] [blame] | 2975 | |`inheritable` |`false` if not set| |
| 2976 | Whether the configuration parameter can be inherited. |
| 2977 | |`configured_value`|optional| |
| 2978 | The value of the configuration parameter that is configured on this |
| 2979 | project, only set if `inheritable` is true. |
| 2980 | |`inherited_value` |optional| |
| 2981 | The inherited value of the configuration parameter, only set if |
| 2982 | `inheritable` is true. |
| 2983 | |`permitted_values` |optional| |
| 2984 | The list of permitted values, only set if the `type` is `LIST`. |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 2985 | |=============================== |
| 2986 | |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 2987 | [[dashboard-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2988 | === DashboardInfo |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 2989 | The `DashboardInfo` entity contains information about a project |
| 2990 | dashboard. |
| 2991 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2992 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 2993 | |=============================== |
| 2994 | |Field Name ||Description |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 2995 | |`id` || |
| 2996 | The ID of the dashboard. The ID has the format '<ref>:<path>', |
| 2997 | where ref and path are URL encoded. |
| 2998 | |`project` || |
| 2999 | The name of the project for which this dashboard is returned. |
| 3000 | |`defining_project`|| |
| 3001 | The name of the project in which this dashboard is defined. |
| 3002 | This is different from `project` if the dashboard is inherited from a |
| 3003 | parent project. |
| 3004 | |`ref` || |
| 3005 | The name of the ref in which the dashboard is defined, without the |
| 3006 | `refs/meta/dashboards/` prefix, which is common for all dashboard refs. |
| 3007 | |`path` || |
| 3008 | The path of the file in which the dashboard is defined. |
| 3009 | |`description` |optional|The description of the dashboard. |
| 3010 | |`foreach` |optional| |
| 3011 | Subquery that applies to all sections in the dashboard. + |
| 3012 | Tokens such as `${project}` are not resolved. |
| 3013 | |`url` || |
David Pursehouse | a1d633b | 2014-05-02 17:21:02 +0900 | [diff] [blame] | 3014 | The URL under which the dashboard can be opened in the Gerrit Web UI. + |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3015 | The URL is relative to the canonical web URL. + |
| 3016 | Tokens in the queries such as `${project}` are resolved. |
David Pursehouse | 8edc199 | 2017-09-15 17:12:09 +0900 | [diff] [blame] | 3017 | |`is_default` |not set if `false`| |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3018 | Whether this is the default dashboard of the project. |
| 3019 | |`title` |optional|The title of the dashboard. |
| 3020 | |`sections` || |
| 3021 | The list of link:#dashboard-section-info[sections] in the dashboard. |
| 3022 | |=============================== |
| 3023 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 3024 | [[dashboard-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3025 | === DashboardInput |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 3026 | The `DashboardInput` entity contains information to create/update a |
| 3027 | project dashboard. |
| 3028 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3029 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 3030 | |============================= |
| 3031 | |Field Name ||Description |
| 3032 | |`id` |optional| |
Edwin Kempin | c95c508 | 2013-03-12 16:56:25 +0100 | [diff] [blame] | 3033 | URL encoded ID of a dashboard to which this dashboard should link to. |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 3034 | |`commit_message`|optional| |
| 3035 | Message that should be used to commit the change of the dashboard. |
| 3036 | |============================= |
| 3037 | |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3038 | [[dashboard-section-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3039 | === DashboardSectionInfo |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3040 | The `DashboardSectionInfo` entity contains information about a section |
| 3041 | in a dashboard. |
| 3042 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3043 | [options="header",cols="1,6"] |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3044 | |=========================== |
| 3045 | |Field Name |Description |
| 3046 | |`name` |The title of the section. |
| 3047 | |`query` |The query of the section. + |
| 3048 | Tokens such as `${project}` are not resolved. |
| 3049 | |=========================== |
| 3050 | |
Hugo Arès | ef8e320 | 2015-01-12 15:09:06 -0500 | [diff] [blame] | 3051 | [[delete-branches-input]] |
| 3052 | === DeleteBranchesInput |
| 3053 | The `DeleteBranchesInput` entity contains information about branches that should |
| 3054 | be deleted. |
| 3055 | |
| 3056 | [options="header",width="50%",cols="1,6"] |
| 3057 | |========================== |
| 3058 | |Field Name |Description |
| 3059 | |`branches` |A list of branch names that identify the branches that should be |
| 3060 | deleted. |
| 3061 | |========================== |
| 3062 | |
David Pursehouse | 467aecb | 2016-12-02 14:18:42 +0900 | [diff] [blame] | 3063 | [[delete-tags-input]] |
| 3064 | === DeleteTagsInput |
| 3065 | The `DeleteTagsInput` entity contains information about tags that should |
| 3066 | be deleted. |
| 3067 | |
| 3068 | [options="header",width="50%",cols="1,6"] |
| 3069 | |========================== |
| 3070 | |Field Name |Description |
| 3071 | |`tags` |A list of tag names that identify the tags that should be |
| 3072 | deleted. |
| 3073 | |========================== |
| 3074 | |
Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 3075 | [[gc-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3076 | === GCInput |
Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 3077 | The `GCInput` entity contains information to run the Git garbage |
| 3078 | collection. |
| 3079 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3080 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 3081 | |============================= |
| 3082 | |Field Name ||Description |
| 3083 | |`show_progress` |`false` if not set| |
| 3084 | Whether progress information should be shown. |
Christian Halstrick | 2f94e2e | 2015-03-11 15:13:31 +0100 | [diff] [blame] | 3085 | |`aggressive` |`false` if not set| |
| 3086 | Whether an aggressive garbage collection should be done. |
Adrian Görler | 92410a1 | 2015-11-03 16:20:56 +0100 | [diff] [blame] | 3087 | |`async` |`false` if not set| |
| 3088 | Whether the garbage collection should run asynchronously. |
Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 3089 | |============================= |
| 3090 | |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 3091 | [[head-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3092 | === HeadInput |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 3093 | The `HeadInput` entity contains information for setting `HEAD` for a |
| 3094 | project. |
| 3095 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3096 | [options="header",cols="1,6"] |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 3097 | |============================ |
| 3098 | |Field Name |Description |
| 3099 | |`ref` | |
| 3100 | The ref to which `HEAD` should be set, the `refs/heads` prefix can be |
| 3101 | omitted. |
| 3102 | |============================ |
| 3103 | |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3104 | [[inherited-boolean-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3105 | === InheritedBooleanInfo |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3106 | A boolean value that can also be inherited. |
| 3107 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3108 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3109 | |================================ |
| 3110 | |Field Name ||Description |
| 3111 | |`value` || |
| 3112 | The effective boolean value. |
| 3113 | |`configured_value` || |
| 3114 | The configured value, can be `TRUE`, `FALSE` or `INHERITED`. |
| 3115 | |`inherited_value` |optional| |
| 3116 | The boolean value inherited from the parent. + |
| 3117 | Not set if there is no parent. |
| 3118 | |================================ |
| 3119 | |
Han-Wen Nienhuys | 22f2774 | 2017-06-27 18:01:07 +0200 | [diff] [blame] | 3120 | |
| 3121 | [[label-type-info]] |
| 3122 | === LabelTypeInfo |
| 3123 | The `LabelTypeInfo` entity contains metadata about the labels that a |
| 3124 | project has. |
| 3125 | |
| 3126 | [options="header",cols="1,^2,4"] |
| 3127 | |================================ |
| 3128 | |Field Name ||Description |
| 3129 | |`values` ||Map of the available values to their description. |
| 3130 | |`default_value` ||The default value of this label. |
| 3131 | |================================ |
| 3132 | |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 3133 | [[max-object-size-limit-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3134 | === MaxObjectSizeLimitInfo |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 3135 | The `MaxObjectSizeLimitInfo` entity contains information about the |
| 3136 | link:config-gerrit.html#receive.maxObjectSizeLimit[max object size |
| 3137 | limit] of a project. |
| 3138 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3139 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 3140 | |=============================== |
| 3141 | |Field Name ||Description |
| 3142 | |`value` |optional| |
| 3143 | The effective value of the max object size limit as a formatted string. + |
| 3144 | Not set if there is no limit for the object size. |
| 3145 | |`configured_value`|optional| |
| 3146 | The max object size limit that is configured on the project as a |
| 3147 | formatted string. + |
| 3148 | Not set if there is no limit for the object size configured on project |
| 3149 | level. |
| 3150 | |`inherited_value` |optional| |
| 3151 | The max object size limit that is inherited as a formatted string. + |
| 3152 | Not set if there is no global limit for the object size. |
| 3153 | |=============================== |
| 3154 | |
Patrick Hiesel | 21816f1 | 2016-04-22 08:53:06 +0200 | [diff] [blame] | 3155 | [[project-access-input]] |
| 3156 | === ProjectAccessInput |
| 3157 | The `ProjectAccessInput` describes changes that should be applied to a project |
| 3158 | access config. |
| 3159 | |
| 3160 | [options="header",cols="1,^2,4"] |
| 3161 | |============================= |
| 3162 | |Field Name | |Description |
| 3163 | |`remove` |optional| |
| 3164 | A list of deductions to be applied to the project access as |
| 3165 | link:rest-api-access.html#project-access-info[ProjectAccessInfo] entities. |
| 3166 | |`add` |optional| |
| 3167 | A list of additions to be applied to the project access as |
| 3168 | link:rest-api-access.html#project-access-info[ProjectAccessInfo] entities. |
| 3169 | |`message` |optional| |
| 3170 | A commit message for this change. |
| 3171 | |`parent` |optional| |
| 3172 | A new parent for the project to inherit from. Changing the parent project |
| 3173 | requires administrative privileges. |
| 3174 | |============================= |
| 3175 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 3176 | [[project-description-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3177 | === ProjectDescriptionInput |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 3178 | The `ProjectDescriptionInput` entity contains information for setting a |
| 3179 | project description. |
| 3180 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3181 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 3182 | |============================= |
| 3183 | |Field Name ||Description |
| 3184 | |`description` |optional|The project description. + |
| 3185 | The project description will be deleted if not set. |
| 3186 | |`commit_message`|optional| |
| 3187 | Message that should be used to commit the change of the project |
| 3188 | description in the `project.config` file to the `refs/meta/config` |
| 3189 | branch. |
| 3190 | |============================= |
| 3191 | |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 3192 | [[project-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3193 | === ProjectInfo |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 3194 | The `ProjectInfo` entity contains information about a project. |
| 3195 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3196 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 3197 | |=========================== |
| 3198 | |Field Name ||Description |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 3199 | |`id` ||The URL encoded project name. |
| 3200 | |`name` | |
| 3201 | not set if returned in a map where the project name is used as map key| |
| 3202 | The name of the project. |
Edwin Kempin | f361182 | 2013-03-19 08:23:09 +0100 | [diff] [blame] | 3203 | |`parent` |optional| |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 3204 | The name of the parent project. + |
| 3205 | `?-<n>` if the parent project is not visible (`<n>` is a number which |
| 3206 | is increased for each non-visible project). |
| 3207 | |`description` |optional|The description of the project. |
Shawn Pearce | 21a6c21 | 2014-04-23 12:35:10 -0700 | [diff] [blame] | 3208 | |`state` |optional|`ACTIVE`, `READ_ONLY` or `HIDDEN`. |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 3209 | |`branches` |optional|Map of branch names to HEAD revisions. |
Han-Wen Nienhuys | 22f2774 | 2017-06-27 18:01:07 +0200 | [diff] [blame] | 3210 | |`labels` |optional| |
| 3211 | Map of label names to |
| 3212 | link:#label-type-info[LabelTypeInfo] entries. |
| 3213 | This field is filled for link:#create-project[Create Project] and |
| 3214 | link:#get-project[Get Project] calls. |
Edwin Kempin | 26c95a4 | 2014-11-25 16:29:47 +0100 | [diff] [blame] | 3215 | |`web_links` |optional| |
Edwin Kempin | ea00475 | 2014-04-11 15:56:02 +0200 | [diff] [blame] | 3216 | Links to the project in external sites as a list of |
| 3217 | link:rest-api-changes.html#web-link-info[WebLinkInfo] entries. |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 3218 | |=========================== |
| 3219 | |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 3220 | [[project-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3221 | === ProjectInput |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 3222 | The `ProjectInput` entity contains information for the creation of |
| 3223 | a new project. |
| 3224 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3225 | [options="header",cols="1,^2,4"] |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 3226 | |========================================= |
| 3227 | |Field Name ||Description |
| 3228 | |`name` |optional| |
| 3229 | The name of the project (not encoded). + |
David Pursehouse | 8c5ad41 | 2015-02-03 14:19:09 +0900 | [diff] [blame] | 3230 | If set, must match the project name in the URL. + |
| 3231 | If name ends with `.git` the suffix will be automatically removed. |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 3232 | |`parent` |optional| |
| 3233 | The name of the parent project. + |
| 3234 | If not set, the `All-Projects` project will be the parent project. |
| 3235 | |`description` |optional|The description of the project. |
| 3236 | |`permissions_only` |`false` if not set| |
| 3237 | Whether a permission-only project should be created. |
| 3238 | |`create_empty_commit` |`false` if not set| |
| 3239 | Whether an empty initial commit should be created. |
| 3240 | |`submit_type` |optional| |
| 3241 | The submit type that should be set for the project |
Gert van Dijk | a4e49d0 | 2017-08-27 22:50:40 +0200 | [diff] [blame] | 3242 | (`MERGE_IF_NECESSARY`, `REBASE_IF_NECESSARY`, `REBASE_ALWAYS`, |
| 3243 | `FAST_FORWARD_ONLY`, `MERGE_ALWAYS`, `CHERRY_PICK`). + |
Edwin Kempin | a79ea55 | 2013-11-19 11:24:37 +0100 | [diff] [blame] | 3244 | If not set, `MERGE_IF_NECESSARY` is set as submit type unless |
| 3245 | link:config-gerrit.html#repository.name.defaultSubmitType[ |
| 3246 | repository.<name>.defaultSubmitType] is set to a different value. |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 3247 | |`branches` |optional| |
| 3248 | A list of branches that should be initially created. + |
| 3249 | For the branch names the `refs/heads/` prefix can be omitted. |
| 3250 | |`owners` |optional| |
| 3251 | A list of groups that should be assigned as project owner. + |
| 3252 | Each group in the list must be specified as |
| 3253 | link:rest-api-groups.html#group-id[group-id]. + |
| 3254 | If not set, the link:config-gerrit.html#repository.name.ownerGroup[ |
| 3255 | groups that are configured as default owners] are set as project |
| 3256 | owners. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3257 | |`use_contributor_agreements` |`INHERIT` if not set| |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 3258 | Whether contributor agreements should be used for the project (`TRUE`, |
| 3259 | `FALSE`, `INHERIT`). |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3260 | |`use_signed_off_by` |`INHERIT` if not set| |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 3261 | Whether the usage of 'Signed-Off-By' footers is required for the |
| 3262 | project (`TRUE`, `FALSE`, `INHERIT`). |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3263 | |`create_new_change_for_all_not_in_target` |`INHERIT` if not set| |
| 3264 | Whether a new change is created for every commit not in target branch |
| 3265 | for the project (`TRUE`, `FALSE`, `INHERIT`). |
| 3266 | |`use_content_merge` |`INHERIT` if not set| |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 3267 | Whether content merge should be enabled for the project (`TRUE`, |
| 3268 | `FALSE`, `INHERIT`). + |
| 3269 | `FALSE`, if the `submit_type` is `FAST_FORWARD_ONLY`. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3270 | |`require_change_id` |`INHERIT` if not set| |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 3271 | Whether the usage of Change-Ids is required for the project (`TRUE`, |
| 3272 | `FALSE`, `INHERIT`). |
Sasa Zivkov | 6b40cb4 | 2013-07-01 15:28:22 +0200 | [diff] [blame] | 3273 | |`max_object_size_limit` |optional| |
| 3274 | Max allowed Git object size for this project. |
| 3275 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
Edwin Kempin | fb053c3 | 2013-12-04 20:32:41 +0100 | [diff] [blame] | 3276 | |`plugin_config_values` |optional| |
| 3277 | Plugin configuration values as map which maps the plugin name to a map |
| 3278 | of parameter names to values. |
Patrick Hiesel | dc285c7 | 2018-01-08 17:20:15 +0100 | [diff] [blame^] | 3279 | |`reject_empty_commit` |optional| |
| 3280 | Whether empty commits should be rejected when a change is merged |
| 3281 | (`TRUE`, `FALSE`, `INHERIT`). |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 3282 | |========================================= |
| 3283 | |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 3284 | [[project-parent-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3285 | === ProjectParentInput |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 3286 | The `ProjectParentInput` entity contains information for setting a |
| 3287 | project parent. |
| 3288 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3289 | [options="header",cols="1,^2,4"] |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 3290 | |============================= |
| 3291 | |Field Name ||Description |
| 3292 | |`parent` ||The name of the parent project. |
| 3293 | |`commit_message`|optional| |
| 3294 | Message that should be used to commit the change of the project parent |
| 3295 | in the `project.config` file to the `refs/meta/config` branch. |
| 3296 | |============================= |
| 3297 | |
Edwin Kempin | 87504d9 | 2014-07-04 12:59:19 +0200 | [diff] [blame] | 3298 | [[reflog-entry-info]] |
| 3299 | === ReflogEntryInfo |
| 3300 | The `ReflogEntryInfo` entity describes an entry in a reflog. |
| 3301 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3302 | [options="header",cols="1,6"] |
Edwin Kempin | 87504d9 | 2014-07-04 12:59:19 +0200 | [diff] [blame] | 3303 | |============================ |
| 3304 | |Field Name |Description |
| 3305 | |`old_id` |The old commit ID. |
| 3306 | |`new_id` |The new commit ID. |
| 3307 | |`who` | |
| 3308 | The user performing the change as a |
| 3309 | link:rest-api-changes.html#git-person-info[GitPersonInfo] entity. |
| 3310 | |`comment` |Comment of the reflog entry. |
| 3311 | |============================ |
| 3312 | |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 3313 | [[repository-statistics-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3314 | === RepositoryStatisticsInfo |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 3315 | The `RepositoryStatisticsInfo` entity contains information about |
| 3316 | statistics of a Git repository. |
| 3317 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3318 | [options="header",cols="1,6"] |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 3319 | |====================================== |
| 3320 | |Field Name |Description |
| 3321 | |`number_of_loose_objects` |Number of loose objects. |
| 3322 | |`number_of_loose_refs` |Number of loose refs. |
| 3323 | |`number_of_pack_files` |Number of pack files. |
| 3324 | |`number_of_packed_objects`|Number of packed objects. |
| 3325 | |`number_of_packed_refs` |Number of packed refs. |
| 3326 | |`size_of_loose_objects` |Size of loose objects in bytes. |
| 3327 | |`size_of_packed_objects` |Size of packed objects in bytes. |
| 3328 | |====================================== |
| 3329 | |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 3330 | [[tag-info]] |
| 3331 | === TagInfo |
| 3332 | The `TagInfo` entity contains information about a tag. |
| 3333 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3334 | [options="header",cols="1,^2,4"] |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 3335 | |========================= |
| 3336 | |Field Name ||Description |
| 3337 | |`ref` ||The ref of the tag. |
| 3338 | |`revision` ||For lightweight tags, the revision of the commit to which the tag |
| 3339 | points. For annotated tags, the revision of the tag object. |
| 3340 | |`object`|Only set for annotated tags.|The revision of the object to which the |
| 3341 | tag points. |
| 3342 | |`message`|Only set for annotated tags.|The tag message. For signed tags, includes |
| 3343 | the signature. |
David Pursehouse | c9f5a5a | 2015-12-07 19:13:16 +0900 | [diff] [blame] | 3344 | |`tagger`|Only set for annotated tags, if present in the tag.|The tagger as a |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 3345 | link:rest-api-changes.html#git-person-info[GitPersonInfo] entity. |
David Pursehouse | c4e4d93 | 2017-11-10 10:17:46 +0900 | [diff] [blame] | 3346 | |`created`|optional|The link:rest-api.html#timestamp[timestamp] of when the tag |
| 3347 | was created. For annotated and signed tags, this is the timestamp of the tag object |
| 3348 | and is the same as the `date` field in the `tagger`. For lightweight tags, it is |
| 3349 | the commit timestamp of the commit to which the tag points, when the object is a |
| 3350 | commit. It is not set when the object is any other type. |
David Pursehouse | d00515e | 2017-11-10 15:57:41 +0900 | [diff] [blame] | 3351 | |`can_delete`|not set if `false`| |
David Pursehouse | 23669da | 2017-02-23 13:43:57 +0900 | [diff] [blame] | 3352 | Whether the calling user can delete this tag. |
Paladox none | 34da15c | 2017-07-01 14:49:10 +0000 | [diff] [blame] | 3353 | |`web_links` |optional| |
| 3354 | Links to the tag in external sites as a list of |
| 3355 | link:rest-api-changes.html#web-link-info[WebLinkInfo] entries. |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 3356 | |========================= |
| 3357 | |
David Pursehouse | 6a44619 | 2016-06-03 10:00:34 +0900 | [diff] [blame] | 3358 | [[tag-input]] |
| 3359 | === TagInput |
| 3360 | |
| 3361 | The `TagInput` entity contains information for creating a tag. |
| 3362 | |
| 3363 | [options="header",cols="1,^2,4"] |
| 3364 | |========================= |
| 3365 | |Field Name ||Description |
| 3366 | |`ref` ||The name of the tag. The leading `refs/tags/` is optional. |
| 3367 | |`revision` |optional|The revision to which the tag should point. If not |
| 3368 | specified, the project's `HEAD` will be used. |
| 3369 | |`message` |optional|The tag message. When set, the tag will be created |
| 3370 | as an annotated tag. |
| 3371 | |========================= |
| 3372 | |
| 3373 | |
Edwin Kempin | 272402e | 2013-07-15 11:17:36 +0200 | [diff] [blame] | 3374 | [[theme-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3375 | === ThemeInfo |
Edwin Kempin | 272402e | 2013-07-15 11:17:36 +0200 | [diff] [blame] | 3376 | The `ThemeInfo` entity describes a theme. |
| 3377 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3378 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 272402e | 2013-07-15 11:17:36 +0200 | [diff] [blame] | 3379 | |============================= |
| 3380 | |Field Name ||Description |
| 3381 | |`css` |optional| |
| 3382 | The path to the `GerritSite.css` file. |
| 3383 | |`header` |optional| |
| 3384 | The path to the `GerritSiteHeader.html` file. |
| 3385 | |`footer` |optional| |
| 3386 | The path to the `GerritSiteFooter.html` file. |
| 3387 | |============================= |
| 3388 | |
Patrick Hiesel | 5a3475f | 2016-04-21 11:44:29 +0200 | [diff] [blame] | 3389 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 3390 | |
| 3391 | GERRIT |
| 3392 | ------ |
| 3393 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 3394 | |
| 3395 | SEARCHBOX |
| 3396 | --------- |