Marian Harbach | ebeb154 | 2019-12-13 10:42:46 +0100 | [diff] [blame] | 1 | :linkattrs: |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2 | = Gerrit Code Review - /projects/ REST API |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 3 | |
| 4 | This page describes the project related REST endpoints. |
| 5 | Please also take note of the general information on the |
| 6 | link:rest-api.html[REST API]. |
| 7 | |
Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 8 | [[project-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 9 | == Project Endpoints |
Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 10 | |
Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 11 | [[list-projects]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 12 | === List Projects |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 13 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 14 | 'GET /projects/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 15 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 16 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 17 | Lists the projects accessible by the caller. This is the same as |
| 18 | using the link:cmd-ls-projects.html[ls-projects] command over SSH, |
| 19 | and accepts the same options as query parameters. |
| 20 | |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 21 | As result a map is returned that maps the project names to |
| 22 | link:#project-info[ProjectInfo] entries. The entries in the map are sorted |
| 23 | by project name. |
| 24 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 25 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 26 | ---- |
| 27 | GET /projects/?d HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 28 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 29 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 30 | .Response |
| 31 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 32 | HTTP/1.1 200 OK |
| 33 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 34 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 35 | |
| 36 | )]}' |
| 37 | { |
| 38 | "external/bison": { |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 39 | "id": "external%2Fbison", |
| 40 | "description": "GNU parser generator" |
| 41 | }, |
| 42 | "external/gcc": { |
Edwin Kempin | 068511b | 2015-01-20 09:17:12 +0100 | [diff] [blame] | 43 | "id": "external%2Fgcc" |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 44 | }, |
| 45 | "external/openssl": { |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 46 | "id": "external%2Fopenssl", |
| 47 | "description": "encryption\ncrypto routines" |
| 48 | }, |
| 49 | "test": { |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 50 | "id": "test", |
| 51 | "description": "\u003chtml\u003e is escaped" |
| 52 | } |
| 53 | } |
| 54 | ---- |
| 55 | |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 56 | [[project-options]] |
| 57 | ==== Project Options |
| 58 | |
| 59 | Branch(b):: |
| 60 | Limit the results to the projects having the specified branch and |
| 61 | include the sha1 of the branch in the results. |
| 62 | + |
| 63 | Get projects that have a 'master' branch: |
| 64 | + |
| 65 | .Request |
| 66 | ---- |
| 67 | GET /projects/?b=master HTTP/1.0 |
| 68 | ---- |
| 69 | + |
| 70 | .Response |
| 71 | ---- |
| 72 | HTTP/1.1 200 OK |
| 73 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 74 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 75 | |
| 76 | )]}' |
| 77 | { |
| 78 | "some-project": { |
| 79 | "id": "some-project", |
| 80 | "branches": { |
| 81 | "master": "c5ed9dfcbf002ca0e432d788dab6ca2387829ca7" |
| 82 | } |
| 83 | }, |
| 84 | "some-other-project": { |
| 85 | "id": "some-other-project", |
| 86 | "branches": { |
| 87 | "master": "ef1c270142f9581ecf768f4193fc8f8a81102ec2" |
| 88 | } |
| 89 | }, |
| 90 | } |
| 91 | ---- |
| 92 | |
| 93 | Description(d):: |
| 94 | Include project description in the results. |
| 95 | + |
| 96 | Get all the projects with their description: |
| 97 | + |
| 98 | .Request |
| 99 | ---- |
| 100 | GET /projects/?d HTTP/1.0 |
| 101 | ---- |
| 102 | + |
| 103 | .Response |
| 104 | ---- |
| 105 | HTTP/1.1 200 OK |
| 106 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 107 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 108 | |
| 109 | )]}' |
| 110 | { |
| 111 | "some-project": { |
| 112 | "id": "some-project", |
| 113 | "description": "Description of some project." |
| 114 | }, |
| 115 | "some-other-project": { |
| 116 | "id": "some-other-project", |
| 117 | "description": "Description of some other project." |
| 118 | } |
| 119 | }, |
| 120 | } |
| 121 | ---- |
| 122 | |
| 123 | Limit(n):: |
| 124 | Limit the number of projects to be included in the results. |
| 125 | + |
| 126 | Query the first project in the project list: |
| 127 | + |
| 128 | .Request |
| 129 | ---- |
| 130 | GET /projects/?n=1 HTTP/1.0 |
| 131 | ---- |
| 132 | + |
| 133 | .Response |
| 134 | ---- |
| 135 | HTTP/1.1 200 OK |
| 136 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 137 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 138 | |
| 139 | )]}' |
| 140 | { |
| 141 | "some-project": { |
| 142 | "id": "some-project" |
| 143 | } |
| 144 | } |
| 145 | ---- |
| 146 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 147 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 148 | [[suggest-projects]] |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 149 | Prefix(p):: |
| 150 | Limit the results to those projects that start with the specified |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 151 | prefix. |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 152 | + |
David Pursehouse | 0c2e4b8 | 2017-07-13 10:28:37 +0900 | [diff] [blame] | 153 | The match is case sensitive. May not be used together with `m` or `r`. |
| 154 | + |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 155 | List all projects that start with `platform/`: |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 156 | + |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 157 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 158 | ---- |
| 159 | GET /projects/?p=platform%2F HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 160 | ---- |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 161 | + |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 162 | .Response |
| 163 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 164 | HTTP/1.1 200 OK |
| 165 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 166 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 167 | |
| 168 | )]}' |
| 169 | { |
| 170 | "platform/drivers": { |
Edwin Kempin | 068511b | 2015-01-20 09:17:12 +0100 | [diff] [blame] | 171 | "id": "platform%2Fdrivers" |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 172 | }, |
| 173 | "platform/tools": { |
Edwin Kempin | 068511b | 2015-01-20 09:17:12 +0100 | [diff] [blame] | 174 | "id": "platform%2Ftools" |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 175 | } |
| 176 | } |
| 177 | ---- |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 178 | + |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 179 | E.g. this feature can be used by suggestion client UI's to limit results. |
| 180 | |
Hugo Arès | b8aae41 | 2014-07-08 11:04:43 -0400 | [diff] [blame] | 181 | Regex(r):: |
| 182 | Limit the results to those projects that match the specified regex. |
| 183 | + |
| 184 | Boundary matchers '^' and '$' are implicit. For example: the regex 'test.*' will |
| 185 | match any projects that start with 'test' and regex '.*test' will match any |
| 186 | project that end with 'test'. |
| 187 | + |
David Pursehouse | 0c2e4b8 | 2017-07-13 10:28:37 +0900 | [diff] [blame] | 188 | The match is case sensitive. May not be used together with `m` or `p`. |
| 189 | + |
Hugo Arès | b8aae41 | 2014-07-08 11:04:43 -0400 | [diff] [blame] | 190 | List all projects that match regex `test.*project`: |
| 191 | + |
| 192 | .Request |
| 193 | ---- |
| 194 | GET /projects/?r=test.*project HTTP/1.0 |
| 195 | ---- |
| 196 | + |
| 197 | .Response |
| 198 | ---- |
| 199 | HTTP/1.1 200 OK |
| 200 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 201 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | b8aae41 | 2014-07-08 11:04:43 -0400 | [diff] [blame] | 202 | |
| 203 | )]}' |
| 204 | { |
| 205 | "test/some-project": { |
Edwin Kempin | 068511b | 2015-01-20 09:17:12 +0100 | [diff] [blame] | 206 | "id": "test%2Fsome-project" |
Hugo Arès | b8aae41 | 2014-07-08 11:04:43 -0400 | [diff] [blame] | 207 | }, |
| 208 | "test/some-other-project": { |
Edwin Kempin | 068511b | 2015-01-20 09:17:12 +0100 | [diff] [blame] | 209 | "id": "test%2Fsome-other-project" |
Hugo Arès | b8aae41 | 2014-07-08 11:04:43 -0400 | [diff] [blame] | 210 | } |
| 211 | } |
| 212 | |
| 213 | ---- |
| 214 | |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 215 | Skip(S):: |
| 216 | Skip the given number of projects from the beginning of the list. |
| 217 | + |
| 218 | Query the second project in the project list: |
| 219 | + |
| 220 | .Request |
Anthony Chin | 5f44cc5 | 2014-03-12 10:37:10 -0400 | [diff] [blame] | 221 | ---- |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 222 | GET /projects/?n=1&S=1 HTTP/1.0 |
| 223 | ---- |
| 224 | + |
| 225 | .Response |
| 226 | ---- |
| 227 | HTTP/1.1 200 OK |
| 228 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 229 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 230 | |
| 231 | )]}' |
| 232 | { |
| 233 | "some-other-project": { |
| 234 | "id": "some-other-project" |
| 235 | } |
| 236 | } |
Anthony Chin | 5f44cc5 | 2014-03-12 10:37:10 -0400 | [diff] [blame] | 237 | ---- |
| 238 | |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 239 | Substring(m):: |
| 240 | Limit the results to those projects that match the specified substring. |
| 241 | + |
David Pursehouse | 0c2e4b8 | 2017-07-13 10:28:37 +0900 | [diff] [blame] | 242 | The match is case insensitive. May not be used together with `r` or `p`. |
| 243 | + |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 244 | List all projects that match substring `test/`: |
| 245 | + |
| 246 | .Request |
Anthony Chin | 5f44cc5 | 2014-03-12 10:37:10 -0400 | [diff] [blame] | 247 | ---- |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 248 | GET /projects/?m=test%2F HTTP/1.0 |
| 249 | ---- |
| 250 | + |
| 251 | .Response |
| 252 | ---- |
| 253 | HTTP/1.1 200 OK |
| 254 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 255 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 256 | |
| 257 | )]}' |
| 258 | { |
| 259 | "test/some-project": { |
Edwin Kempin | 068511b | 2015-01-20 09:17:12 +0100 | [diff] [blame] | 260 | "id": "test%2Fsome-project" |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 261 | }, |
| 262 | "some-path/test/some-other-project": { |
Edwin Kempin | 068511b | 2015-01-20 09:17:12 +0100 | [diff] [blame] | 263 | "id": "some-path%2Ftest%2Fsome-other-project" |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 264 | } |
| 265 | } |
| 266 | ---- |
| 267 | |
| 268 | Tree(t):: |
| 269 | Get projects inheritance in a tree-like format. This option does |
| 270 | not work together with the branch option. |
| 271 | + |
| 272 | Get all the projects with tree option: |
| 273 | + |
| 274 | .Request |
| 275 | ---- |
| 276 | GET /projects/?t HTTP/1.0 |
| 277 | ---- |
| 278 | + |
| 279 | .Response |
| 280 | ---- |
| 281 | HTTP/1.1 200 OK |
| 282 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 283 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 284 | |
| 285 | )]}' |
| 286 | { |
| 287 | "All-Projects" { |
| 288 | "id": "All-Projects" |
| 289 | }, |
| 290 | "child-project": { |
| 291 | "id": "child-project", |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 292 | "parent": "parent-project" |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 293 | }, |
| 294 | "parent-project": { |
| 295 | "id": "parent-project", |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 296 | "parent": "All-Projects" |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 297 | } |
| 298 | } |
| 299 | ---- |
| 300 | |
| 301 | Type(type):: |
| 302 | Get projects with specified type: ALL, CODE, PERMISSIONS. |
| 303 | + |
| 304 | Get all the projects of type 'PERMISSIONS': |
| 305 | + |
| 306 | .Request |
| 307 | ---- |
| 308 | GET /projects/?type=PERMISSIONS HTTP/1.0 |
| 309 | ---- |
| 310 | + |
| 311 | .Response |
| 312 | ---- |
| 313 | HTTP/1.1 200 OK |
| 314 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 315 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | bdd7f68 | 2014-07-08 10:57:52 -0400 | [diff] [blame] | 316 | |
| 317 | )]}' |
| 318 | { |
| 319 | "All-Projects" { |
| 320 | "id": "All-Projects" |
| 321 | }, |
| 322 | "some-parent-project": { |
| 323 | "id": "some-parent-project" |
| 324 | } |
| 325 | } |
Anthony Chin | 5f44cc5 | 2014-03-12 10:37:10 -0400 | [diff] [blame] | 326 | ---- |
| 327 | |
David Pursehouse | c141bd3 | 2017-11-15 21:42:14 +0900 | [diff] [blame] | 328 | All:: |
David Pursehouse | 5450876 | 2017-11-28 13:37:48 +0900 | [diff] [blame] | 329 | Get all projects, including those whose state is "HIDDEN". May not be used |
| 330 | together with the `state` option. |
David Pursehouse | c141bd3 | 2017-11-15 21:42:14 +0900 | [diff] [blame] | 331 | + |
| 332 | .Request |
| 333 | ---- |
| 334 | GET /projects/?all HTTP/1.0 |
| 335 | ---- |
| 336 | + |
| 337 | .Response |
| 338 | ---- |
| 339 | HTTP/1.1 200 OK |
| 340 | Content-Disposition: attachment |
| 341 | Content-Type: application/json; charset=UTF-8 |
| 342 | |
| 343 | )]}' |
| 344 | { |
| 345 | "All-Projects" { |
| 346 | "id": "All-Projects", |
| 347 | "state": "ACTIVE" |
| 348 | }, |
| 349 | "some-other-project": { |
| 350 | "id": "some-other-project", |
| 351 | "state": "HIDDEN" |
| 352 | } |
| 353 | } |
| 354 | ---- |
| 355 | |
David Pursehouse | 5450876 | 2017-11-28 13:37:48 +0900 | [diff] [blame] | 356 | State(s):: |
| 357 | Get all projects with the given state. May not be used together with the |
| 358 | `all` option. |
| 359 | + |
| 360 | .Request |
| 361 | ---- |
| 362 | GET /projects/?state=HIDDEN HTTP/1.0 |
| 363 | ---- |
| 364 | + |
| 365 | .Response |
| 366 | ---- |
| 367 | HTTP/1.1 200 OK |
| 368 | Content-Disposition: attachment |
| 369 | Content-Type: application/json; charset=UTF-8 |
| 370 | |
| 371 | )]}' |
| 372 | { |
| 373 | "some-other-project": { |
| 374 | "id": "some-other-project", |
| 375 | "state": "HIDDEN" |
| 376 | } |
| 377 | } |
| 378 | ---- |
| 379 | |
Xin Sun | d8dd153 | 2017-07-18 17:13:52 -0700 | [diff] [blame] | 380 | [[query-projects]] |
| 381 | === Query Projects |
| 382 | -- |
| 383 | 'GET /projects/?query=<query>' |
| 384 | -- |
| 385 | |
| 386 | Queries projects visible to the caller. The |
| 387 | link:user-search-projects.html#_search_operators[query string] must be |
| 388 | provided by the `query` parameter. The `start` and `limit` parameters |
| 389 | can be used to skip/limit results. |
| 390 | |
| 391 | As result a list of link:#project-info[ProjectInfo] entities is returned. |
| 392 | |
| 393 | .Request |
| 394 | ---- |
| 395 | GET /projects/?query=name:test HTTP/1.0 |
| 396 | ---- |
| 397 | |
| 398 | .Response |
| 399 | ---- |
| 400 | HTTP/1.1 200 OK |
| 401 | Content-Disposition: attachment |
| 402 | Content-Type: application/json; charset=UTF-8 |
| 403 | |
| 404 | )]}' |
| 405 | { |
| 406 | "test": { |
| 407 | "id": "test", |
| 408 | "description": "\u003chtml\u003e is escaped" |
| 409 | } |
| 410 | } |
| 411 | ---- |
| 412 | |
| 413 | [[project-query-limit]] |
| 414 | ==== Project Limit |
| 415 | The `/projects/?query=<query>` URL also accepts a limit integer in the |
| 416 | `limit` parameter. This limits the results to `limit` projects. |
| 417 | |
| 418 | Query the first 25 projects in project list. |
| 419 | ---- |
| 420 | GET /projects/?query=<query>&limit=25 HTTP/1.0 |
| 421 | ---- |
| 422 | |
| 423 | The `/projects/` URL also accepts a start integer in the `start` |
| 424 | parameter. The results will skip `start` groups from project list. |
| 425 | |
| 426 | Query 25 projects starting from index 50. |
| 427 | ---- |
| 428 | GET /groups/?query=<query>&limit=25&start=50 HTTP/1.0 |
| 429 | ---- |
| 430 | |
| 431 | [[project-query-options]] |
| 432 | ==== Project Options |
| 433 | Additional fields can be obtained by adding `o` parameters. Each option |
| 434 | requires more lookups and slows down the query response time to the |
| 435 | client so they are generally disabled by default. The supported fields |
| 436 | are described in the context of the link:#project-options[List Projects] |
| 437 | REST endpoint. |
| 438 | |
Edwin Kempin | 5c544e2 | 2013-03-06 13:35:45 +0100 | [diff] [blame] | 439 | [[get-project]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 440 | === Get Project |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 441 | -- |
Edwin Kempin | 5c544e2 | 2013-03-06 13:35:45 +0100 | [diff] [blame] | 442 | 'GET /projects/link:#project-name[\{project-name\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 443 | -- |
Edwin Kempin | 5c544e2 | 2013-03-06 13:35:45 +0100 | [diff] [blame] | 444 | |
| 445 | Retrieves a project. |
| 446 | |
| 447 | .Request |
| 448 | ---- |
| 449 | GET /projects/plugins%2Freplication HTTP/1.0 |
| 450 | ---- |
| 451 | |
| 452 | As response a link:#project-info[ProjectInfo] entity is returned that |
| 453 | describes the project. |
| 454 | |
| 455 | .Response |
| 456 | ---- |
| 457 | HTTP/1.1 200 OK |
| 458 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 459 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 5c544e2 | 2013-03-06 13:35:45 +0100 | [diff] [blame] | 460 | |
| 461 | )]}' |
| 462 | { |
Edwin Kempin | 5c544e2 | 2013-03-06 13:35:45 +0100 | [diff] [blame] | 463 | "id": "plugins%2Freplication", |
| 464 | "name": "plugins/replication", |
| 465 | "parent": "Public-Plugins", |
Shawn Pearce | 21a6c21 | 2014-04-23 12:35:10 -0700 | [diff] [blame] | 466 | "description": "Copies to other servers using the Git protocol", |
Han-Wen Nienhuys | 22f2774 | 2017-06-27 18:01:07 +0200 | [diff] [blame] | 467 | "state": "ACTIVE", |
| 468 | "labels": { |
| 469 | "Code-Review": { |
| 470 | "values": { |
| 471 | " 0": "No score", |
| 472 | "+1": "Approved" |
| 473 | }, |
| 474 | "default_value": 0 |
| 475 | } |
| 476 | } |
Edwin Kempin | 5c544e2 | 2013-03-06 13:35:45 +0100 | [diff] [blame] | 477 | } |
| 478 | ---- |
| 479 | |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 480 | [[create-project]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 481 | === Create Project |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 482 | -- |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 483 | 'PUT /projects/link:#project-name[\{project-name\}]' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 484 | -- |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 485 | |
| 486 | Creates a new project. |
| 487 | |
| 488 | In the request body additional data for the project can be provided as |
| 489 | link:#project-input[ProjectInput]. |
| 490 | |
| 491 | .Request |
| 492 | ---- |
| 493 | PUT /projects/MyProject HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 494 | Content-Type: application/json; charset=UTF-8 |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 495 | |
| 496 | { |
| 497 | "description": "This is a demo project.", |
Dave Borowitz | c8f8d2e | 2017-10-23 11:18:23 -0400 | [diff] [blame] | 498 | "submit_type": "INHERIT", |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 499 | "owners": [ |
| 500 | "MyProject-Owners" |
| 501 | ] |
| 502 | } |
| 503 | ---- |
| 504 | |
| 505 | As response the link:#project-info[ProjectInfo] entity is returned that |
| 506 | describes the created project. |
| 507 | |
| 508 | .Response |
| 509 | ---- |
| 510 | HTTP/1.1 201 Created |
| 511 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 512 | Content-Type: application/json; charset=UTF-8 |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 513 | |
| 514 | )]}' |
| 515 | { |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 516 | "id": "MyProject", |
| 517 | "name": "MyProject", |
| 518 | "parent": "All-Projects", |
Han-Wen Nienhuys | 22f2774 | 2017-06-27 18:01:07 +0200 | [diff] [blame] | 519 | "description": "This is a demo project.", |
| 520 | "labels": { |
| 521 | "Code-Review": { |
| 522 | "values": { |
| 523 | " 0": "No score", |
| 524 | "+1": "Approved" |
| 525 | }, |
| 526 | "default_value": 0 |
| 527 | } |
| 528 | } |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 529 | } |
| 530 | ---- |
| 531 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 532 | [[get-project-description]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 533 | === Get Project Description |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 534 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 535 | 'GET /projects/link:#project-name[\{project-name\}]/description' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 536 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 537 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 538 | Retrieves the description of a project. |
| 539 | |
| 540 | .Request |
| 541 | ---- |
| 542 | GET /projects/plugins%2Freplication/description HTTP/1.0 |
| 543 | ---- |
| 544 | |
| 545 | .Response |
| 546 | ---- |
| 547 | HTTP/1.1 200 OK |
| 548 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 549 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 550 | |
| 551 | )]}' |
| 552 | "Copies to other servers using the Git protocol" |
| 553 | ---- |
| 554 | |
Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 555 | If the project does not have a description an empty string is returned. |
| 556 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 557 | [[set-project-description]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 558 | === Set Project Description |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 559 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 560 | 'PUT /projects/link:#project-name[\{project-name\}]/description' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 561 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 562 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 563 | Sets the description of a project. |
| 564 | |
| 565 | The new project description must be provided in the request body inside |
| 566 | a link:#project-description-input[ProjectDescriptionInput] entity. |
| 567 | |
| 568 | .Request |
| 569 | ---- |
| 570 | PUT /projects/plugins%2Freplication/description HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 571 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 572 | |
| 573 | { |
| 574 | "description": "Plugin for Gerrit that handles the replication.", |
| 575 | "commit_message": "Update the project description" |
| 576 | } |
| 577 | ---- |
| 578 | |
| 579 | As response the new project description is returned. |
| 580 | |
| 581 | .Response |
| 582 | ---- |
| 583 | HTTP/1.1 200 OK |
| 584 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 585 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 586 | |
| 587 | )]}' |
| 588 | "Plugin for Gerrit that handles the replication." |
| 589 | ---- |
| 590 | |
Edwin Kempin | 114ab16 | 2013-02-28 09:25:37 +0100 | [diff] [blame] | 591 | If the description was deleted the response is "`204 No Content`". |
| 592 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 593 | [[delete-project-description]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 594 | === Delete Project Description |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 595 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 596 | 'DELETE /projects/link:#project-name[\{project-name\}]/description' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 597 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 598 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 599 | Deletes the description of a project. |
| 600 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 601 | .Request |
| 602 | ---- |
| 603 | DELETE /projects/plugins%2Freplication/description HTTP/1.0 |
| 604 | ---- |
| 605 | |
| 606 | .Response |
| 607 | ---- |
| 608 | HTTP/1.1 204 No Content |
| 609 | ---- |
| 610 | |
Changcheng Xiao | 03fc3cc | 2018-07-23 11:16:53 +0200 | [diff] [blame] | 611 | A commit message can be provided in the request body as a |
| 612 | link:#project-description-input[ProjectDescriptionInput] entity. |
| 613 | Historically, this method allowed a body in the DELETE, but that behavior is |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 614 | link:https://www.gerritcodereview.com/releases/2.16.md[deprecated,role=external,window=_blank]. |
Changcheng Xiao | 03fc3cc | 2018-07-23 11:16:53 +0200 | [diff] [blame] | 615 | In this case, use link:#set-project-description[PUT] instead. |
| 616 | |
| 617 | .Request |
| 618 | ---- |
| 619 | PUT /projects/plugins%2Freplication/description HTTP/1.0 |
| 620 | Content-Type: application/json; charset=UTF-8 |
| 621 | |
| 622 | { |
| 623 | "commit_message": "Update the project description" |
| 624 | } |
| 625 | ---- |
| 626 | |
| 627 | .Response |
| 628 | ---- |
| 629 | HTTP/1.1 204 No Content |
| 630 | ---- |
| 631 | |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 632 | [[get-project-parent]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 633 | === Get Project Parent |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 634 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 635 | 'GET /projects/link:#project-name[\{project-name\}]/parent' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 636 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 637 | |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 638 | Retrieves the name of a project's parent project. For the |
| 639 | `All-Projects` root project an empty string is returned. |
| 640 | |
| 641 | .Request |
| 642 | ---- |
| 643 | GET /projects/plugins%2Freplication/parent HTTP/1.0 |
| 644 | ---- |
| 645 | |
| 646 | .Response |
| 647 | ---- |
| 648 | HTTP/1.1 200 OK |
| 649 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 650 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 651 | |
| 652 | )]}' |
| 653 | "All-Projects" |
| 654 | ---- |
| 655 | |
| 656 | [[set-project-parent]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 657 | === Set Project Parent |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 658 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 659 | 'PUT /projects/link:#project-name[\{project-name\}]/parent' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 660 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 661 | |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 662 | Sets the parent project for a project. |
| 663 | |
| 664 | The new name of the parent project must be provided in the request body |
| 665 | inside a link:#project-parent-input[ProjectParentInput] entity. |
| 666 | |
| 667 | .Request |
| 668 | ---- |
| 669 | PUT /projects/plugins%2Freplication/parent HTTP/1.0 |
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 | "parent": "Public-Plugins", |
| 674 | "commit_message": "Update the project parent" |
| 675 | } |
| 676 | ---- |
| 677 | |
| 678 | As response the new parent project name is returned. |
| 679 | |
| 680 | .Response |
| 681 | ---- |
| 682 | HTTP/1.1 200 OK |
| 683 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 684 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 685 | |
| 686 | )]}' |
| 687 | "Public-Plugins" |
| 688 | ---- |
| 689 | |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 690 | [[get-head]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 691 | === Get HEAD |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 692 | -- |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 693 | 'GET /projects/link:#project-name[\{project-name\}]/HEAD' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 694 | -- |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 695 | |
| 696 | Retrieves for a project the name of the branch to which `HEAD` points. |
| 697 | |
| 698 | .Request |
| 699 | ---- |
| 700 | GET /projects/plugins%2Freplication/HEAD HTTP/1.0 |
| 701 | ---- |
| 702 | |
| 703 | .Response |
| 704 | ---- |
| 705 | HTTP/1.1 200 OK |
| 706 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 707 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 708 | |
| 709 | )]}' |
| 710 | "refs/heads/master" |
| 711 | ---- |
| 712 | |
| 713 | [[set-head]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 714 | === Set HEAD |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 715 | -- |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 716 | 'PUT /projects/link:#project-name[\{project-name\}]/HEAD' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 717 | -- |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 718 | |
| 719 | Sets `HEAD` for a project. |
| 720 | |
| 721 | The new ref to which `HEAD` should point must be provided in the |
| 722 | request body inside a link:#head-input[HeadInput] entity. |
| 723 | |
| 724 | .Request |
| 725 | ---- |
| 726 | PUT /projects/plugins%2Freplication/HEAD HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 727 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 728 | |
| 729 | { |
| 730 | "ref": "refs/heads/stable" |
| 731 | } |
| 732 | ---- |
| 733 | |
| 734 | As response the new ref to which `HEAD` points is returned. |
| 735 | |
| 736 | .Response |
| 737 | ---- |
| 738 | HTTP/1.1 200 OK |
| 739 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 740 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 741 | |
| 742 | )]}' |
| 743 | "refs/heads/stable" |
| 744 | ---- |
| 745 | |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 746 | [[get-repository-statistics]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 747 | === Get Repository Statistics |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 748 | -- |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 749 | 'GET /projects/link:#project-name[\{project-name\}]/statistics.git' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 750 | -- |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 751 | |
| 752 | Return statistics for the repository of a project. |
| 753 | |
| 754 | .Request |
| 755 | ---- |
| 756 | GET /projects/plugins%2Freplication/statistics.git HTTP/1.0 |
| 757 | ---- |
| 758 | |
| 759 | The repository statistics are returned as a |
| 760 | link:#repository-statistics-info[RepositoryStatisticsInfo] entity. |
| 761 | |
| 762 | .Response |
| 763 | ---- |
| 764 | HTTP/1.1 200 OK |
| 765 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 766 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 767 | |
| 768 | )]}' |
| 769 | { |
| 770 | "number_of_loose_objects": 127, |
| 771 | "number_of_loose_refs": 15, |
| 772 | "number_of_pack_files": 15, |
| 773 | "number_of_packed_objects": 67, |
| 774 | "number_of_packed_refs": 0, |
| 775 | "size_of_loose_objects": 29466, |
| 776 | "size_of_packed_objects": 9646 |
| 777 | } |
| 778 | ---- |
| 779 | |
Dave Borowitz | 237073a | 2013-04-04 16:52:27 -0700 | [diff] [blame] | 780 | [[get-config]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 781 | === Get Config |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 782 | -- |
Dave Borowitz | 237073a | 2013-04-04 16:52:27 -0700 | [diff] [blame] | 783 | 'GET /projects/link:#project-name[\{project-name\}]/config' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 784 | -- |
Dave Borowitz | 237073a | 2013-04-04 16:52:27 -0700 | [diff] [blame] | 785 | |
| 786 | Gets some configuration information about a project. Note that this |
| 787 | config info is not simply the contents of `project.config`; it generally |
| 788 | contains fields that may have been inherited from parent projects. |
| 789 | |
| 790 | .Request |
| 791 | ---- |
| 792 | GET /projects/myproject/config |
| 793 | ---- |
| 794 | |
| 795 | A link:#config-info[ConfigInfo] entity is returned that describes the |
| 796 | project configuration. Some fields are only visible to users that have |
| 797 | read access to `refs/meta/config`. |
| 798 | |
| 799 | .Response |
| 800 | ---- |
| 801 | HTTP/1.1 200 OK |
| 802 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 803 | Content-Type: application/json; charset=UTF-8 |
Dave Borowitz | 237073a | 2013-04-04 16:52:27 -0700 | [diff] [blame] | 804 | |
| 805 | )]}' |
| 806 | { |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 807 | "description": "demo project", |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 808 | "use_contributor_agreements": { |
| 809 | "value": true, |
| 810 | "configured_value": "TRUE", |
| 811 | "inherited_value": false |
| 812 | }, |
| 813 | "use_content_merge": { |
| 814 | "value": true, |
| 815 | "configured_value": "INHERIT", |
| 816 | "inherited_value": true |
| 817 | }, |
| 818 | "use_signed_off_by": { |
| 819 | "value": false, |
| 820 | "configured_value": "INHERIT", |
| 821 | "inherited_value": false |
| 822 | }, |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 823 | "create_new_change_for_all_not_in_target": { |
| 824 | "value": false, |
| 825 | "configured_value": "INHERIT", |
| 826 | "inherited_value": false |
| 827 | }, |
Han-Wen Nienhuys | cdde7a30 | 2019-07-24 12:19:16 +0200 | [diff] [blame] | 828 | "require_change_id": { |
| 829 | "value": false, |
| 830 | "configured_value": "FALSE", |
| 831 | "inherited_value": true |
| 832 | }, |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 833 | "max_object_size_limit": { |
| 834 | "value": "15m", |
| 835 | "configured_value": "15m", |
| 836 | "inherited_value": "20m" |
| 837 | }, |
Dave Borowitz | c8f8d2e | 2017-10-23 11:18:23 -0400 | [diff] [blame] | 838 | "submit_type": "INHERIT", |
| 839 | "default_submit_type": { |
| 840 | "value": "MERGE_IF_NECESSARY", |
| 841 | "configured_value": "INHERIT", |
| 842 | "inherited_value": "MERGE_IF_NECESSARY" |
| 843 | }, |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 844 | "state": "ACTIVE", |
David Ostrovsky | 9e8b2fb | 2013-08-30 08:09:53 +0200 | [diff] [blame] | 845 | "commentlinks": {}, |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 846 | "plugin_config": { |
| 847 | "helloworld": { |
| 848 | "language": { |
| 849 | "display_name": "Preferred Language", |
| 850 | "type": "STRING", |
| 851 | "value": "en" |
| 852 | } |
| 853 | } |
| 854 | }, |
David Ostrovsky | 9e8b2fb | 2013-08-30 08:09:53 +0200 | [diff] [blame] | 855 | "actions": { |
| 856 | "cookbook~hello-project": { |
| 857 | "method": "POST", |
| 858 | "label": "Say hello", |
| 859 | "title": "Say hello in different languages", |
| 860 | "enabled": true |
| 861 | } |
| 862 | } |
Dave Borowitz | 237073a | 2013-04-04 16:52:27 -0700 | [diff] [blame] | 863 | } |
| 864 | ---- |
| 865 | |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 866 | [[set-config]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 867 | === Set Config |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 868 | -- |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 869 | 'PUT /projects/link:#project-name[\{project-name\}]/config' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 870 | -- |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 871 | |
| 872 | Sets the configuration of a project. |
| 873 | |
| 874 | The new configuration must be provided in the request body as a |
| 875 | link:#config-input[ConfigInput] entity. |
| 876 | |
| 877 | .Request |
| 878 | ---- |
| 879 | PUT /projects/myproject/config HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 880 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 881 | |
| 882 | { |
| 883 | "description": "demo project", |
| 884 | "use_contributor_agreements": "FALSE", |
| 885 | "use_content_merge": "INHERIT", |
| 886 | "use_signed_off_by": "INHERIT", |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 887 | "create_new_change_for_all_not_in_target": "INHERIT", |
Dave Borowitz | 5170e0f | 2015-06-18 21:05:29 -0400 | [diff] [blame] | 888 | "enable_signed_push": "INHERIT", |
Dave Borowitz | 0543c73 | 2015-10-20 10:35:26 -0400 | [diff] [blame] | 889 | "require_signed_push": "INHERIT", |
Saša Živkov | 225b7a7 | 2015-11-17 17:37:43 +0100 | [diff] [blame] | 890 | "reject_implicit_merges": "INHERIT", |
Han-Wen Nienhuys | cdde7a30 | 2019-07-24 12:19:16 +0200 | [diff] [blame] | 891 | "require_change_id": "TRUE", |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 892 | "max_object_size_limit": "10m", |
| 893 | "submit_type": "REBASE_IF_NECESSARY", |
| 894 | "state": "ACTIVE" |
| 895 | } |
| 896 | ---- |
| 897 | |
| 898 | As response the new configuration is returned as a link:#config-info[ |
| 899 | ConfigInfo] entity. |
| 900 | |
| 901 | .Response |
| 902 | ---- |
| 903 | HTTP/1.1 200 OK |
| 904 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 905 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 906 | |
| 907 | )]}' |
| 908 | { |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 909 | "use_contributor_agreements": { |
| 910 | "value": false, |
| 911 | "configured_value": "FALSE", |
| 912 | "inherited_value": false |
| 913 | }, |
| 914 | "use_content_merge": { |
| 915 | "value": true, |
| 916 | "configured_value": "INHERIT", |
| 917 | "inherited_value": true |
| 918 | }, |
| 919 | "use_signed_off_by": { |
| 920 | "value": false, |
| 921 | "configured_value": "INHERIT", |
| 922 | "inherited_value": false |
| 923 | }, |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 924 | "create_new_change_for_all_not_in_target": { |
| 925 | "value": true, |
| 926 | "configured_value": "INHERIT", |
| 927 | "inherited_value": false |
| 928 | }, |
Han-Wen Nienhuys | cdde7a30 | 2019-07-24 12:19:16 +0200 | [diff] [blame] | 929 | "require_change_id": { |
| 930 | "value": true, |
| 931 | "configured_value": "TRUE", |
| 932 | "inherited_value": true |
| 933 | }, |
Dave Borowitz | 5170e0f | 2015-06-18 21:05:29 -0400 | [diff] [blame] | 934 | "enable_signed_push": { |
| 935 | "value": true, |
| 936 | "configured_value": "INHERIT", |
| 937 | "inherited_value": false |
| 938 | }, |
Dave Borowitz | 0543c73 | 2015-10-20 10:35:26 -0400 | [diff] [blame] | 939 | "require_signed_push": { |
| 940 | "value": false, |
| 941 | "configured_value": "INHERIT", |
| 942 | "inherited_value": false |
| 943 | }, |
Saša Živkov | 225b7a7 | 2015-11-17 17:37:43 +0100 | [diff] [blame] | 944 | "reject_implicit_merges": { |
| 945 | "value": false, |
| 946 | "configured_value": "INHERIT", |
| 947 | "inherited_value": false |
| 948 | }, |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 949 | "max_object_size_limit": { |
| 950 | "value": "10m", |
| 951 | "configured_value": "10m", |
| 952 | "inherited_value": "20m" |
| 953 | }, |
| 954 | "submit_type": "REBASE_IF_NECESSARY", |
Dave Borowitz | c8f8d2e | 2017-10-23 11:18:23 -0400 | [diff] [blame] | 955 | "default_submit_type": { |
| 956 | "value": "REBASE_IF_NECESSARY", |
| 957 | "configured_value": "INHERIT", |
| 958 | "inherited_value": "REBASE_IF_NECESSARY" |
| 959 | }, |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 960 | "state": "ACTIVE", |
| 961 | "commentlinks": {} |
| 962 | } |
| 963 | ---- |
| 964 | |
Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 965 | [[run-gc]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 966 | === Run GC |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 967 | -- |
Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 968 | 'POST /projects/link:#project-name[\{project-name\}]/gc' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 969 | -- |
Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 970 | |
| 971 | Run the Git garbage collection for the repository of a project. |
| 972 | |
Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 973 | Options for the Git garbage collection can be specified in the |
| 974 | request body as a link:#gc-input[GCInput] entity. |
| 975 | |
Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 976 | .Request |
| 977 | ---- |
| 978 | POST /projects/plugins%2Freplication/gc HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 979 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 980 | |
| 981 | { |
| 982 | "show_progress": true |
| 983 | } |
Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 984 | ---- |
| 985 | |
| 986 | The response is the streamed output of the garbage collection. |
| 987 | |
| 988 | .Response |
| 989 | ---- |
| 990 | HTTP/1.1 200 OK |
| 991 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 992 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 993 | |
| 994 | collecting garbage for "plugins/replication": |
| 995 | Pack refs: 100% (21/21) |
| 996 | Counting objects: 20 |
| 997 | Finding sources: 100% (20/20) |
| 998 | Getting sizes: 100% (13/13) |
| 999 | Compressing objects: 83% (5/6) |
| 1000 | Writing objects: 100% (20/20) |
| 1001 | Selecting commits: 100% (7/7) |
| 1002 | Building bitmaps: 100% (7/7) |
| 1003 | Finding sources: 100% (41/41) |
| 1004 | Getting sizes: 100% (25/25) |
| 1005 | Compressing objects: 52% (12/23) |
| 1006 | Writing objects: 100% (41/41) |
| 1007 | Prune loose objects also found in pack files: 100% (36/36) |
| 1008 | Prune loose, unreferenced objects: 100% (36/36) |
| 1009 | done. |
| 1010 | ---- |
| 1011 | |
Adrian Görler | 92410a1 | 2015-11-03 16:20:56 +0100 | [diff] [blame] | 1012 | ==== Asynchronous Execution |
| 1013 | |
| 1014 | The option `async` allows to schedule a background task that asynchronously |
| 1015 | executes a Git garbage collection. |
| 1016 | |
| 1017 | The `Location` header of the response refers to the link:rest-api-config.html#get-task[background task] |
| 1018 | which allows to inspect the progress of its execution. In case of asynchronous |
| 1019 | execution the `show_progress` option is ignored. |
| 1020 | |
| 1021 | .Request |
| 1022 | ---- |
| 1023 | POST /projects/plugins%2Freplication/gc HTTP/1.0 |
| 1024 | Content-Type: application/json;charset=UTF-8 |
| 1025 | |
| 1026 | { |
| 1027 | "async": true |
| 1028 | } |
| 1029 | ---- |
| 1030 | |
| 1031 | The response is empty. |
| 1032 | |
| 1033 | .Response |
| 1034 | ---- |
| 1035 | HTTP/1.1 202 Accepted |
| 1036 | Content-Disposition: attachment |
| 1037 | Location: https:<host>/a/config/server/tasks/383a0602 |
| 1038 | ---- |
| 1039 | |
Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 1040 | [[ban-commit]] |
| 1041 | === Ban Commit |
| 1042 | -- |
| 1043 | 'PUT /projects/link:#project-name[\{project-name\}]/ban' |
| 1044 | -- |
| 1045 | |
| 1046 | Marks commits as banned for the project. If a commit is banned Gerrit |
| 1047 | rejects every push that includes this commit with |
| 1048 | link:error-contains-banned-commit.html[contains banned commit ...]. |
| 1049 | |
| 1050 | [NOTE] |
| 1051 | This REST endpoint only marks the commits as banned, but it does not |
| 1052 | remove the commits from the history of any central branch. This needs |
| 1053 | to be done manually. |
| 1054 | |
| 1055 | The commits to be banned must be specified in the request body as a |
| 1056 | link:#ban-input[BanInput] entity. |
| 1057 | |
| 1058 | The caller must be project owner. |
| 1059 | |
| 1060 | .Request |
| 1061 | ---- |
| 1062 | PUT /projects/plugins%2Freplication/ban HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1063 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 1064 | |
| 1065 | { |
| 1066 | "commits": [ |
| 1067 | "a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96", |
| 1068 | "cf5b56541f84b8b57e16810b18daca9c3adc377b" |
| 1069 | ], |
| 1070 | "reason": "Violates IP" |
| 1071 | } |
| 1072 | ---- |
| 1073 | |
| 1074 | As response a link:#ban-result-info[BanResultInfo] entity is returned. |
| 1075 | |
| 1076 | .Response |
| 1077 | ---- |
| 1078 | HTTP/1.1 200 OK |
| 1079 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1080 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 1081 | |
| 1082 | )]}' |
| 1083 | { |
| 1084 | "newly_banned": [ |
| 1085 | "a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96", |
| 1086 | "cf5b56541f84b8b57e16810b18daca9c3adc377b" |
| 1087 | ] |
| 1088 | } |
| 1089 | ---- |
| 1090 | |
Patrick Hiesel | 21816f1 | 2016-04-22 08:53:06 +0200 | [diff] [blame] | 1091 | [[get-access]] |
| 1092 | === List Access Rights for Project |
| 1093 | -- |
| 1094 | 'GET /projects/link:rest-api-projects.html#project-name[\{project-name\}]/access' |
| 1095 | -- |
| 1096 | |
| 1097 | Lists the access rights for a single project. |
| 1098 | |
Han-Wen Nienhuys | bfd1b35 | 2018-01-10 15:02:32 +0100 | [diff] [blame] | 1099 | As result a |
| 1100 | link:rest-api-access.html#project-access-info[ProjectAccessInfo] |
| 1101 | entity is returned. |
Patrick Hiesel | 21816f1 | 2016-04-22 08:53:06 +0200 | [diff] [blame] | 1102 | |
| 1103 | .Request |
| 1104 | ---- |
| 1105 | GET /projects/MyProject/access HTTP/1.0 |
| 1106 | ---- |
| 1107 | |
| 1108 | .Response |
| 1109 | ---- |
| 1110 | HTTP/1.1 200 OK |
| 1111 | Content-Type: application/json; charset=UTF-8 |
| 1112 | |
| 1113 | )]}' |
| 1114 | { |
| 1115 | "revision": "61157ed63e14d261b6dca40650472a9b0bd88474", |
| 1116 | "inherits_from": { |
| 1117 | "id": "All-Projects", |
| 1118 | "name": "All-Projects", |
| 1119 | "description": "Access inherited by all other projects." |
| 1120 | }, |
| 1121 | "local": { |
| 1122 | "refs/*": { |
| 1123 | "permissions": { |
| 1124 | "read": { |
| 1125 | "rules": { |
| 1126 | "c2ce4749a32ceb82cd6adcce65b8216e12afb41c": { |
| 1127 | "action": "ALLOW", |
| 1128 | "force": false |
| 1129 | }, |
| 1130 | "global:Anonymous-Users": { |
| 1131 | "action": "ALLOW", |
| 1132 | "force": false |
| 1133 | } |
| 1134 | } |
| 1135 | } |
| 1136 | } |
| 1137 | } |
| 1138 | }, |
| 1139 | "is_owner": true, |
| 1140 | "owner_of": [ |
| 1141 | "refs/*" |
| 1142 | ], |
| 1143 | "can_upload": true, |
| 1144 | "can_add": true, |
Marco Miller | c2114ac | 2018-09-10 16:52:54 -0400 | [diff] [blame] | 1145 | "can_add_tags": true, |
Han-Wen Nienhuys | e2258f6e | 2017-08-08 15:38:18 -0300 | [diff] [blame] | 1146 | "config_visible": true, |
| 1147 | "groups": { |
| 1148 | "c2ce4749a32ceb82cd6adcce65b8216e12afb41c": { |
| 1149 | "url": "#/admin/groups/uuid-c2ce4749a32ceb82cd6adcce65b8216e12afb41c", |
| 1150 | "options": {}, |
| 1151 | "description": "Users who perform batch actions on Gerrit", |
| 1152 | "group_id": 2, |
| 1153 | "owner": "Administrators", |
| 1154 | "owner_id": "d5b7124af4de52924ed397913e2c3b37bf186948", |
| 1155 | "created_on": "2009-06-08 23:31:00.000000000", |
| 1156 | "name": "Non-Interactive Users" |
| 1157 | }, |
| 1158 | "global:Anonymous-Users": { |
| 1159 | "options": {}, |
| 1160 | "name": "Anonymous Users" |
| 1161 | } |
| 1162 | } |
Patrick Hiesel | 21816f1 | 2016-04-22 08:53:06 +0200 | [diff] [blame] | 1163 | } |
| 1164 | ---- |
| 1165 | |
| 1166 | [[set-access]] |
| 1167 | === Add, Update and Delete Access Rights for Project |
| 1168 | -- |
| 1169 | 'POST /projects/link:rest-api-projects.html#project-name[\{project-name\}]/access' |
| 1170 | -- |
| 1171 | |
| 1172 | Sets access rights for the project using the diff schema provided by |
| 1173 | link:#project-access-input[ProjectAccessInput]. Deductions are used to |
| 1174 | remove access sections, permissions or permission rules. The backend will remove |
| 1175 | the entity with the finest granularity in the request, meaning that if an |
| 1176 | access section without permissions is posted, the access section will be |
| 1177 | removed; if an access section with a permission but no permission rules is |
| 1178 | posted, the permission will be removed; if an access section with a permission |
| 1179 | and a permission rule is posted, the permission rule will be removed. |
| 1180 | |
| 1181 | Additionally, access sections and permissions will be cleaned up after applying |
| 1182 | the deductions by removing items that have no child elements. |
| 1183 | |
| 1184 | After removals have been applied, additions will be applied. |
| 1185 | |
Han-Wen Nienhuys | bfd1b35 | 2018-01-10 15:02:32 +0100 | [diff] [blame] | 1186 | As result a |
| 1187 | link:rest-api-access.html#project-access-info[ProjectAccessInfo] |
| 1188 | entity is returned. |
Patrick Hiesel | 21816f1 | 2016-04-22 08:53:06 +0200 | [diff] [blame] | 1189 | |
| 1190 | .Request |
| 1191 | ---- |
| 1192 | POST /projects/MyProject/access HTTP/1.0 |
| 1193 | Content-Type: application/json; charset=UTF-8 |
| 1194 | |
| 1195 | { |
Florian Ramillien | 4978ae5 | 2018-12-04 11:04:59 +0100 | [diff] [blame] | 1196 | "remove": { |
| 1197 | "refs/*": { |
| 1198 | "permissions": { |
| 1199 | "read": { |
| 1200 | "rules": { |
| 1201 | "c2ce4749a32ceb82cd6adcce65b8216e12afb41c": { |
| 1202 | "action": "ALLOW" |
Patrick Hiesel | 21816f1 | 2016-04-22 08:53:06 +0200 | [diff] [blame] | 1203 | } |
| 1204 | } |
| 1205 | } |
| 1206 | } |
| 1207 | } |
Florian Ramillien | 4978ae5 | 2018-12-04 11:04:59 +0100 | [diff] [blame] | 1208 | } |
Patrick Hiesel | 21816f1 | 2016-04-22 08:53:06 +0200 | [diff] [blame] | 1209 | } |
| 1210 | ---- |
| 1211 | |
| 1212 | .Response |
| 1213 | ---- |
| 1214 | HTTP/1.1 200 OK |
| 1215 | Content-Type: application/json; charset=UTF-8 |
| 1216 | |
| 1217 | )]}' |
| 1218 | { |
| 1219 | "revision": "61157ed63e14d261b6dca40650472a9b0bd88474", |
| 1220 | "inherits_from": { |
| 1221 | "id": "All-Projects", |
| 1222 | "name": "All-Projects", |
| 1223 | "description": "Access inherited by all other projects." |
| 1224 | }, |
| 1225 | "local": { |
| 1226 | "refs/*": { |
| 1227 | "permissions": { |
| 1228 | "read": { |
| 1229 | "rules": { |
| 1230 | "global:Anonymous-Users": { |
| 1231 | "action": "ALLOW", |
| 1232 | "force": false |
| 1233 | } |
| 1234 | } |
| 1235 | } |
| 1236 | } |
| 1237 | } |
| 1238 | }, |
| 1239 | "is_owner": true, |
| 1240 | "owner_of": [ |
| 1241 | "refs/*" |
| 1242 | ], |
| 1243 | "can_upload": true, |
| 1244 | "can_add": true, |
Marco Miller | c2114ac | 2018-09-10 16:52:54 -0400 | [diff] [blame] | 1245 | "can_add_tags": true, |
Han-Wen Nienhuys | e2258f6e | 2017-08-08 15:38:18 -0300 | [diff] [blame] | 1246 | "config_visible": true, |
| 1247 | "groups": { |
| 1248 | "global:Anonymous-Users": { |
| 1249 | "options": {}, |
| 1250 | "name": "Anonymous Users" |
| 1251 | } |
| 1252 | } |
Patrick Hiesel | 21816f1 | 2016-04-22 08:53:06 +0200 | [diff] [blame] | 1253 | } |
| 1254 | ---- |
| 1255 | |
Han-Wen Nienhuys | 4f6fab3 | 2017-09-07 15:26:54 +0200 | [diff] [blame] | 1256 | [[create-access-change]] |
| 1257 | === Create Access Rights Change for review. |
| 1258 | -- |
| 1259 | 'PUT /projects/link:rest-api-projects.html#project-name[\{project-name\}]/access:review |
| 1260 | -- |
| 1261 | |
| 1262 | Sets access rights for the project using the diff schema provided by |
| 1263 | link:#project-access-input[ProjectAccessInput] |
| 1264 | |
| 1265 | This takes the same input as link:#set-access[Update Access Rights], but creates a pending |
| 1266 | change for review. Like link:#create-change[Create Change], it returns |
| 1267 | a link:#change-info[ChangeInfo] entity describing the resulting change. |
| 1268 | |
| 1269 | .Request |
| 1270 | ---- |
| 1271 | PUT /projects/MyProject/access:review HTTP/1.0 |
| 1272 | Content-Type: application/json; charset=UTF-8 |
| 1273 | |
| 1274 | { |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 1275 | "add": { |
| 1276 | "refs/heads/*": { |
| 1277 | "permissions": { |
| 1278 | "read": { |
| 1279 | "rules": { |
Han-Wen Nienhuys | 4f6fab3 | 2017-09-07 15:26:54 +0200 | [diff] [blame] | 1280 | "global:Anonymous-Users": { |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 1281 | "action": "DENY", |
| 1282 | "force": false |
Han-Wen Nienhuys | 4f6fab3 | 2017-09-07 15:26:54 +0200 | [diff] [blame] | 1283 | } |
| 1284 | } |
| 1285 | } |
| 1286 | } |
| 1287 | } |
| 1288 | } |
| 1289 | } |
| 1290 | ---- |
| 1291 | |
| 1292 | .Response |
| 1293 | ---- |
| 1294 | HTTP/1.1 200 OK |
| 1295 | Content-Type: application/json; charset=UTF-8 |
| 1296 | |
| 1297 | )]}' |
| 1298 | { |
| 1299 | "id": "testproj~refs%2Fmeta%2Fconfig~Ieaf185bf90a1fc3b58461e399385e158a20b31a2", |
| 1300 | "project": "testproj", |
| 1301 | "branch": "refs/meta/config", |
| 1302 | "hashtags": [], |
| 1303 | "change_id": "Ieaf185bf90a1fc3b58461e399385e158a20b31a2", |
| 1304 | "subject": "Review access change", |
| 1305 | "status": "NEW", |
| 1306 | "created": "2017-09-07 14:31:11.852000000", |
| 1307 | "updated": "2017-09-07 14:31:11.852000000", |
| 1308 | "submit_type": "CHERRY_PICK", |
| 1309 | "mergeable": true, |
| 1310 | "insertions": 2, |
| 1311 | "deletions": 0, |
| 1312 | "unresolved_comment_count": 0, |
| 1313 | "has_review_started": true, |
| 1314 | "_number": 7, |
| 1315 | "owner": { |
| 1316 | "_account_id": 1000000 |
| 1317 | } |
| 1318 | } |
| 1319 | ---- |
| 1320 | |
Han-Wen Nienhuys | d1ed08d | 2017-09-04 18:13:23 +0200 | [diff] [blame] | 1321 | [[check-access]] |
| 1322 | === Check Access |
| 1323 | -- |
Han-Wen Nienhuys | 751e824 | 2018-10-01 16:43:05 +0200 | [diff] [blame] | 1324 | 'GET /projects/MyProject/check.access?account=1000098&ref=refs%2Fheads%2Fsecret%2Fbla' |
Han-Wen Nienhuys | d1ed08d | 2017-09-04 18:13:23 +0200 | [diff] [blame] | 1325 | -- |
| 1326 | |
Han-Wen Nienhuys | 751e824 | 2018-10-01 16:43:05 +0200 | [diff] [blame] | 1327 | This command runs access checks for other users. This requires the |
| 1328 | link:access-control.html#capability_viewAccess[View Access] global |
| 1329 | capability. |
Han-Wen Nienhuys | d1ed08d | 2017-09-04 18:13:23 +0200 | [diff] [blame] | 1330 | |
| 1331 | The result is a link:#access-check-info[AccessCheckInfo] entity |
Han-Wen Nienhuys | 8a4a682 | 2018-01-18 19:27:46 +0100 | [diff] [blame] | 1332 | detailing the access of the given user for the given project, |
| 1333 | project-ref, or project-permission-ref combination. |
Han-Wen Nienhuys | d1ed08d | 2017-09-04 18:13:23 +0200 | [diff] [blame] | 1334 | |
| 1335 | .Response |
| 1336 | ---- |
| 1337 | HTTP/1.1 200 OK |
| 1338 | Content-Type: application/json; charset=UTF-8 |
| 1339 | |
| 1340 | )]}' |
| 1341 | { |
| 1342 | "message": "user Kristen Burns \u003cKristen.Burns@gerritcodereview.com\u003e (1000098) cannot see ref refs/heads/secret/bla in project MyProject", |
| 1343 | "status": 403 |
| 1344 | } |
| 1345 | ---- |
Han-Wen Nienhuys | 4f6fab3 | 2017-09-07 15:26:54 +0200 | [diff] [blame] | 1346 | |
Han-Wen Nienhuys | 751e824 | 2018-10-01 16:43:05 +0200 | [diff] [blame] | 1347 | [[check-access-options]] |
| 1348 | ==== Check Access Options |
Han-Wen Nienhuys | 5b089f2 | 2018-04-17 16:26:44 +0200 | [diff] [blame] | 1349 | |
Han-Wen Nienhuys | 751e824 | 2018-10-01 16:43:05 +0200 | [diff] [blame] | 1350 | Account(account):: |
| 1351 | The account for which to check access. Mandatory. |
Han-Wen Nienhuys | 5b089f2 | 2018-04-17 16:26:44 +0200 | [diff] [blame] | 1352 | |
Han-Wen Nienhuys | 751e824 | 2018-10-01 16:43:05 +0200 | [diff] [blame] | 1353 | Permission(perm):: |
| 1354 | The ref permission for which to check access. If not specified, read |
| 1355 | access to at least branch is checked. |
| 1356 | |
| 1357 | Ref(ref):: |
| 1358 | The branch for which to check access. This must be given if `perm` is specified. |
| 1359 | |
Hector Oswaldo Caballero | 2b4239a | 2017-02-13 07:40:33 -0500 | [diff] [blame] | 1360 | [[index]] |
Patrick Hiesel | 20d981e | 2018-07-04 09:48:21 +0200 | [diff] [blame] | 1361 | === Index project |
| 1362 | |
| 1363 | Adds or updates the current project (and children, if specified) in the secondary index. |
Patrick Hiesel | 6b7d9b1 | 2018-07-10 14:11:35 +0200 | [diff] [blame] | 1364 | The indexing task is executed asynchronously in background and this command returns |
| 1365 | immediately if `async` is specified in the input. |
Patrick Hiesel | 20d981e | 2018-07-04 09:48:21 +0200 | [diff] [blame] | 1366 | |
| 1367 | As an input, a link:#index-project-input[IndexProjectInput] entity can be provided. |
| 1368 | |
| 1369 | .Request |
| 1370 | ---- |
| 1371 | POST /projects/MyProject/index HTTP/1.0 |
| 1372 | Content-Type: application/json; charset=UTF-8 |
| 1373 | |
| 1374 | { |
| 1375 | "index_children": "true" |
Patrick Hiesel | 6b7d9b1 | 2018-07-10 14:11:35 +0200 | [diff] [blame] | 1376 | "async": "true" |
Patrick Hiesel | 20d981e | 2018-07-04 09:48:21 +0200 | [diff] [blame] | 1377 | } |
| 1378 | ---- |
| 1379 | |
| 1380 | .Response |
| 1381 | ---- |
| 1382 | HTTP/1.1 202 Accepted |
| 1383 | Content-Disposition: attachment |
| 1384 | ---- |
| 1385 | |
| 1386 | [[index.changes]] |
Hector Oswaldo Caballero | 2b4239a | 2017-02-13 07:40:33 -0500 | [diff] [blame] | 1387 | === Index all changes in a project |
| 1388 | |
| 1389 | Adds or updates all the changes belonging to a project in the secondary index. |
| 1390 | The indexing task is executed asynchronously in background, so this command |
| 1391 | returns immediately. |
| 1392 | |
| 1393 | .Request |
| 1394 | ---- |
Patrick Hiesel | 20d981e | 2018-07-04 09:48:21 +0200 | [diff] [blame] | 1395 | POST /projects/MyProject/index.changes HTTP/1.0 |
Hector Oswaldo Caballero | 2b4239a | 2017-02-13 07:40:33 -0500 | [diff] [blame] | 1396 | ---- |
| 1397 | |
| 1398 | .Response |
| 1399 | ---- |
Edwin Kempin | 4145f97 | 2018-01-12 16:30:44 +0100 | [diff] [blame] | 1400 | HTTP/1.1 202 Accepted |
| 1401 | Content-Disposition: attachment |
Hector Oswaldo Caballero | 2b4239a | 2017-02-13 07:40:33 -0500 | [diff] [blame] | 1402 | ---- |
| 1403 | |
Edwin Kempin | bf9df39 | 2018-01-12 15:20:48 +0100 | [diff] [blame] | 1404 | [[check]] |
| 1405 | === Check project consistency |
| 1406 | |
| 1407 | Performs consistency checks on the project. |
| 1408 | |
| 1409 | Which consistency checks should be performed is controlled by the |
| 1410 | link:#check-project-input[CheckProjectInput] entity in the request |
| 1411 | body. |
| 1412 | |
| 1413 | The following consistency checks are supported: |
| 1414 | |
| 1415 | [[auto-closeable-changes-check]] |
| 1416 | -- |
| 1417 | * AutoCloseableChangesCheck: Searches for open changes that can be |
| 1418 | auto-closed because a patch set of the change is already contained in |
| 1419 | the destination branch or because the destination branch contains a |
| 1420 | commit with the same Change-Id. Normally Gerrit auto-closes such |
| 1421 | changes when the corresponding commits are pushed directly to the |
| 1422 | repository. However if a branch is updated behind Gerrit's back or if |
| 1423 | auto-closing changes fails (and the push is still successful) change |
| 1424 | states can get inconsistent (changes that are already part of the |
| 1425 | destination branch are still open). This consistency check is |
| 1426 | intended to detect and repair this situation. |
| 1427 | -- |
| 1428 | |
| 1429 | To fix any problems that can be fixed automatically set the `fix` field |
| 1430 | in the inputs for the consistency checks to `true`. |
| 1431 | |
| 1432 | This REST endpoint requires the |
| 1433 | link:access-control.html#capability_administrateServer[Administrate Server] |
| 1434 | global capability. |
| 1435 | |
| 1436 | .Request |
| 1437 | ---- |
| 1438 | POST /projects/MyProject/check HTTP/1.0 |
| 1439 | Content-Type: application/json; charset=UTF-8 |
| 1440 | |
| 1441 | { |
| 1442 | "auto_closeable_changes_check": { |
| 1443 | "fix": true, |
| 1444 | "branch": "refs/heads/master", |
| 1445 | "max_commits": 100 |
| 1446 | } |
| 1447 | } |
| 1448 | ---- |
| 1449 | |
| 1450 | As response a link:#check-project-result-info[CheckProjectResultInfo] |
| 1451 | entity is returned that results for the consistency checks. |
| 1452 | |
| 1453 | .Response |
| 1454 | ---- |
| 1455 | HTTP/1.1 200 OK |
| 1456 | Content-Disposition: attachment |
| 1457 | Content-Type: application/json; charset=UTF-8 |
| 1458 | |
| 1459 | )]}' |
| 1460 | { |
| 1461 | "auto_closeable_changes_check_result": { |
| 1462 | "auto_closeable_changes": { |
| 1463 | "refs/heads/master": [ |
| 1464 | { |
| 1465 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1466 | "project": "myProject", |
| 1467 | "branch": "master", |
| 1468 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1469 | "subject": "Implementing Feature X", |
| 1470 | "status": "NEW", |
| 1471 | "created": "2013-02-01 09:59:32.126000000", |
| 1472 | "updated": "2013-02-21 11:16:36.775000000", |
| 1473 | "insertions": 34, |
| 1474 | "deletions": 101, |
| 1475 | "_number": 3965, |
| 1476 | "owner": { |
| 1477 | "name": "John Doe" |
| 1478 | }, |
| 1479 | "problems": [ |
| 1480 | { |
| 1481 | "message": "Patch set 1 (2f15e416237ed9b561199f24184f5f5d2708c584) is merged into destination ref refs/heads/master (2f15e416237ed9b561199f24184f5f5d2708c584), but change status is NEW", |
| 1482 | "status": "FIXED", |
| 1483 | "outcome": "Marked change as merged" |
| 1484 | } |
| 1485 | ] |
| 1486 | } |
| 1487 | ] |
| 1488 | } |
| 1489 | } |
| 1490 | } |
| 1491 | ---- |
| 1492 | |
Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1493 | [[branch-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1494 | == Branch Endpoints |
Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1495 | |
| 1496 | [[list-branches]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1497 | === List Branches |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1498 | -- |
Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1499 | 'GET /projects/link:#project-name[\{project-name\}]/branches/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1500 | -- |
Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1501 | |
| 1502 | List the branches of a project. |
| 1503 | |
| 1504 | As result a list of link:#branch-info[BranchInfo] entries is |
| 1505 | returned. |
| 1506 | |
| 1507 | .Request |
| 1508 | ---- |
| 1509 | GET /projects/work%2Fmy-project/branches/ HTTP/1.0 |
| 1510 | ---- |
| 1511 | |
| 1512 | .Response |
| 1513 | ---- |
| 1514 | HTTP/1.1 200 OK |
| 1515 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1516 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1517 | |
| 1518 | )]}' |
| 1519 | [ |
| 1520 | { |
| 1521 | "ref": "HEAD", |
| 1522 | "revision": "master" |
| 1523 | }, |
| 1524 | { |
| 1525 | "ref": "refs/meta/config", |
| 1526 | "revision": "76016386a0d8ecc7b6be212424978bb45959d668" |
| 1527 | }, |
| 1528 | { |
| 1529 | "ref": "refs/heads/master", |
| 1530 | "revision": "67ebf73496383c6777035e374d2d664009e2aa5c" |
| 1531 | }, |
| 1532 | { |
| 1533 | "ref": "refs/heads/stable", |
| 1534 | "revision": "64ca533bd0eb5252d2fee83f63da67caae9b4674", |
| 1535 | "can_delete": true |
| 1536 | } |
| 1537 | ] |
| 1538 | ---- |
| 1539 | |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1540 | [[branch-options]] |
| 1541 | ==== Branch Options |
| 1542 | |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1543 | Limit(n):: |
| 1544 | Limit the number of branches to be included in the results. |
| 1545 | + |
| 1546 | .Request |
| 1547 | ---- |
| 1548 | GET /projects/testproject/branches?n=1 HTTP/1.0 |
| 1549 | ---- |
| 1550 | + |
| 1551 | .Response |
| 1552 | ---- |
| 1553 | HTTP/1.1 200 OK |
| 1554 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1555 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1556 | |
| 1557 | )]}' |
| 1558 | [ |
| 1559 | { |
| 1560 | "ref": "HEAD", |
| 1561 | "revision": "master", |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1562 | } |
| 1563 | ] |
| 1564 | ---- |
| 1565 | |
David Pursehouse | 5cb3819 | 2017-07-28 16:11:33 +0100 | [diff] [blame] | 1566 | Skip(S):: |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1567 | Skip the given number of branches from the beginning of the list. |
| 1568 | + |
| 1569 | .Request |
| 1570 | ---- |
| 1571 | GET /projects/testproject/branches?n=1&s=0 HTTP/1.0 |
| 1572 | ---- |
| 1573 | + |
| 1574 | .Response |
| 1575 | ---- |
| 1576 | HTTP/1.1 200 OK |
| 1577 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1578 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1579 | |
| 1580 | )]}' |
| 1581 | [ |
| 1582 | { |
| 1583 | "ref": "HEAD", |
| 1584 | "revision": "master", |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1585 | } |
| 1586 | ] |
| 1587 | ---- |
| 1588 | |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1589 | Substring(m):: |
David Pursehouse | 1d4d67d | 2017-07-13 09:58:10 +0900 | [diff] [blame] | 1590 | Limit the results to those branches that match the specified substring. |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1591 | + |
David Pursehouse | 16a1a4b | 2017-07-13 10:22:28 +0900 | [diff] [blame] | 1592 | The match is case insensitive. May not be used together with `r`. |
David Pursehouse | 5851bfe | 2017-07-13 09:56:26 +0900 | [diff] [blame] | 1593 | + |
David Pursehouse | 1d4d67d | 2017-07-13 09:58:10 +0900 | [diff] [blame] | 1594 | List all branches that match substring `test`: |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1595 | + |
| 1596 | .Request |
| 1597 | ---- |
| 1598 | GET /projects/testproject/branches?m=test HTTP/1.0 |
| 1599 | ---- |
| 1600 | + |
| 1601 | .Response |
| 1602 | ---- |
| 1603 | HTTP/1.1 200 OK |
| 1604 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1605 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1606 | |
| 1607 | )]}' |
| 1608 | [ |
| 1609 | { |
| 1610 | "ref": "refs/heads/test1", |
| 1611 | "revision": "9c9d08a438e55e52f33b608415e6dddd9b18550d", |
| 1612 | "can_delete": true |
| 1613 | } |
| 1614 | ] |
| 1615 | ---- |
| 1616 | |
| 1617 | Regex(r):: |
| 1618 | Limit the results to those branches that match the specified regex. |
| 1619 | Boundary matchers '^' and '$' are implicit. For example: the regex 't*' will |
David Pursehouse | a6cd67f | 2017-07-13 16:40:58 +0900 | [diff] [blame] | 1620 | match any branches that start with 't' and regex '*t' will match any |
| 1621 | branches that end with 't'. |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1622 | + |
David Pursehouse | 16a1a4b | 2017-07-13 10:22:28 +0900 | [diff] [blame] | 1623 | 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] | 1624 | + |
| 1625 | List all branches that match regex `t.*1`: |
| 1626 | + |
| 1627 | .Request |
| 1628 | ---- |
| 1629 | GET /projects/testproject/branches?r=t.*1 HTTP/1.0 |
| 1630 | ---- |
| 1631 | + |
| 1632 | .Response |
| 1633 | ---- |
| 1634 | HTTP/1.1 200 OK |
| 1635 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1636 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1637 | |
| 1638 | )]}' |
| 1639 | [ |
| 1640 | { |
| 1641 | "ref": "refs/heads/test1", |
| 1642 | "revision": "9c9d08a438e55e52f33b608415e6dddd9b18550d", |
| 1643 | "can_delete": true |
| 1644 | } |
| 1645 | ] |
| 1646 | ---- |
| 1647 | |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1648 | [[get-branch]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1649 | === Get Branch |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1650 | -- |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1651 | '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] | 1652 | -- |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1653 | |
| 1654 | Retrieves a branch of a project. |
| 1655 | |
| 1656 | .Request |
| 1657 | ---- |
| 1658 | GET /projects/work%2Fmy-project/branches/master HTTP/1.0 |
| 1659 | ---- |
| 1660 | |
| 1661 | As response a link:#branch-info[BranchInfo] entity is returned that |
| 1662 | describes the branch. |
| 1663 | |
| 1664 | .Response |
| 1665 | ---- |
| 1666 | HTTP/1.1 200 OK |
| 1667 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1668 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1669 | |
| 1670 | )]}' |
| 1671 | { |
| 1672 | "ref": "refs/heads/master", |
| 1673 | "revision": "67ebf73496383c6777035e374d2d664009e2aa5c" |
| 1674 | } |
| 1675 | ---- |
| 1676 | |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1677 | [[create-branch]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1678 | === Create Branch |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1679 | -- |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1680 | '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] | 1681 | -- |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1682 | |
| 1683 | Creates a new branch. |
| 1684 | |
| 1685 | In the request body additional data for the branch can be provided as |
| 1686 | link:#branch-input[BranchInput]. |
| 1687 | |
| 1688 | .Request |
| 1689 | ---- |
| 1690 | PUT /projects/MyProject/branches/stable HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1691 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1692 | |
| 1693 | { |
| 1694 | "revision": "76016386a0d8ecc7b6be212424978bb45959d668" |
| 1695 | } |
| 1696 | ---- |
| 1697 | |
| 1698 | As response a link:#branch-info[BranchInfo] entity is returned that |
| 1699 | describes the created branch. |
| 1700 | |
| 1701 | .Response |
| 1702 | ---- |
| 1703 | HTTP/1.1 201 Created |
| 1704 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1705 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1706 | |
| 1707 | )]}' |
| 1708 | { |
| 1709 | "ref": "refs/heads/stable", |
| 1710 | "revision": "76016386a0d8ecc7b6be212424978bb45959d668", |
| 1711 | "can_delete": true |
| 1712 | } |
| 1713 | ---- |
| 1714 | |
Edwin Kempin | 6ce96a1 | 2013-06-06 13:20:01 +0200 | [diff] [blame] | 1715 | [[delete-branch]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1716 | === Delete Branch |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1717 | -- |
Edwin Kempin | 6ce96a1 | 2013-06-06 13:20:01 +0200 | [diff] [blame] | 1718 | '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] | 1719 | -- |
Edwin Kempin | 6ce96a1 | 2013-06-06 13:20:01 +0200 | [diff] [blame] | 1720 | |
| 1721 | Deletes a branch. |
| 1722 | |
| 1723 | .Request |
| 1724 | ---- |
| 1725 | DELETE /projects/MyProject/branches/stable HTTP/1.0 |
| 1726 | ---- |
| 1727 | |
| 1728 | .Response |
| 1729 | ---- |
| 1730 | HTTP/1.1 204 No Content |
| 1731 | ---- |
| 1732 | |
Hugo Arès | ef8e320 | 2015-01-12 15:09:06 -0500 | [diff] [blame] | 1733 | [[delete-branches]] |
| 1734 | === Delete Branches |
| 1735 | -- |
| 1736 | 'POST /projects/link:#project-name[\{project-name\}]/branches:delete' |
| 1737 | -- |
| 1738 | |
| 1739 | Delete one or more branches. |
| 1740 | |
| 1741 | The branches to be deleted must be provided in the request body as a |
| 1742 | link:#delete-branches-input[DeleteBranchesInput] entity. |
| 1743 | |
| 1744 | .Request |
| 1745 | ---- |
| 1746 | POST /projects/MyProject/branches:delete HTTP/1.0 |
| 1747 | Content-Type: application/json;charset=UTF-8 |
| 1748 | |
| 1749 | { |
| 1750 | "branches": [ |
| 1751 | "stable-1.0", |
| 1752 | "stable-2.0" |
| 1753 | ] |
| 1754 | } |
| 1755 | ---- |
| 1756 | |
| 1757 | .Response |
| 1758 | ---- |
| 1759 | HTTP/1.1 204 No Content |
| 1760 | ---- |
| 1761 | |
| 1762 | If some branches could not be deleted, the response is "`409 Conflict`" and the |
| 1763 | error message is contained in the response body. |
| 1764 | |
Edwin Kempin | d31e558 | 2013-11-30 12:07:08 +0100 | [diff] [blame] | 1765 | [[get-content]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1766 | === Get Content |
Edwin Kempin | d31e558 | 2013-11-30 12:07:08 +0100 | [diff] [blame] | 1767 | -- |
| 1768 | 'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]/files/link:rest-api-changes.html#file-id[\{file-id\}]/content' |
| 1769 | -- |
| 1770 | |
| 1771 | Gets the content of a file from the HEAD revision of a certain branch. |
| 1772 | |
| 1773 | .Request |
| 1774 | ---- |
| 1775 | GET /projects/gerrit/branches/master/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/content HTTP/1.0 |
| 1776 | ---- |
| 1777 | |
| 1778 | The content is returned as base64 encoded string. |
| 1779 | |
| 1780 | .Response |
| 1781 | ---- |
| 1782 | HTTP/1.1 200 OK |
| 1783 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1784 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | d31e558 | 2013-11-30 12:07:08 +0100 | [diff] [blame] | 1785 | |
| 1786 | Ly8gQ29weXJpZ2h0IChDKSAyMDEwIFRoZSBBbmRyb2lkIE9wZW4gU291cmNlIFByb2plY... |
| 1787 | ---- |
| 1788 | |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 1789 | |
| 1790 | [[get-mergeable-info]] |
| 1791 | === Get Mergeable Information |
| 1792 | -- |
| 1793 | 'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]/mergeable' |
| 1794 | -- |
| 1795 | |
| 1796 | Gets whether the source is mergeable with the target branch. |
| 1797 | |
Zhen Chen | 8f00d55 | 2016-07-26 16:54:59 -0700 | [diff] [blame] | 1798 | The `source` query parameter is required, which can be anything that could be |
| 1799 | resolved to a commit, see examples of the `source` attribute in |
| 1800 | link:rest-api-changes.html#merge-input[MergeInput]. |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 1801 | |
| 1802 | Also takes an optional parameter `strategy`, which can be `recursive`, `resolve`, |
| 1803 | `simple-two-way-in-core`, `ours` or `theirs`, default will use project settings. |
| 1804 | |
| 1805 | .Request |
| 1806 | ---- |
| 1807 | GET /projects/test/branches/master/mergeable?source=testbranch&strategy=recursive HTTP/1.0 |
| 1808 | ---- |
| 1809 | |
Zhen Chen | 8f00d55 | 2016-07-26 16:54:59 -0700 | [diff] [blame] | 1810 | 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] | 1811 | |
| 1812 | .Response |
| 1813 | ---- |
| 1814 | HTTP/1.1 200 OK |
| 1815 | Content-Disposition: attachment |
| 1816 | Content-Type: application/json; charset=UTF-8 |
| 1817 | |
| 1818 | )]}' |
| 1819 | { |
Zhen Chen | 8f00d55 | 2016-07-26 16:54:59 -0700 | [diff] [blame] | 1820 | "submit_type": "MERGE_IF_NECESSARY", |
| 1821 | "strategy": "recursive", |
| 1822 | "mergeable": true, |
| 1823 | "commit_merged": false, |
| 1824 | "content_merged": false |
| 1825 | } |
| 1826 | ---- |
| 1827 | |
| 1828 | or when there were conflicts. |
| 1829 | |
| 1830 | .Response |
| 1831 | ---- |
| 1832 | HTTP/1.1 200 OK |
| 1833 | Content-Disposition: attachment |
| 1834 | Content-Type: application/json; charset=UTF-8 |
| 1835 | |
| 1836 | )]}' |
| 1837 | { |
| 1838 | "submit_type": "MERGE_IF_NECESSARY", |
| 1839 | "strategy": "recursive", |
| 1840 | "mergeable": false, |
| 1841 | "conflicts": [ |
| 1842 | "common.txt", |
| 1843 | "shared.txt" |
| 1844 | ] |
| 1845 | } |
| 1846 | ---- |
| 1847 | |
| 1848 | or when the 'testbranch' has been already merged. |
| 1849 | |
| 1850 | .Response |
| 1851 | ---- |
| 1852 | HTTP/1.1 200 OK |
| 1853 | Content-Disposition: attachment |
| 1854 | Content-Type: application/json; charset=UTF-8 |
| 1855 | |
| 1856 | )]}' |
| 1857 | { |
| 1858 | "submit_type": "MERGE_IF_NECESSARY", |
| 1859 | "strategy": "recursive", |
| 1860 | "mergeable": true, |
| 1861 | "commit_merged": true, |
| 1862 | "content_merged": true |
| 1863 | } |
| 1864 | ---- |
| 1865 | |
| 1866 | or when only the content of 'testbranch' has been merged. |
| 1867 | |
| 1868 | .Response |
| 1869 | ---- |
| 1870 | HTTP/1.1 200 OK |
| 1871 | Content-Disposition: attachment |
| 1872 | Content-Type: application/json; charset=UTF-8 |
| 1873 | |
| 1874 | )]}' |
| 1875 | { |
| 1876 | "submit_type": "MERGE_IF_NECESSARY", |
| 1877 | "strategy": "recursive", |
| 1878 | "mergeable": true, |
| 1879 | "commit_merged": false, |
| 1880 | "content_merged": true |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 1881 | } |
| 1882 | ---- |
| 1883 | |
Edwin Kempin | 87504d9 | 2014-07-04 12:59:19 +0200 | [diff] [blame] | 1884 | [[get-reflog]] |
| 1885 | === Get Reflog |
| 1886 | -- |
| 1887 | 'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]/reflog' |
| 1888 | -- |
| 1889 | |
| 1890 | Gets the reflog of a certain branch. |
| 1891 | |
| 1892 | The caller must be project owner. |
| 1893 | |
| 1894 | .Request |
| 1895 | ---- |
| 1896 | GET /projects/gerrit/branches/master/reflog HTTP/1.0 |
| 1897 | ---- |
| 1898 | |
| 1899 | As response a list of link:#reflog-entry-info[ReflogEntryInfo] entities |
| 1900 | is returned that describe the reflog entries. The reflog entries are |
| 1901 | returned in reverse order. |
| 1902 | |
| 1903 | .Response |
| 1904 | ---- |
| 1905 | HTTP/1.1 200 OK |
| 1906 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1907 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 87504d9 | 2014-07-04 12:59:19 +0200 | [diff] [blame] | 1908 | |
| 1909 | )]}' |
| 1910 | [ |
| 1911 | { |
| 1912 | "old_id": "976ced8f4fc0909d7e1584d18455299545881d60", |
| 1913 | "new_id": "2eaa94bac536654eb592c941e33b91f925698d16", |
| 1914 | "who": { |
| 1915 | "name": "Jane Roe", |
| 1916 | "email": "jane.roe@example.com", |
| 1917 | "date": "2014-06-30 11:53:43.000000000", |
| 1918 | "tz": 120 |
| 1919 | }, |
| 1920 | "comment": "merged: fast forward" |
| 1921 | }, |
| 1922 | { |
| 1923 | "old_id": "c271c6a7161b74f85560c5899c8c73ee89ca5e29", |
| 1924 | "new_id": "976ced8f4fc0909d7e1584d18455299545881d60", |
| 1925 | "who": { |
| 1926 | "name": "John Doe", |
| 1927 | "email": "john.doe@example.com", |
| 1928 | "date": "2013-10-02 10:45:26.000000000", |
| 1929 | "tz": 120 |
| 1930 | }, |
| 1931 | "comment": "merged: fast forward" |
| 1932 | }, |
| 1933 | { |
| 1934 | "old_id": "0000000000000000000000000000000000000000", |
| 1935 | "new_id": "c271c6a7161b74f85560c5899c8c73ee89ca5e29", |
| 1936 | "who": { |
| 1937 | "name": "John Doe", |
| 1938 | "email": "john.doe@example.com", |
| 1939 | "date": "2013-09-30 19:08:44.000000000", |
| 1940 | "tz": 120 |
| 1941 | }, |
| 1942 | "comment": "" |
| 1943 | } |
| 1944 | ] |
| 1945 | ---- |
| 1946 | |
| 1947 | The get reflog endpoint also accepts a limit integer in the `n` |
| 1948 | parameter. This limits the results to show the last `n` reflog entries. |
| 1949 | |
| 1950 | Query the last 25 reflog entries. |
| 1951 | ---- |
| 1952 | GET /projects/gerrit/branches/master/reflog?n=25 HTTP/1.0 |
| 1953 | ---- |
| 1954 | |
Edwin Kempin | 2a581fd | 2014-07-04 14:04:54 +0200 | [diff] [blame] | 1955 | The reflog can also be filtered by timestamp by specifying the `from` |
| 1956 | and `to` parameters. The timestamp for `from` and `to` must be given as |
| 1957 | UTC in the following format: `yyyyMMdd_HHmm`. |
| 1958 | |
| 1959 | ---- |
| 1960 | GET /projects/gerrit/branches/master/reflog?from=20130101_0000&to=20140101_0000=25 HTTP/1.0 |
| 1961 | ---- |
| 1962 | |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1963 | [[child-project-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1964 | == Child Project Endpoints |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1965 | |
| 1966 | [[list-child-projects]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1967 | === List Child Projects |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1968 | -- |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1969 | 'GET /projects/link:#project-name[\{project-name\}]/children/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1970 | -- |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1971 | |
| 1972 | List the direct child projects of a project. |
| 1973 | |
| 1974 | .Request |
| 1975 | ---- |
| 1976 | GET /projects/Public-Plugins/children/ HTTP/1.0 |
| 1977 | ---- |
| 1978 | |
| 1979 | As result a list of link:#project-info[ProjectInfo] entries is |
| 1980 | returned that describe the child projects. |
| 1981 | |
| 1982 | .Response |
| 1983 | ---- |
| 1984 | HTTP/1.1 200 OK |
| 1985 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1986 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1987 | |
| 1988 | )]}' |
| 1989 | [ |
| 1990 | { |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1991 | "id": "plugins%2Freplication", |
| 1992 | "name": "plugins/replication", |
| 1993 | "parent": "Public-Plugins", |
| 1994 | "description": "Copies to other servers using the Git protocol" |
| 1995 | }, |
| 1996 | { |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1997 | "id": "plugins%2Freviewnotes", |
| 1998 | "name": "plugins/reviewnotes", |
| 1999 | "parent": "Public-Plugins", |
| 2000 | "description": "Annotates merged commits using notes on refs/notes/review." |
| 2001 | }, |
| 2002 | { |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 2003 | "id": "plugins%2Fsingleusergroup", |
| 2004 | "name": "plugins/singleusergroup", |
| 2005 | "parent": "Public-Plugins", |
| 2006 | "description": "GroupBackend enabling users to be directly added to access rules" |
| 2007 | } |
| 2008 | ] |
| 2009 | ---- |
| 2010 | |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 2011 | To resolve the child projects of a project recursively the parameter |
| 2012 | `recursive` can be set. |
| 2013 | |
| 2014 | Child projects that are not visible to the calling user are ignored and |
| 2015 | are not resolved further. |
| 2016 | |
| 2017 | .Request |
| 2018 | ---- |
| 2019 | GET /projects/Public-Projects/children/?recursive HTTP/1.0 |
| 2020 | ---- |
| 2021 | |
| 2022 | .Response |
| 2023 | ---- |
| 2024 | HTTP/1.1 200 OK |
| 2025 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2026 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 2027 | |
| 2028 | )]}' |
| 2029 | [ |
| 2030 | { |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 2031 | "id": "gerrit", |
| 2032 | "name": "gerrit", |
| 2033 | "parent": "Public-Projects", |
| 2034 | "description": "Gerrit Code Review" |
| 2035 | }, |
| 2036 | { |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 2037 | "id": "plugins%2Freplication", |
| 2038 | "name": "plugins/replication", |
| 2039 | "parent": "Public-Plugins", |
| 2040 | "description": "Copies to other servers using the Git protocol" |
| 2041 | }, |
| 2042 | { |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 2043 | "id": "plugins%2Freviewnotes", |
| 2044 | "name": "plugins/reviewnotes", |
| 2045 | "parent": "Public-Plugins", |
| 2046 | "description": "Annotates merged commits using notes on refs/notes/review." |
| 2047 | }, |
| 2048 | { |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 2049 | "id": "plugins%2Fsingleusergroup", |
| 2050 | "name": "plugins/singleusergroup", |
| 2051 | "parent": "Public-Plugins", |
| 2052 | "description": "GroupBackend enabling users to be directly added to access rules" |
| 2053 | }, |
| 2054 | { |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 2055 | "id": "Public-Plugins", |
| 2056 | "name": "Public-Plugins", |
| 2057 | "parent": "Public-Projects", |
| 2058 | "description": "Parent project for plugins/*" |
| 2059 | } |
| 2060 | ] |
| 2061 | ---- |
| 2062 | |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 2063 | [[get-child-project]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2064 | === Get Child Project |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2065 | -- |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 2066 | '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] | 2067 | -- |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 2068 | |
Edwin Kempin | 8a3fb5b | 2013-03-21 15:02:22 +0100 | [diff] [blame] | 2069 | Retrieves a child project. If a non-direct child project should be |
| 2070 | retrieved the parameter `recursive` must be set. |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 2071 | |
| 2072 | .Request |
| 2073 | ---- |
| 2074 | GET /projects/Public-Plugins/children/plugins%2Freplication HTTP/1.0 |
| 2075 | ---- |
| 2076 | |
| 2077 | As response a link:#project-info[ProjectInfo] entity is returned that |
| 2078 | describes the child project. |
| 2079 | |
| 2080 | .Response |
| 2081 | ---- |
| 2082 | HTTP/1.1 200 OK |
| 2083 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2084 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 2085 | |
| 2086 | )]}' |
| 2087 | { |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 2088 | "id": "plugins%2Freplication", |
| 2089 | "name": "plugins/replication", |
| 2090 | "parent": "Public-Plugins", |
| 2091 | "description": "Copies to other servers using the Git protocol" |
| 2092 | } |
| 2093 | ---- |
| 2094 | |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2095 | [[tag-endpoints]] |
| 2096 | == Tag Endpoints |
| 2097 | |
David Pursehouse | 6a44619 | 2016-06-03 10:00:34 +0900 | [diff] [blame] | 2098 | [[create-tag]] |
| 2099 | === Create Tag |
| 2100 | |
| 2101 | -- |
| 2102 | 'PUT /projects/link:#project-name[\{project-name\}]/tags/link:#tag-id[\{tag-id\}]' |
| 2103 | -- |
| 2104 | |
| 2105 | Create a new tag on the project. |
| 2106 | |
| 2107 | In the request body additional data for the tag can be provided as |
| 2108 | link:#tag-input[TagInput]. |
| 2109 | |
| 2110 | If a message is provided in the input, the tag is created as an |
| 2111 | annotated tag with the current user as tagger. Signed tags are not |
| 2112 | supported. |
| 2113 | |
| 2114 | .Request |
| 2115 | ---- |
| 2116 | PUT /projects/MyProject/tags/v1.0 HTTP/1.0 |
| 2117 | Content-Type: application/json; charset=UTF-8 |
| 2118 | |
| 2119 | { |
| 2120 | "message": "annotation", |
| 2121 | "revision": "c83117624b5b5d8a7f86093824e2f9c1ed309d63" |
| 2122 | } |
| 2123 | ---- |
| 2124 | |
| 2125 | As response a link:#tag-info[TagInfo] entity is returned that describes |
| 2126 | the created tag. |
| 2127 | |
| 2128 | .Response |
| 2129 | ---- |
| 2130 | HTTP/1.1 201 Created |
| 2131 | Content-Disposition: attachment |
| 2132 | Content-Type: application/json; charset=UTF-8 |
| 2133 | |
| 2134 | )]}' |
| 2135 | |
| 2136 | "object": "d48d304adc4b6674e11dc2c018ea05fcbdda32fd", |
| 2137 | "message": "annotation", |
| 2138 | "tagger": { |
| 2139 | "name": "David Pursehouse", |
| 2140 | "email": "dpursehouse@collab.net", |
| 2141 | "date": "2016-06-06 01:22:03.000000000", |
| 2142 | "tz": 540 |
| 2143 | }, |
| 2144 | "ref": "refs/tags/v1.0", |
| 2145 | "revision": "c83117624b5b5d8a7f86093824e2f9c1ed309d63" |
| 2146 | } |
| 2147 | ---- |
| 2148 | |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2149 | [[list-tags]] |
| 2150 | === List Tags |
| 2151 | -- |
| 2152 | 'GET /projects/link:#project-name[\{project-name\}]/tags/' |
| 2153 | -- |
| 2154 | |
| 2155 | List the tags of a project. |
| 2156 | |
| 2157 | As result a list of link:#tag-info[TagInfo] entries is returned. |
| 2158 | |
| 2159 | Only includes tags under the `refs/tags/` namespace. |
| 2160 | |
| 2161 | .Request |
| 2162 | ---- |
| 2163 | GET /projects/work%2Fmy-project/tags/ HTTP/1.0 |
| 2164 | ---- |
| 2165 | |
| 2166 | .Response |
| 2167 | ---- |
| 2168 | HTTP/1.1 200 OK |
| 2169 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2170 | Content-Type: application/json; charset=UTF-8 |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2171 | |
| 2172 | )]}' |
| 2173 | [ |
| 2174 | { |
| 2175 | "ref": "refs/tags/v1.0", |
| 2176 | "revision": "49ce77fdcfd3398dc0dedbe016d1a425fd52d666", |
| 2177 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2178 | "message": "Annotated tag", |
| 2179 | "tagger": { |
| 2180 | "name": "David Pursehouse", |
| 2181 | "email": "david.pursehouse@sonymobile.com", |
| 2182 | "date": "2014-10-06 07:35:03.000000000", |
| 2183 | "tz": 540 |
| 2184 | } |
| 2185 | }, |
| 2186 | { |
| 2187 | "ref": "refs/tags/v2.0", |
| 2188 | "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30" |
| 2189 | }, |
| 2190 | { |
| 2191 | "ref": "refs/tags/v3.0", |
| 2192 | "revision": "c628685b3c5a3614571ecb5c8fceb85db9112313", |
| 2193 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2194 | "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-----", |
| 2195 | "tagger": { |
| 2196 | "name": "David Pursehouse", |
| 2197 | "email": "david.pursehouse@sonymobile.com", |
| 2198 | "date": "2014-10-06 09:02:16.000000000", |
| 2199 | "tz": 540 |
| 2200 | } |
| 2201 | } |
| 2202 | ] |
| 2203 | ---- |
| 2204 | |
David Pursehouse | b0ba151 | 2015-09-10 14:17:05 +0900 | [diff] [blame] | 2205 | [[tag-options]] |
| 2206 | ==== Tag Options |
| 2207 | |
| 2208 | Limit(n):: |
| 2209 | Limit the number of tags to be included in the results. |
| 2210 | + |
| 2211 | .Request |
| 2212 | ---- |
| 2213 | GET /projects/work%2Fmy-project/tags?n=2 HTTP/1.0 |
| 2214 | ---- |
| 2215 | + |
| 2216 | .Response |
| 2217 | ---- |
| 2218 | HTTP/1.1 200 OK |
| 2219 | Content-Disposition: attachment |
| 2220 | Content-Type: application/json; charset=UTF-8 |
| 2221 | |
| 2222 | )]}' |
| 2223 | [ |
| 2224 | { |
| 2225 | "ref": "refs/tags/v1.0", |
| 2226 | "revision": "49ce77fdcfd3398dc0dedbe016d1a425fd52d666", |
| 2227 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2228 | "message": "Annotated tag", |
| 2229 | "tagger": { |
| 2230 | "name": "David Pursehouse", |
| 2231 | "email": "david.pursehouse@sonymobile.com", |
| 2232 | "date": "2014-10-06 07:35:03.000000000", |
| 2233 | "tz": 540 |
| 2234 | } |
| 2235 | }, |
| 2236 | { |
| 2237 | "ref": "refs/tags/v2.0", |
| 2238 | "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30" |
| 2239 | } |
| 2240 | ] |
| 2241 | ---- |
| 2242 | |
David Pursehouse | 5cb3819 | 2017-07-28 16:11:33 +0100 | [diff] [blame] | 2243 | Skip(S):: |
David Pursehouse | b0ba151 | 2015-09-10 14:17:05 +0900 | [diff] [blame] | 2244 | Skip the given number of tags from the beginning of the list. |
| 2245 | + |
| 2246 | .Request |
| 2247 | ---- |
| 2248 | GET /projects/work%2Fmy-project/tags?n=2&s=1 HTTP/1.0 |
| 2249 | ---- |
| 2250 | + |
| 2251 | .Response |
| 2252 | ---- |
| 2253 | HTTP/1.1 200 OK |
| 2254 | Content-Disposition: attachment |
| 2255 | Content-Type: application/json; charset=UTF-8 |
| 2256 | |
| 2257 | )]}' |
| 2258 | [ |
| 2259 | { |
| 2260 | "ref": "refs/tags/v2.0", |
| 2261 | "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30" |
| 2262 | }, |
| 2263 | { |
| 2264 | "ref": "refs/tags/v3.0", |
| 2265 | "revision": "c628685b3c5a3614571ecb5c8fceb85db9112313", |
| 2266 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2267 | "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-----", |
| 2268 | "tagger": { |
| 2269 | "name": "David Pursehouse", |
| 2270 | "email": "david.pursehouse@sonymobile.com", |
| 2271 | "date": "2014-10-06 09:02:16.000000000", |
| 2272 | "tz": 540 |
| 2273 | } |
| 2274 | } |
| 2275 | ] |
| 2276 | ---- |
| 2277 | |
David Pursehouse | cf1ed06 | 2017-07-13 10:05:43 +0900 | [diff] [blame] | 2278 | Substring(m):: |
| 2279 | Limit the results to those tags that match the specified substring. |
| 2280 | + |
David Pursehouse | 16a1a4b | 2017-07-13 10:22:28 +0900 | [diff] [blame] | 2281 | The match is case insensitive. May not be used together with `r`. |
David Pursehouse | cf1ed06 | 2017-07-13 10:05:43 +0900 | [diff] [blame] | 2282 | + |
| 2283 | List all tags that match substring `v2`: |
| 2284 | |
| 2285 | + |
| 2286 | .Request |
| 2287 | ---- |
| 2288 | GET /projects/testproject/tags?m=v2 HTTP/1.0 |
| 2289 | ---- |
| 2290 | + |
| 2291 | .Response |
| 2292 | ---- |
| 2293 | HTTP/1.1 200 OK |
| 2294 | Content-Disposition: attachment |
| 2295 | Content-Type: application/json; charset=UTF-8 |
| 2296 | |
| 2297 | )]}' |
| 2298 | [ |
| 2299 | { |
| 2300 | "ref": "refs/tags/v2.0", |
| 2301 | "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30" |
| 2302 | }, |
| 2303 | ] |
| 2304 | ---- |
| 2305 | |
| 2306 | Regex(r):: |
| 2307 | Limit the results to those tags that match the specified regex. |
| 2308 | Boundary matchers '^' and '$' are implicit. For example: the regex 't*' will |
| 2309 | match any tags that start with 't' and regex '*t' will match any |
| 2310 | tags that end with 't'. |
| 2311 | + |
David Pursehouse | 16a1a4b | 2017-07-13 10:22:28 +0900 | [diff] [blame] | 2312 | The match is case sensitive. May not be used together with `m`. |
David Pursehouse | f648e04 | 2017-07-13 10:08:46 +0900 | [diff] [blame] | 2313 | + |
David Pursehouse | cf1ed06 | 2017-07-13 10:05:43 +0900 | [diff] [blame] | 2314 | List all tags that match regex `v.*0`: |
| 2315 | + |
| 2316 | .Request |
| 2317 | ---- |
| 2318 | GET /projects/testproject/tags?r=v.*0 HTTP/1.0 |
| 2319 | ---- |
| 2320 | + |
| 2321 | .Response |
| 2322 | ---- |
| 2323 | HTTP/1.1 200 OK |
| 2324 | Content-Disposition: attachment |
| 2325 | Content-Type: application/json; charset=UTF-8 |
| 2326 | |
| 2327 | )]}' |
| 2328 | [ |
| 2329 | { |
| 2330 | "ref": "refs/tags/v1.0", |
| 2331 | "revision": "49ce77fdcfd3398dc0dedbe016d1a425fd52d666", |
| 2332 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2333 | "message": "Annotated tag", |
| 2334 | "tagger": { |
| 2335 | "name": "David Pursehouse", |
| 2336 | "email": "david.pursehouse@sonymobile.com", |
| 2337 | "date": "2014-10-06 07:35:03.000000000", |
| 2338 | "tz": 540 |
| 2339 | } |
| 2340 | }, |
| 2341 | { |
| 2342 | "ref": "refs/tags/v2.0", |
| 2343 | "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30" |
| 2344 | }, |
| 2345 | { |
| 2346 | "ref": "refs/tags/v3.0", |
| 2347 | "revision": "c628685b3c5a3614571ecb5c8fceb85db9112313", |
| 2348 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2349 | "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-----", |
| 2350 | "tagger": { |
| 2351 | "name": "David Pursehouse", |
| 2352 | "email": "david.pursehouse@sonymobile.com", |
| 2353 | "date": "2014-10-06 09:02:16.000000000", |
| 2354 | "tz": 540 |
| 2355 | } |
| 2356 | } |
| 2357 | ] |
| 2358 | ---- |
David Pursehouse | b0ba151 | 2015-09-10 14:17:05 +0900 | [diff] [blame] | 2359 | |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2360 | [[get-tag]] |
| 2361 | === Get Tag |
| 2362 | -- |
| 2363 | 'GET /projects/link:#project-name[\{project-name\}]/tags/link:#tag-id[\{tag-id\}]' |
| 2364 | -- |
| 2365 | |
| 2366 | Retrieves a tag of a project. |
| 2367 | |
| 2368 | .Request |
| 2369 | ---- |
| 2370 | GET /projects/work%2Fmy-project/tags/v1.0 HTTP/1.0 |
| 2371 | ---- |
| 2372 | |
| 2373 | As response a link:#tag-info[TagInfo] entity is returned that describes the tag. |
| 2374 | |
| 2375 | .Response |
| 2376 | ---- |
| 2377 | HTTP/1.1 200 OK |
| 2378 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2379 | Content-Type: application/json; charset=UTF-8 |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2380 | |
| 2381 | )]}' |
| 2382 | { |
| 2383 | "ref": "refs/tags/v1.0", |
| 2384 | "revision": "49ce77fdcfd3398dc0dedbe016d1a425fd52d666", |
| 2385 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2386 | "message": "Annotated tag", |
| 2387 | "tagger": { |
| 2388 | "name": "David Pursehouse", |
| 2389 | "email": "david.pursehouse@sonymobile.com", |
| 2390 | "date": "2014-10-06 07:35:03.000000000", |
| 2391 | "tz": 540 |
| 2392 | } |
| 2393 | } |
| 2394 | ---- |
| 2395 | |
David Pursehouse | e113216 | 2016-11-30 20:42:33 +0900 | [diff] [blame] | 2396 | [[delete-tag]] |
| 2397 | === Delete Tag |
| 2398 | -- |
| 2399 | 'DELETE /projects/link:#project-name[\{project-name\}]/tags/link:#tag-id[\{tag-id\}]' |
| 2400 | -- |
| 2401 | |
| 2402 | Deletes a tag. |
| 2403 | |
| 2404 | .Request |
| 2405 | ---- |
| 2406 | DELETE /projects/MyProject/tags/v1.0 HTTP/1.0 |
| 2407 | ---- |
| 2408 | |
| 2409 | .Response |
| 2410 | ---- |
| 2411 | HTTP/1.1 204 No Content |
| 2412 | ---- |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2413 | |
David Pursehouse | 467aecb | 2016-12-02 14:18:42 +0900 | [diff] [blame] | 2414 | [[delete-tags]] |
| 2415 | === Delete Tags |
| 2416 | -- |
| 2417 | 'POST /projects/link:#project-name[\{project-name\}]/tags:delete' |
| 2418 | -- |
| 2419 | |
| 2420 | Delete one or more tags. |
| 2421 | |
| 2422 | The tags to be deleted must be provided in the request body as a |
| 2423 | link:#delete-tags-input[DeleteTagsInput] entity. |
| 2424 | |
| 2425 | .Request |
| 2426 | ---- |
| 2427 | POST /projects/MyProject/tags:delete HTTP/1.0 |
| 2428 | Content-Type: application/json;charset=UTF-8 |
| 2429 | |
| 2430 | { |
| 2431 | "tags": [ |
| 2432 | "v1.0", |
| 2433 | "v2.0" |
| 2434 | ] |
| 2435 | } |
| 2436 | ---- |
| 2437 | |
| 2438 | .Response |
| 2439 | ---- |
| 2440 | HTTP/1.1 204 No Content |
| 2441 | ---- |
| 2442 | |
| 2443 | If some tags could not be deleted, the response is "`409 Conflict`" and the |
| 2444 | error message is contained in the response body. |
| 2445 | |
Edwin Kempin | 1b99360 | 2014-07-08 16:18:45 +0200 | [diff] [blame] | 2446 | [[commit-endpoints]] |
| 2447 | == Commit Endpoints |
| 2448 | |
| 2449 | [[get-commit]] |
| 2450 | === Get Commit |
| 2451 | -- |
| 2452 | 'GET /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]' |
| 2453 | -- |
| 2454 | |
| 2455 | Retrieves a commit of a project. |
| 2456 | |
| 2457 | The commit must be visible to the caller. |
| 2458 | |
| 2459 | .Request |
| 2460 | ---- |
| 2461 | GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96 HTTP/1.0 |
| 2462 | ---- |
| 2463 | |
| 2464 | As response a link:rest-api-changes.html#commit-info[CommitInfo] entity |
| 2465 | is returned that describes the commit. |
| 2466 | |
| 2467 | .Response |
| 2468 | ---- |
| 2469 | HTTP/1.1 200 OK |
| 2470 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2471 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 1b99360 | 2014-07-08 16:18:45 +0200 | [diff] [blame] | 2472 | |
| 2473 | )]}' |
| 2474 | { |
| 2475 | "commit": "184ebe53805e102605d11f6b143486d15c23a09c", |
| 2476 | "parents": [ |
| 2477 | { |
| 2478 | "commit": "1eee2c9d8f352483781e772f35dc586a69ff5646", |
| 2479 | "subject": "Migrate contributor agreements to All-Projects." |
| 2480 | } |
| 2481 | ], |
| 2482 | "author": { |
| 2483 | "name": "Shawn O. Pearce", |
| 2484 | "email": "sop@google.com", |
| 2485 | "date": "2012-04-24 18:08:08.000000000", |
| 2486 | "tz": -420 |
| 2487 | }, |
| 2488 | "committer": { |
| 2489 | "name": "Shawn O. Pearce", |
| 2490 | "email": "sop@google.com", |
| 2491 | "date": "2012-04-24 18:08:08.000000000", |
| 2492 | "tz": -420 |
| 2493 | }, |
| 2494 | "subject": "Use an EventBus to manage star icons", |
| 2495 | "message": "Use an EventBus to manage star icons\n\nImage widgets that need to ..." |
| 2496 | } |
| 2497 | ---- |
| 2498 | |
Gustaf Lundh | 1386d59 | 2016-10-19 23:19:08 +0200 | [diff] [blame] | 2499 | [[get-included-in]] |
| 2500 | === Get Included In |
| 2501 | -- |
| 2502 | 'GET /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]/in' |
| 2503 | -- |
| 2504 | |
| 2505 | Retrieves the branches and tags in which a change is included. As result |
| 2506 | an link:rest-api-changes.html#included-in-info[IncludedInInfo] entity is returned. |
| 2507 | |
| 2508 | .Request |
| 2509 | ---- |
| 2510 | GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96/in HTTP/1.0 |
| 2511 | ---- |
| 2512 | |
| 2513 | .Response |
| 2514 | ---- |
| 2515 | HTTP/1.1 200 OK |
| 2516 | Content-Disposition: attachment |
| 2517 | Content-Type: application/json;charset=UTF-8 |
| 2518 | |
| 2519 | )]}' |
| 2520 | { |
| 2521 | "branches": [ |
| 2522 | "master" |
| 2523 | ], |
| 2524 | "tags": [] |
| 2525 | } |
| 2526 | ---- |
| 2527 | |
Zhen Chen | d1462d8 | 2016-05-12 13:55:37 -0700 | [diff] [blame] | 2528 | [[get-content-from-commit]] |
Edwin Kempin | 6f7410a | 2014-07-09 15:46:22 +0200 | [diff] [blame] | 2529 | === Get Content |
| 2530 | -- |
| 2531 | 'GET /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]/files/link:rest-api-changes.html#file-id[\{file-id\}]/content' |
| 2532 | -- |
| 2533 | |
| 2534 | Gets the content of a file from a certain commit. |
| 2535 | |
| 2536 | .Request |
| 2537 | ---- |
| 2538 | GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/content HTTP/1.0 |
| 2539 | ---- |
| 2540 | |
| 2541 | The content is returned as base64 encoded string. |
| 2542 | |
| 2543 | .Response |
| 2544 | ---- |
| 2545 | HTTP/1.1 200 OK |
| 2546 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2547 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | 6f7410a | 2014-07-09 15:46:22 +0200 | [diff] [blame] | 2548 | |
| 2549 | Ly8gQ29weXJpZ2h0IChDKSAyMDEwIFRoZSBBbmRyb2lkIE9wZW4gU291cmNlIFByb2plY... |
| 2550 | ---- |
| 2551 | |
Changcheng Xiao | 9d2ec04 | 2017-03-22 17:16:57 +0100 | [diff] [blame] | 2552 | |
| 2553 | [[cherry-pick-commit]] |
| 2554 | === Cherry Pick Commit |
| 2555 | -- |
| 2556 | 'POST /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]/cherrypick' |
| 2557 | -- |
| 2558 | |
| 2559 | Cherry-picks a commit of a project to a destination branch. |
| 2560 | |
Changcheng Xiao | 54b6c0c | 2017-10-23 14:57:42 +0200 | [diff] [blame] | 2561 | To cherry pick a change revision, see link:rest-api-changes.html#cherry-pick[CherryPick]. |
| 2562 | |
Changcheng Xiao | 9d2ec04 | 2017-03-22 17:16:57 +0100 | [diff] [blame] | 2563 | The destination branch must be provided in the request body inside a |
| 2564 | link:rest-api-changes.html#cherrypick-input[CherryPickInput] entity. |
| 2565 | If the commit message is not set, the commit message of the source |
| 2566 | commit will be used. |
| 2567 | |
| 2568 | .Request |
| 2569 | ---- |
| 2570 | POST /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96/cherrypick HTTP/1.0 |
| 2571 | Content-Type: application/json; charset=UTF-8 |
| 2572 | |
| 2573 | { |
| 2574 | "message" : "Implementing Feature X", |
| 2575 | "destination" : "release-branch" |
| 2576 | } |
| 2577 | ---- |
| 2578 | |
Edwin Kempin | aab27d3 | 2020-01-29 13:17:04 +0100 | [diff] [blame] | 2579 | As response a link:rest-api-changes.html#change-info[ChangeInfo] entity |
| 2580 | is returned that describes the resulting cherry-picked change. |
Changcheng Xiao | 9d2ec04 | 2017-03-22 17:16:57 +0100 | [diff] [blame] | 2581 | |
| 2582 | .Response |
| 2583 | ---- |
| 2584 | HTTP/1.1 200 OK |
| 2585 | Content-Disposition: attachment |
| 2586 | Content-Type: application/json; charset=UTF-8 |
| 2587 | |
| 2588 | )]}' |
| 2589 | { |
| 2590 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 2591 | "project": "myProject", |
| 2592 | "branch": "release-branch", |
| 2593 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 2594 | "subject": "Implementing Feature X", |
| 2595 | "status": "NEW", |
| 2596 | "created": "2013-02-01 09:59:32.126000000", |
| 2597 | "updated": "2013-02-21 11:16:36.775000000", |
| 2598 | "mergeable": true, |
| 2599 | "insertions": 12, |
| 2600 | "deletions": 11, |
| 2601 | "_number": 3965, |
| 2602 | "owner": { |
| 2603 | "name": "John Doe" |
| 2604 | } |
| 2605 | } |
| 2606 | ---- |
| 2607 | |
Makson Lee | 7824f30 | 2018-07-20 10:33:56 +0800 | [diff] [blame] | 2608 | [[list-files]] |
| 2609 | === List Files |
| 2610 | -- |
| 2611 | 'GET /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]/files/' |
| 2612 | -- |
| 2613 | |
| 2614 | Lists the files that were modified, added or deleted in a commit. |
| 2615 | |
| 2616 | .Request |
| 2617 | ---- |
| 2618 | GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96/files/ HTTP/1.0 |
| 2619 | ---- |
| 2620 | |
| 2621 | As result a map is returned that maps the link:rest-api-changes.html#file-id[file path] to a |
| 2622 | link:rest-api-changes.html#file-info[FileInfo] entry. The entries in the map are |
| 2623 | sorted by file path. |
| 2624 | |
| 2625 | .Response |
| 2626 | ---- |
| 2627 | HTTP/1.1 200 OK |
| 2628 | Content-Disposition: attachment |
| 2629 | Content-Type: application/json; charset=UTF-8 |
| 2630 | |
| 2631 | )]}' |
| 2632 | { |
| 2633 | "/COMMIT_MSG": { |
| 2634 | "status": "A", |
| 2635 | "lines_inserted": 7, |
| 2636 | "size_delta": 551, |
| 2637 | "size": 551 |
| 2638 | }, |
| 2639 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": { |
| 2640 | "lines_inserted": 5, |
| 2641 | "lines_deleted": 3, |
| 2642 | "size_delta": 98, |
| 2643 | "size": 23348 |
| 2644 | } |
| 2645 | } |
| 2646 | ---- |
| 2647 | |
| 2648 | The integer-valued request parameter `parent` changes the response to return a |
| 2649 | list of the files which are different in this commit compared to the given |
| 2650 | parent commit. This is useful for supporting review of merge commits. The value |
| 2651 | is the 1-based index of the parent's position in the commit object. |
| 2652 | |
Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 2653 | [[dashboard-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2654 | == Dashboard Endpoints |
Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 2655 | |
Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 2656 | [[list-dashboards]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2657 | === List Dashboards |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2658 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2659 | 'GET /projects/link:#project-name[\{project-name\}]/dashboards/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2660 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2661 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2662 | List custom dashboards for a project. |
| 2663 | |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 2664 | As result a list of link:#dashboard-info[DashboardInfo] entries is |
| 2665 | returned. |
| 2666 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2667 | List all dashboards for the `work/my-project` project: |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2668 | |
| 2669 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2670 | ---- |
| 2671 | GET /projects/work%2Fmy-project/dashboards/ HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2672 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2673 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2674 | .Response |
| 2675 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2676 | HTTP/1.1 200 OK |
| 2677 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2678 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2679 | |
| 2680 | )]}' |
| 2681 | [ |
| 2682 | { |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2683 | "id": "main:closed", |
| 2684 | "ref": "main", |
| 2685 | "path": "closed", |
| 2686 | "description": "Merged and abandoned changes in last 7 weeks", |
| 2687 | "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] | 2688 | "is_default": true, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2689 | "title": "Closed changes", |
| 2690 | "sections": [ |
| 2691 | { |
| 2692 | "name": "Merged", |
| 2693 | "query": "status:merged age:7w" |
| 2694 | }, |
| 2695 | { |
| 2696 | "name": "Abandoned", |
| 2697 | "query": "status:abandoned age:7w" |
| 2698 | } |
| 2699 | ] |
| 2700 | } |
| 2701 | ] |
| 2702 | ---- |
| 2703 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 2704 | .Get all dashboards of the 'All-Projects' project |
| 2705 | **** |
| 2706 | get::/projects/All-Projects/dashboards/ |
| 2707 | **** |
| 2708 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2709 | [[get-dashboard]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2710 | === Get Dashboard |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2711 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2712 | '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] | 2713 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2714 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2715 | Retrieves a project dashboard. The dashboard can be defined on that |
| 2716 | project or be inherited from a parent project. |
| 2717 | |
| 2718 | .Request |
| 2719 | ---- |
| 2720 | GET /projects/work%2Fmy-project/dashboards/main:closed HTTP/1.0 |
| 2721 | ---- |
| 2722 | |
| 2723 | As response a link:#dashboard-info[DashboardInfo] entity is returned |
| 2724 | that describes the dashboard. |
| 2725 | |
| 2726 | .Response |
| 2727 | ---- |
| 2728 | HTTP/1.1 200 OK |
| 2729 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2730 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2731 | |
| 2732 | )]}' |
| 2733 | { |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2734 | "id": "main:closed", |
| 2735 | "ref": "main", |
| 2736 | "path": "closed", |
| 2737 | "description": "Merged and abandoned changes in last 7 weeks", |
| 2738 | "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] | 2739 | "is_default": true, |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2740 | "title": "Closed changes", |
| 2741 | "sections": [ |
| 2742 | { |
| 2743 | "name": "Merged", |
| 2744 | "query": "status:merged age:7w" |
| 2745 | }, |
| 2746 | { |
| 2747 | "name": "Abandoned", |
| 2748 | "query": "status:abandoned age:7w" |
| 2749 | } |
| 2750 | ] |
| 2751 | } |
| 2752 | ---- |
| 2753 | |
| 2754 | To retrieve the default dashboard of a project use `default` as |
| 2755 | dashboard-id. |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2756 | |
| 2757 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2758 | ---- |
| 2759 | GET /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2760 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2761 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2762 | .Response |
| 2763 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2764 | HTTP/1.1 200 OK |
| 2765 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2766 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2767 | |
| 2768 | )]}' |
| 2769 | { |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2770 | "id": "main:closed", |
| 2771 | "ref": "main", |
| 2772 | "path": "closed", |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2773 | "description": "Merged and abandoned changes in last 7 weeks", |
| 2774 | "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] | 2775 | "is_default": true, |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2776 | "title": "Closed changes", |
| 2777 | "sections": [ |
| 2778 | { |
| 2779 | "name": "Merged", |
| 2780 | "query": "status:merged age:7w" |
| 2781 | }, |
| 2782 | { |
| 2783 | "name": "Abandoned", |
| 2784 | "query": "status:abandoned age:7w" |
| 2785 | } |
| 2786 | ] |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2787 | } |
| 2788 | ---- |
| 2789 | |
Edwin Kempin | 339cb31 | 2019-08-05 15:59:58 +0200 | [diff] [blame] | 2790 | [[create-dashboard]] |
| 2791 | === Create Dashboard |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2792 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2793 | '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] | 2794 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2795 | |
Edwin Kempin | 339cb31 | 2019-08-05 15:59:58 +0200 | [diff] [blame] | 2796 | Creates a project dashboard, if a project dashboard with the given |
| 2797 | dashboard ID doesn't exist yet. |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2798 | |
| 2799 | Currently only supported for the `default` dashboard. |
| 2800 | |
Edwin Kempin | 339cb31 | 2019-08-05 15:59:58 +0200 | [diff] [blame] | 2801 | The creation information for the dashboard must be provided in |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2802 | the request body as a link:#dashboard-input[DashboardInput] entity. |
| 2803 | |
| 2804 | .Request |
| 2805 | ---- |
| 2806 | PUT /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2807 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2808 | |
| 2809 | { |
| 2810 | "id": "main:closed", |
| 2811 | "commit_message": "Define the default dashboard" |
| 2812 | } |
| 2813 | ---- |
| 2814 | |
Edwin Kempin | 339cb31 | 2019-08-05 15:59:58 +0200 | [diff] [blame] | 2815 | As response the new dashboard is returned as a link:#dashboard-info[ |
| 2816 | DashboardInfo] entity. |
| 2817 | |
| 2818 | .Response |
| 2819 | ---- |
| 2820 | HTTP/1.1 201 Created |
| 2821 | Content-Disposition: attachment |
| 2822 | Content-Type: application/json; charset=UTF-8 |
| 2823 | |
| 2824 | )]}' |
| 2825 | { |
| 2826 | "id": "main:closed", |
| 2827 | "ref": "main", |
| 2828 | "path": "closed", |
| 2829 | "description": "Merged and abandoned changes in last 7 weeks", |
| 2830 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 2831 | "is_default": true, |
| 2832 | "title": "Closed changes", |
| 2833 | "sections": [ |
| 2834 | { |
| 2835 | "name": "Merged", |
| 2836 | "query": "status:merged age:7w" |
| 2837 | }, |
| 2838 | { |
| 2839 | "name": "Abandoned", |
| 2840 | "query": "status:abandoned age:7w" |
| 2841 | } |
| 2842 | ] |
| 2843 | } |
| 2844 | ---- |
| 2845 | |
| 2846 | [[update-dashboard]] |
| 2847 | === Update Dashboard |
| 2848 | -- |
| 2849 | 'PUT /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]' |
| 2850 | -- |
| 2851 | |
| 2852 | Updates a project dashboard, if a project dashboard with the given |
| 2853 | dashboard ID already exists. |
| 2854 | |
| 2855 | Currently only supported for the `default` dashboard. |
| 2856 | |
| 2857 | The update information for the dashboard must be provided in |
| 2858 | the request body as a link:#dashboard-input[DashboardInput] entity. |
| 2859 | |
| 2860 | .Request |
| 2861 | ---- |
| 2862 | PUT /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| 2863 | Content-Type: application/json; charset=UTF-8 |
| 2864 | |
| 2865 | { |
| 2866 | "id": "main:closed", |
| 2867 | "commit_message": "Update the default dashboard" |
| 2868 | } |
| 2869 | ---- |
| 2870 | |
| 2871 | As response the updated dashboard is returned as a |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2872 | link:#dashboard-info[DashboardInfo] entity. |
| 2873 | |
| 2874 | .Response |
| 2875 | ---- |
| 2876 | HTTP/1.1 200 OK |
| 2877 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2878 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2879 | |
| 2880 | )]}' |
| 2881 | { |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2882 | "id": "main:closed", |
| 2883 | "ref": "main", |
| 2884 | "path": "closed", |
| 2885 | "description": "Merged and abandoned changes in last 7 weeks", |
| 2886 | "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] | 2887 | "is_default": true, |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2888 | "title": "Closed changes", |
| 2889 | "sections": [ |
| 2890 | { |
| 2891 | "name": "Merged", |
| 2892 | "query": "status:merged age:7w" |
| 2893 | }, |
| 2894 | { |
| 2895 | "name": "Abandoned", |
| 2896 | "query": "status:abandoned age:7w" |
| 2897 | } |
| 2898 | ] |
| 2899 | } |
| 2900 | ---- |
| 2901 | |
| 2902 | [[delete-dashboard]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2903 | === Delete Dashboard |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2904 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2905 | '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] | 2906 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2907 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2908 | Deletes a project dashboard. |
| 2909 | |
| 2910 | Currently only supported for the `default` dashboard. |
| 2911 | |
Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 2912 | The request body does not need to include a link:#dashboard-input[ |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 2913 | DashboardInput] entity if no commit message is specified. |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2914 | |
| 2915 | Please note that some proxies prohibit request bodies for DELETE |
| 2916 | requests. |
| 2917 | |
| 2918 | .Request |
| 2919 | ---- |
| 2920 | DELETE /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| 2921 | ---- |
| 2922 | |
| 2923 | .Response |
| 2924 | ---- |
| 2925 | HTTP/1.1 204 No Content |
| 2926 | ---- |
| 2927 | |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 2928 | [[label-endpoints]] |
| 2929 | == Label Endpoints |
| 2930 | |
| 2931 | [[list-labels]] |
| 2932 | === List Labels |
| 2933 | -- |
| 2934 | 'GET /projects/link:#project-name[\{project-name\}]/labels/' |
| 2935 | -- |
| 2936 | |
| 2937 | Lists the labels that are defined in this project. |
| 2938 | |
| 2939 | The calling user must have read access to the `refs/meta/config` branch of the |
| 2940 | project. |
| 2941 | |
| 2942 | .Request |
| 2943 | ---- |
| 2944 | GET /projects/All-Projects/labels/ HTTP/1.0 |
| 2945 | ---- |
| 2946 | |
| 2947 | As result a list of link:#label-definition-info[LabelDefinitionInfo] entities |
| 2948 | is returned that describe the labels that are defined in this project |
Edwin Kempin | b527526 | 2019-10-24 16:03:27 +0200 | [diff] [blame] | 2949 | (inherited labels are not returned unless the `inherited` parameter is set, see |
| 2950 | link:#list-with-inherited-labels[below]). The returned labels are sorted by |
| 2951 | label name. |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 2952 | |
| 2953 | .Response |
| 2954 | ---- |
| 2955 | HTTP/1.1 200 OK |
| 2956 | Content-Disposition: attachment |
| 2957 | Content-Type: application/json; charset=UTF-8 |
| 2958 | |
| 2959 | )]}' |
| 2960 | [ |
| 2961 | { |
| 2962 | "name": "Code-Review", |
Edwin Kempin | b527526 | 2019-10-24 16:03:27 +0200 | [diff] [blame] | 2963 | "project": "All-Projects", |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 2964 | "function": "MaxWithBlock", |
| 2965 | "values": { |
| 2966 | " 0": "No score", |
| 2967 | "-1": "I would prefer this is not merged as is", |
| 2968 | "-2": "This shall not be merged", |
| 2969 | "+1": "Looks good to me, but someone else must approve", |
| 2970 | "+2": "Looks good to me, approved" |
| 2971 | }, |
| 2972 | "default_value": 0, |
| 2973 | "can_override": true, |
| 2974 | "copy_min_score": true, |
| 2975 | "copy_all_scores_if_no_change": true, |
| 2976 | "copy_all_scores_on_trivial_rebase": true, |
| 2977 | "allow_post_submit": true |
| 2978 | } |
| 2979 | ] |
| 2980 | ---- |
| 2981 | |
Edwin Kempin | b527526 | 2019-10-24 16:03:27 +0200 | [diff] [blame] | 2982 | [[list-with-inherited-labels]] |
| 2983 | To include inherited labels from all parent projects the parameter `inherited` |
| 2984 | can be set. |
| 2985 | |
| 2986 | The calling user must have read access to the `refs/meta/config` branch of the |
| 2987 | project and all its parent projects. |
| 2988 | |
| 2989 | .Request |
| 2990 | ---- |
| 2991 | GET /projects/My-Project/labels/?inherited HTTP/1.0 |
| 2992 | ---- |
| 2993 | |
| 2994 | As result a list of link:#label-definition-info[LabelDefinitionInfo] entities |
| 2995 | is returned that describe the labels that are defined in this project and in |
| 2996 | all its parent projects. The returned labels are sorted by parent projects |
| 2997 | in-order from `All-Projects` through the project hierarchy to this project. |
| 2998 | Labels that belong to the same project are sorted by label name. |
| 2999 | |
| 3000 | .Response |
| 3001 | ---- |
| 3002 | HTTP/1.1 200 OK |
| 3003 | Content-Disposition: attachment |
| 3004 | Content-Type: application/json; charset=UTF-8 |
| 3005 | |
| 3006 | )]}' |
| 3007 | [ |
| 3008 | { |
| 3009 | "name": "Code-Review", |
| 3010 | "project": "All-Projects", |
| 3011 | "function": "MaxWithBlock", |
| 3012 | "values": { |
| 3013 | " 0": "No score", |
| 3014 | "-1": "I would prefer this is not merged as is", |
| 3015 | "-2": "This shall not be merged", |
| 3016 | "+1": "Looks good to me, but someone else must approve", |
| 3017 | "+2": "Looks good to me, approved" |
| 3018 | }, |
| 3019 | "default_value": 0, |
| 3020 | "can_override": true, |
| 3021 | "copy_min_score": true, |
| 3022 | "copy_all_scores_if_no_change": true, |
| 3023 | "copy_all_scores_on_trivial_rebase": true, |
| 3024 | "allow_post_submit": true |
| 3025 | }, |
| 3026 | { |
| 3027 | "name": "Foo-Review", |
| 3028 | "project": "My-Project", |
| 3029 | "function": "MaxWithBlock", |
| 3030 | "values": { |
| 3031 | " 0": "No score", |
| 3032 | "-1": "I would prefer this is not merged as is", |
| 3033 | "-2": "This shall not be merged", |
| 3034 | "+1": "Looks good to me, but someone else must approve", |
| 3035 | "+2": "Looks good to me, approved" |
| 3036 | }, |
| 3037 | "default_value": 0, |
| 3038 | "can_override": true, |
| 3039 | "copy_any_score": true, |
| 3040 | "allow_post_submit": true |
| 3041 | } |
| 3042 | ] |
| 3043 | ---- |
| 3044 | |
Edwin Kempin | aa56f44 | 2019-10-25 08:40:24 +0200 | [diff] [blame] | 3045 | [[get-label]] |
| 3046 | === Get Label |
| 3047 | -- |
| 3048 | 'GET /projects/link:#project-name[\{project-name\}]/labels/link:#label-name[\{label-name\}]' |
| 3049 | -- |
| 3050 | |
| 3051 | Retrieves the definition of a label that is defined in this project. |
| 3052 | |
| 3053 | The calling user must have read access to the `refs/meta/config` branch of the |
| 3054 | project. |
| 3055 | |
| 3056 | .Request |
| 3057 | ---- |
| 3058 | GET /projects/All-Projects/labels/Code-Review HTTP/1.0 |
| 3059 | ---- |
| 3060 | |
| 3061 | As response a link:#label-definition-info[LabelDefinitionInfo] entity is |
| 3062 | returned that describes the label. |
| 3063 | |
| 3064 | .Response |
| 3065 | ---- |
| 3066 | HTTP/1.1 200 OK |
| 3067 | Content-Disposition: attachment |
| 3068 | Content-Type: application/json; charset=UTF-8 |
| 3069 | |
| 3070 | )]}' |
| 3071 | { |
| 3072 | "name": "Code-Review", |
| 3073 | "project": "All-Projects", |
| 3074 | "function": "MaxWithBlock", |
| 3075 | "values": { |
| 3076 | " 0": "No score", |
| 3077 | "-1": "I would prefer this is not merged as is", |
| 3078 | "-2": "This shall not be merged", |
| 3079 | "+1": "Looks good to me, but someone else must approve", |
| 3080 | "+2": "Looks good to me, approved" |
| 3081 | }, |
| 3082 | "default_value": 0, |
| 3083 | "can_override": true, |
| 3084 | "copy_min_score": true, |
| 3085 | "copy_all_scores_if_no_change": true, |
| 3086 | "copy_all_scores_on_trivial_rebase": true, |
| 3087 | "allow_post_submit": true |
| 3088 | } |
| 3089 | ---- |
| 3090 | |
Edwin Kempin | a020d26 | 2019-10-25 16:36:45 +0200 | [diff] [blame] | 3091 | [[create-label]] |
| 3092 | === Create Label |
| 3093 | -- |
| 3094 | 'PUT /projects/link:#project-name[\{project-name\}]/labels/link:#label-name[\{label-name\}]' |
| 3095 | -- |
| 3096 | |
| 3097 | Creates a new label definition in this project. |
| 3098 | |
| 3099 | The calling user must have write access to the `refs/meta/config` branch of the |
| 3100 | project. |
| 3101 | |
| 3102 | If a label with this name is already defined in this project, this label |
| 3103 | definition is updated (see link:#set-label[Set Label]). |
| 3104 | |
| 3105 | .Request |
| 3106 | ---- |
| 3107 | PUT /projects/My-Project/labels/Foo HTTP/1.0 |
| 3108 | Content-Type: application/json; charset=UTF-8 |
| 3109 | |
| 3110 | { |
| 3111 | "commit_message": "Create Foo Label", |
| 3112 | "values": { |
| 3113 | " 0": "No score", |
| 3114 | "-1": "I would prefer this is not merged as is", |
| 3115 | "-2": "This shall not be merged", |
| 3116 | "+1": "Looks good to me, but someone else must approve", |
| 3117 | "+2": "Looks good to me, approved" |
| 3118 | } |
| 3119 | } |
| 3120 | ---- |
| 3121 | |
| 3122 | As response a link:#label-definition-info[LabelDefinitionInfo] entity is |
| 3123 | returned that describes the created label. |
| 3124 | |
| 3125 | .Response |
| 3126 | ---- |
| 3127 | HTTP/1.1 200 OK |
| 3128 | Content-Disposition: attachment |
| 3129 | Content-Type: application/json; charset=UTF-8 |
| 3130 | |
| 3131 | )]}' |
| 3132 | { |
| 3133 | "name": "Foo", |
| 3134 | "project_name": "My-Project", |
| 3135 | "function": "MaxWithBlock", |
| 3136 | "values": { |
| 3137 | " 0": "No score", |
| 3138 | "-1": "I would prefer this is not merged as is", |
| 3139 | "-2": "This shall not be merged", |
| 3140 | "+1": "Looks good to me, but someone else must approve", |
| 3141 | "+2": "Looks good to me, approved" |
| 3142 | }, |
| 3143 | "default_value": 0, |
| 3144 | "can_override": true, |
| 3145 | "copy_all_scores_if_no_change": true, |
| 3146 | "allow_post_submit": true |
| 3147 | } |
| 3148 | ---- |
| 3149 | |
Edwin Kempin | b5e8745 | 2019-10-25 13:28:46 +0200 | [diff] [blame] | 3150 | [[set-label]] |
| 3151 | === Set Label |
| 3152 | -- |
| 3153 | 'PUT /projects/link:#project-name[\{project-name\}]/labels/link:#label-name[\{label-name\}]' |
| 3154 | -- |
| 3155 | |
| 3156 | Updates the definition of a label that is defined in this project. |
| 3157 | |
| 3158 | The calling user must have write access to the `refs/meta/config` branch of the |
| 3159 | project. |
| 3160 | |
| 3161 | Properties which are not set in the input entity are not modified. |
| 3162 | |
| 3163 | .Request |
| 3164 | ---- |
| 3165 | PUT /projects/All-Projects/labels/Code-Review HTTP/1.0 |
| 3166 | Content-Type: application/json; charset=UTF-8 |
| 3167 | |
| 3168 | { |
| 3169 | "commit_message": "Ignore self approvals for Code-Review label", |
| 3170 | "ignore_self_approval": true |
| 3171 | } |
| 3172 | ---- |
| 3173 | |
| 3174 | As response a link:#label-definition-info[LabelDefinitionInfo] entity is |
| 3175 | returned that describes the updated label. |
| 3176 | |
| 3177 | .Response |
| 3178 | ---- |
| 3179 | HTTP/1.1 200 OK |
| 3180 | Content-Disposition: attachment |
| 3181 | Content-Type: application/json; charset=UTF-8 |
| 3182 | |
| 3183 | )]}' |
| 3184 | { |
| 3185 | "name": "Code-Review", |
| 3186 | "project": "All-Projects", |
| 3187 | "function": "MaxWithBlock", |
| 3188 | "values": { |
| 3189 | " 0": "No score", |
| 3190 | "-1": "I would prefer this is not merged as is", |
| 3191 | "-2": "This shall not be merged", |
| 3192 | "+1": "Looks good to me, but someone else must approve", |
| 3193 | "+2": "Looks good to me, approved" |
| 3194 | }, |
| 3195 | "default_value": 0, |
| 3196 | "can_override": true, |
| 3197 | "copy_min_score": true, |
| 3198 | "copy_all_scores_if_no_change": true, |
| 3199 | "copy_all_scores_on_trivial_rebase": true, |
| 3200 | "allow_post_submit": true, |
| 3201 | "ignore_self_approval": true |
| 3202 | } |
| 3203 | ---- |
| 3204 | |
Edwin Kempin | 920f6f8 | 2019-10-28 10:43:13 +0100 | [diff] [blame] | 3205 | [[delete-label]] |
| 3206 | === Delete Label |
| 3207 | -- |
| 3208 | 'DELETE /projects/link:#project-name[\{project-name\}]/labels/link:#label-name[\{label-name\}]' |
| 3209 | -- |
| 3210 | |
| 3211 | Deletes the definition of a label that is defined in this project. |
| 3212 | |
| 3213 | The calling user must have write access to the `refs/meta/config` branch of the |
| 3214 | project. |
| 3215 | |
| 3216 | The request body does not need to include a link:#delete-label-input[ |
| 3217 | DeleteLabelInput] entity if no commit message is specified. |
| 3218 | |
| 3219 | .Request |
| 3220 | ---- |
Edwin Kempin | 6b96af6 | 2019-10-28 13:55:14 +0100 | [diff] [blame] | 3221 | DELETE /projects/My-Project/labels/Foo-Review HTTP/1.0 |
Edwin Kempin | 920f6f8 | 2019-10-28 10:43:13 +0100 | [diff] [blame] | 3222 | Content-Type: application/json; charset=UTF-8 |
| 3223 | |
| 3224 | { |
| 3225 | "commit_message": "Delete Foo-Review label", |
| 3226 | } |
| 3227 | ---- |
| 3228 | |
| 3229 | If a label was deleted the response is "`204 No Content`". |
| 3230 | |
| 3231 | .Response |
| 3232 | ---- |
| 3233 | HTTP/1.1 204 No Content |
| 3234 | ---- |
| 3235 | |
Edwin Kempin | 83d6d22 | 2019-10-28 13:45:52 +0100 | [diff] [blame] | 3236 | [[batch-update-labels]] |
| 3237 | === Batch Update Labels |
| 3238 | -- |
| 3239 | 'POST /projects/link:#project-name[\{project-name\}]/labels/' |
| 3240 | -- |
| 3241 | |
| 3242 | Creates/updates/deletes multiple label definitions in this project at once. |
| 3243 | |
| 3244 | The calling user must have write access to the `refs/meta/config` branch of the |
| 3245 | project. |
| 3246 | |
| 3247 | The updates must be specified in the request body as |
| 3248 | link:#batch-label-input[BatchLabelInput] entity. |
| 3249 | |
| 3250 | The updates are processed in the following order: |
| 3251 | |
| 3252 | 1. label deletions |
| 3253 | 2. label creations |
| 3254 | 3. label updates |
| 3255 | |
| 3256 | .Request |
| 3257 | ---- |
| 3258 | POST /projects/My-Project/labels/ HTTP/1.0 |
| 3259 | Content-Type: application/json; charset=UTF-8 |
| 3260 | |
| 3261 | { |
| 3262 | "commit_message": "Update Labels", |
| 3263 | "delete": [ |
| 3264 | "Old-Review", |
| 3265 | "Unused-Review" |
| 3266 | ], |
| 3267 | "create": [ |
| 3268 | { |
| 3269 | "name": "Foo-Review", |
| 3270 | "values": { |
| 3271 | " 0": "No score", |
| 3272 | "-1": "I would prefer this is not merged as is", |
| 3273 | "-2": "This shall not be merged", |
| 3274 | "+1": "Looks good to me, but someone else must approve", |
| 3275 | "+2": "Looks good to me, approved" |
| 3276 | } |
| 3277 | ], |
| 3278 | "update:" { |
| 3279 | "Bar-Review": { |
| 3280 | "function": "MaxWithBlock" |
| 3281 | }, |
| 3282 | "Baz-Review": { |
| 3283 | "copy_min_score": true |
| 3284 | } |
| 3285 | } |
| 3286 | } |
| 3287 | ---- |
| 3288 | |
| 3289 | If the label updates were done successfully the response is "`200 OK`". |
| 3290 | |
| 3291 | .Response |
| 3292 | ---- |
| 3293 | HTTP/1.1 200 OK |
| 3294 | ---- |
| 3295 | |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 3296 | |
| 3297 | [[ids]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3298 | == IDs |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 3299 | |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 3300 | [[branch-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3301 | === \{branch-id\} |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 3302 | The name of a branch or `HEAD`. The prefix `refs/heads/` can be |
| 3303 | omitted. |
| 3304 | |
Edwin Kempin | 1b99360 | 2014-07-08 16:18:45 +0200 | [diff] [blame] | 3305 | [[commit-id]] |
| 3306 | === \{commit-id\} |
| 3307 | Commit ID. |
| 3308 | |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 3309 | [[tag-id]] |
| 3310 | === \{tag-id\} |
| 3311 | The name of a tag. The prefix `refs/tags/` can be omitted. |
| 3312 | |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3313 | [[dashboard-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3314 | === \{dashboard-id\} |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 3315 | The ID of a dashboard in the format '<ref>:<path>'. |
| 3316 | |
| 3317 | A special dashboard ID is `default` which represents the default |
| 3318 | dashboard of a project. |
| 3319 | |
Edwin Kempin | aa56f44 | 2019-10-25 08:40:24 +0200 | [diff] [blame] | 3320 | [[label-name]] |
| 3321 | === \{label-name\} |
| 3322 | The name of a review label. |
| 3323 | |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3324 | [[project-name]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3325 | === \{project-name\} |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 3326 | The name of the project. |
| 3327 | |
Edwin Kempin | a9e94ab | 2015-03-06 10:35:39 +0100 | [diff] [blame] | 3328 | If the name ends with `.git`, the suffix will be automatically removed. |
| 3329 | |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 3330 | |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 3331 | [[json-entities]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3332 | == JSON Entities |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 3333 | |
Han-Wen Nienhuys | d1ed08d | 2017-09-04 18:13:23 +0200 | [diff] [blame] | 3334 | [[access-check-info]] |
| 3335 | === AccessCheckInfo |
| 3336 | |
| 3337 | The `AccessCheckInfo` entity is the result of an access check. |
| 3338 | |
| 3339 | [options="header",cols="1,^1,5"] |
| 3340 | |========================================= |
| 3341 | |Field Name ||Description |
| 3342 | |`status` ||The HTTP status code for the access. |
Han-Wen Nienhuys | 3364c47 | 2018-10-01 16:49:42 +0200 | [diff] [blame] | 3343 | 200 means success and 403 means denied. |
Han-Wen Nienhuys | d1ed08d | 2017-09-04 18:13:23 +0200 | [diff] [blame] | 3344 | |`message` |optional|A clarifying message if `status` is not 200. |
| 3345 | |========================================= |
| 3346 | |
Edwin Kempin | bf9df39 | 2018-01-12 15:20:48 +0100 | [diff] [blame] | 3347 | [[auto_closeable_changes_check_input]] |
| 3348 | === AutoCloseableChangesCheckInput |
| 3349 | The `AutoCloseableChangesCheckInput` entity contains options for running |
| 3350 | the link:#auto-closeable-changes-check[AutoCloseableChangesCheck]. |
| 3351 | |
| 3352 | [options="header",cols="1,^2,4"] |
| 3353 | |============================= |
| 3354 | |Field Name ||Description |
| 3355 | |`fix` |optional| |
| 3356 | Whether auto-closeable changes should be closed automatically. |
| 3357 | |`branch` || |
| 3358 | The branch for which the link:#auto-closeable-changes-check[ |
| 3359 | AutoCloseableChangesCheck] should be performed. The 'refs/heads/' |
| 3360 | prefix for the branch name can be omitted. |
| 3361 | |`skip_commits` |optional| |
| 3362 | Number of commits that should be skipped when walking the commits of |
| 3363 | the branch. |
| 3364 | |`max_commits` |optional| |
| 3365 | Maximum number of commits to walk. If not specified this defaults to |
| 3366 | 10,000 commits. 10,000 is also the maximum that can be set. |
| 3367 | Auto-closing changes is an expensive operation and the more commits |
| 3368 | are walked the slower it gets. This is why you should avoid walking too |
| 3369 | many commits. |
| 3370 | |============================= |
| 3371 | |
| 3372 | [[auto_closeable_changes_check_result]] |
| 3373 | === AutoCloseableChangesCheckResult |
| 3374 | The `AutoCloseableChangesCheckResult` entity contains the results of |
| 3375 | running the link:#auto-closeable-changes-check[AutoCloseableChangesCheck] |
| 3376 | on a project. |
| 3377 | |
| 3378 | [options="header",cols="1,6"] |
| 3379 | |==================================== |
| 3380 | |Field Name |Description |
| 3381 | |`auto_closeable_changes`| |
| 3382 | Changes that can be auto-closed as list of |
| 3383 | link:rest-api-changes.html#change-info[ChangeInfo] entities. For each |
| 3384 | returned link:rest-api-changes.html#change-info[ChangeInfo] entity the |
| 3385 | `problems` field is populated that includes details about the detected |
| 3386 | issues. If `fix` in the link:#auto_closeable_changes_check_input[ |
| 3387 | AutoCloseableChangesCheckInput] was set to `true`, `status` and |
| 3388 | `outcome` in link:rest-api-changes.html#problem-info[ProblemInfo] are |
| 3389 | populated. If the status says `FIXED` Gerrit was able to auto-close the |
| 3390 | change now. |
| 3391 | |==================================== |
| 3392 | |
Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 3393 | [[ban-input]] |
| 3394 | === BanInput |
| 3395 | The `BanInput` entity contains information for banning commits in a |
| 3396 | project. |
| 3397 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3398 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 3399 | |======================= |
| 3400 | |Field Name||Description |
| 3401 | |`commits` ||List of commits to be banned. |
| 3402 | |`reason` |optional|Reason for banning the commits. |
| 3403 | |======================= |
| 3404 | |
| 3405 | [[ban-result-info]] |
| 3406 | === BanResultInfo |
| 3407 | The `BanResultInfo` entity describes the result of banning commits. |
| 3408 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3409 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 3410 | |============================= |
| 3411 | |Field Name ||Description |
| 3412 | |`newly_banned` |optional|List of newly banned commits. |
| 3413 | |`already_banned`|optional|List of commits that were already banned. |
| 3414 | |`ignored` |optional|List of object IDs that were ignored. |
| 3415 | |============================= |
| 3416 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 3417 | [[branch-info]] |
| 3418 | === BranchInfo |
| 3419 | The `BranchInfo` entity contains information about a branch. |
| 3420 | |
| 3421 | [options="header",cols="1,^2,4"] |
| 3422 | |========================= |
| 3423 | |Field Name ||Description |
| 3424 | |`ref` ||The ref of the branch. |
| 3425 | |`revision` ||The revision to which the branch points. |
David Pursehouse | d00515e | 2017-11-10 15:57:41 +0900 | [diff] [blame] | 3426 | |`can_delete`|not set if `false`| |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 3427 | Whether the calling user can delete this branch. |
| 3428 | |`web_links` |optional| |
| 3429 | Links to the branch in external sites as a list of |
| 3430 | link:rest-api-changes.html#web-link-info[WebLinkInfo] entries. |
| 3431 | |========================= |
| 3432 | |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 3433 | [[branch-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3434 | === BranchInput |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 3435 | The `BranchInput` entity contains information for the creation of |
| 3436 | a new branch. |
| 3437 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3438 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 3439 | |======================= |
| 3440 | |Field Name||Description |
| 3441 | |`ref` |optional| |
| 3442 | The name of the branch. The prefix `refs/heads/` can be |
| 3443 | omitted. + |
| 3444 | If set, must match the branch ID in the URL. |
| 3445 | |`revision`|optional| |
| 3446 | The base revision of the new branch. + |
| 3447 | If not set, `HEAD` will be used as base revision. |
| 3448 | |======================= |
| 3449 | |
Edwin Kempin | bf9df39 | 2018-01-12 15:20:48 +0100 | [diff] [blame] | 3450 | [[check-project-input]] |
| 3451 | === CheckProjectInput |
| 3452 | The `CheckProjectInput` entity contains information about which |
| 3453 | consistency checks should be run on a project. |
| 3454 | |
| 3455 | [options="header",cols="1,^2,4"] |
| 3456 | |=========================================== |
| 3457 | |Field Name ||Description |
| 3458 | |`auto_closeable_changes_check`|optional| |
| 3459 | Parameters for the link:#auto-closeable-changes-check[ |
| 3460 | AutoCloseableChangesCheck] as |
| 3461 | link:rest-api-changes.html#auto_closeable_changes_check_input[ |
| 3462 | AutoCloseableChangesCheckInput] entity. |
| 3463 | |=========================================== |
| 3464 | |
| 3465 | [[check-project-result-info]] |
| 3466 | === CheckProjectResultInfo |
| 3467 | The `CheckProjectResultInfo` entity contains results for consistency |
| 3468 | checks that have been run on a project. |
| 3469 | |
| 3470 | [options="header",cols="1,^2,4"] |
| 3471 | |================================================== |
| 3472 | |Field Name ||Description |
| 3473 | |`auto_closeable_changes_check_result`|optional| |
| 3474 | Results for the link:#auto-closeable-changes-check[ |
| 3475 | AutoCloseableChangesCheck] as |
| 3476 | link:rest-api-changes.html#auto_closeable_changes_check_result[ |
| 3477 | AutoCloseableChangesCheckResult] entity. |
| 3478 | |================================================== |
| 3479 | |
Edwin Kempin | 043436d | 2018-10-17 12:23:22 +0200 | [diff] [blame] | 3480 | [[commentlink-info]] |
| 3481 | === CommentLinkInfo |
| 3482 | The `CommentLinkInfo` entity describes a |
| 3483 | link:config-gerrit.html#commentlink[commentlink]. |
| 3484 | |
| 3485 | [options="header",cols="1,^2,4"] |
| 3486 | |================================================== |
| 3487 | |Field Name | |Description |
| 3488 | |`match` | |A JavaScript regular expression to match |
| 3489 | positions to be replaced with a hyperlink, as documented in |
Gal Paikin | 8636747 | 2019-08-02 09:59:42 +0200 | [diff] [blame] | 3490 | link:config-gerrit.html#commentlink.name.match[commentlink.name.match]. |
Edwin Kempin | 043436d | 2018-10-17 12:23:22 +0200 | [diff] [blame] | 3491 | |`link` | |The URL to direct the user to whenever the |
| 3492 | regular expression is matched, as documented in |
Gal Paikin | 8636747 | 2019-08-02 09:59:42 +0200 | [diff] [blame] | 3493 | link:config-gerrit.html#commentlink.name.link[commentlink.name.link]. |
Edwin Kempin | 043436d | 2018-10-17 12:23:22 +0200 | [diff] [blame] | 3494 | |`enabled` |optional|Whether the commentlink is enabled, as documented |
Gal Paikin | 8636747 | 2019-08-02 09:59:42 +0200 | [diff] [blame] | 3495 | in link:config-gerrit.html#commentlink.name.enabled[ |
Edwin Kempin | 043436d | 2018-10-17 12:23:22 +0200 | [diff] [blame] | 3496 | commentlink.name.enabled]. If not set the commentlink is enabled. |
David Pursehouse | 67c8f14 | 2018-10-14 14:01:29 +0900 | [diff] [blame] | 3497 | |
| 3498 | [[commentlink-input]] |
| 3499 | === CommentLinkInput |
| 3500 | The `CommentLinkInput` entity describes the input for a |
| 3501 | link:config-gerrit.html#commentlink[commentlink]. |
| 3502 | |
| 3503 | |================================================== |
| 3504 | [options="header",cols="1,^2,4"] |
| 3505 | |================================================== |
| 3506 | |Field Name | |Description |
| 3507 | |`match` | |A JavaScript regular expression to match |
| 3508 | positions to be replaced with a hyperlink, as documented in |
| 3509 | link:config-gerrit.html#commentlink.name.match[commentlink.name.match]. |
| 3510 | |`link` | |The URL to direct the user to whenever the |
| 3511 | regular expression is matched, as documented in |
| 3512 | link:config-gerrit.html#commentlink.name.link[commentlink.name.link]. |
| 3513 | |`enabled` |optional|Whether the commentlink is enabled, as documented |
| 3514 | in link:config-gerrit.html#commentlink.name.enabled[ |
| 3515 | commentlink.name.enabled]. If not set the commentlink is enabled. |
Edwin Kempin | 043436d | 2018-10-17 12:23:22 +0200 | [diff] [blame] | 3516 | |================================================== |
| 3517 | |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3518 | [[config-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3519 | === ConfigInfo |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3520 | The `ConfigInfo` entity contains information about the effective project |
| 3521 | configuration. |
| 3522 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3523 | [options="header",cols="1,^2,4"] |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3524 | |======================================================= |
| 3525 | |Field Name ||Description |
| 3526 | |`description` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3527 | The description of the project. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3528 | |`use_contributor_agreements` |optional| |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3529 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3530 | authors must complete a contributor agreement on the site before |
| 3531 | pushing any commits or changes to this project. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3532 | |`use_content_merge` |optional| |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3533 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3534 | Gerrit will try to perform a 3-way merge of text file content when a |
| 3535 | file has been modified by both the destination branch and the change |
| 3536 | being submitted. This option only takes effect if submit type is not |
| 3537 | FAST_FORWARD_ONLY. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3538 | |`use_signed_off_by` |optional| |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3539 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3540 | each change must contain a Signed-off-by line from either the author or |
| 3541 | the uploader in the commit message. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3542 | |`create_new_change_for_all_not_in_target` |optional| |
| 3543 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3544 | a new change is created for every commit not in target branch. |
Han-Wen Nienhuys | cdde7a30 | 2019-07-24 12:19:16 +0200 | [diff] [blame] | 3545 | |`require_change_id` |optional| |
| 3546 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether a |
| 3547 | valid link:user-changeid.html[Change-Id] footer in any commit uploaded |
| 3548 | for review is required. This does not apply to commits pushed directly |
| 3549 | to a branch or tag. This property is deprecated and will be removed in |
| 3550 | a future release. |
Doug Claar | 1b0f7625 | 2016-03-23 13:34:55 -0700 | [diff] [blame] | 3551 | |`enable_signed_push`|optional, not set if signed push is disabled| |
Dave Borowitz | 5170e0f | 2015-06-18 21:05:29 -0400 | [diff] [blame] | 3552 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3553 | signed push validation is enabled on the project. |
Doug Claar | 1b0f7625 | 2016-03-23 13:34:55 -0700 | [diff] [blame] | 3554 | |`require_signed_push`|optional, not set if signed push is disabled| |
Dave Borowitz | 0543c73 | 2015-10-20 10:35:26 -0400 | [diff] [blame] | 3555 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3556 | signed push validation is required on the project. |
Saša Živkov | 225b7a7 | 2015-11-17 17:37:43 +0100 | [diff] [blame] | 3557 | |`reject_implicit_merges`|optional| |
| 3558 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3559 | implicit merges should be rejected on changes pushed to the project. |
David Ostrovsky | 9690994 | 2018-06-10 08:30:33 +0200 | [diff] [blame] | 3560 | |`private_by_default` || |
Changcheng Xiao | d089b4a | 2017-08-10 14:05:22 +0200 | [diff] [blame] | 3561 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3562 | all new changes are set as private by default. |
David Ostrovsky | 9690994 | 2018-06-10 08:30:33 +0200 | [diff] [blame] | 3563 | |`work_in_progress_by_default`|| |
| 3564 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3565 | all new changes are set as work-in-progress by default. |
| 3566 | |`max_object_size_limit` || |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 3567 | The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size |
| 3568 | limit] of this project as a link:#max-object-size-limit-info[ |
| 3569 | MaxObjectSizeLimitInfo] entity. |
Dave Borowitz | c8f8d2e | 2017-10-23 11:18:23 -0400 | [diff] [blame] | 3570 | |`default_submit_type` || |
| 3571 | link:#submit-type-info[SubmitTypeInfo] that describes the default submit type of |
| 3572 | the project, when not overridden at the change level. |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 3573 | |`submit_type` || |
Dave Borowitz | c8f8d2e | 2017-10-23 11:18:23 -0400 | [diff] [blame] | 3574 | Deprecated; equivalent to link:#submit-type-info[`value`] in |
| 3575 | `default_submit_type`. |
Patrick Hiesel | 5a31635 | 2017-06-22 15:38:06 +0200 | [diff] [blame] | 3576 | |`match_author_to_committer_date` |optional| |
| 3577 | link:#inherited-boolean-info[InheritedBooleanInfo] that indicates whether |
| 3578 | 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] | 3579 | |`state` |optional| |
| 3580 | The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. + |
| 3581 | Not set if the project state is `ACTIVE`. |
Edwin Kempin | 3660c13 | 2013-07-16 08:03:11 +0200 | [diff] [blame] | 3582 | |`commentlinks` || |
Edwin Kempin | 8aa53af | 2013-07-15 10:43:15 +0200 | [diff] [blame] | 3583 | Map with the comment link configurations of the project. The name of |
Edwin Kempin | 043436d | 2018-10-17 12:23:22 +0200 | [diff] [blame] | 3584 | the comment link configuration is mapped to a link:#commentlink-info[ |
| 3585 | CommentlinkInfo] entity. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3586 | |`plugin_config` |optional| |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 3587 | Plugin configuration as map which maps the plugin name to a map of |
| 3588 | parameter names to link:#config-parameter-info[ConfigParameterInfo] |
| 3589 | entities. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3590 | |`actions` |optional| |
David Ostrovsky | 9e8b2fb | 2013-08-30 08:09:53 +0200 | [diff] [blame] | 3591 | Actions the caller might be able to perform on this project. The |
| 3592 | information is a map of view names to |
Patrick Hiesel | dc285c7 | 2018-01-08 17:20:15 +0100 | [diff] [blame] | 3593 | |`reject_empty_commit` |optional| |
| 3594 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3595 | empty commits should be rejected when a change is merged. |
David Ostrovsky | 9e8b2fb | 2013-08-30 08:09:53 +0200 | [diff] [blame] | 3596 | link:rest-api-changes.html#action-info[ActionInfo] entities. |
David Pursehouse | 510b87d | 2014-11-25 16:46:28 +0900 | [diff] [blame] | 3597 | |======================================================= |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3598 | |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3599 | [[config-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3600 | === ConfigInput |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3601 | The `ConfigInput` entity describes a new project configuration. |
| 3602 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3603 | [options="header",cols="1,^2,4"] |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3604 | |====================================================== |
| 3605 | |Field Name ||Description |
| 3606 | |`description` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3607 | The new description of the project. + |
| 3608 | If not set, the description is removed. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3609 | |`use_contributor_agreements` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3610 | Whether authors must complete a contributor agreement on the site |
| 3611 | before pushing any commits or changes to this project. + |
| 3612 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 3613 | If not set, this setting is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3614 | |`use_content_merge` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3615 | Whether Gerrit will try to perform a 3-way merge of text file content |
| 3616 | when a file has been modified by both the destination branch and the |
| 3617 | change being submitted. This option only takes effect if submit type is |
| 3618 | not FAST_FORWARD_ONLY. + |
| 3619 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 3620 | If not set, this setting is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3621 | |`use_signed_off_by` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3622 | Whether each change must contain a Signed-off-by line from either the |
| 3623 | author or the uploader in the commit message. + |
| 3624 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 3625 | If not set, this setting is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3626 | |`create_new_change_for_all_not_in_target` |optional| |
| 3627 | Whether a new change will be created for every commit not in target |
| 3628 | branch. + |
| 3629 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 3630 | If not set, this setting is not updated. |
Han-Wen Nienhuys | cdde7a30 | 2019-07-24 12:19:16 +0200 | [diff] [blame] | 3631 | |`require_change_id` |optional| |
| 3632 | Whether a valid link:user-changeid.html[Change-Id] footer in any commit |
| 3633 | uploaded for review is required. This does not apply to commits pushed |
| 3634 | directly to a branch or tag. + |
| 3635 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 3636 | If not set, this setting is not updated. |
| 3637 | This property is deprecated and will be removed in |
| 3638 | a future release. |
Saša Živkov | 225b7a7 | 2015-11-17 17:37:43 +0100 | [diff] [blame] | 3639 | |`reject_implicit_merges` |optional| |
| 3640 | Whether a check for implicit merges will be performed when changes |
| 3641 | are pushed for review. + |
| 3642 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 3643 | If not set, this setting is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3644 | |`max_object_size_limit` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3645 | The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size |
| 3646 | limit] of this project as a link:#max-object-size-limit-info[ |
| 3647 | MaxObjectSizeLimitInfo] entity. + |
| 3648 | If set to `0`, the max object size limit is removed. + |
| 3649 | If not set, this setting is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3650 | |`submit_type` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3651 | 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] | 3652 | `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `REBASE_ALWAYS`, `MERGE_ALWAYS` or |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3653 | `CHERRY_PICK`. + |
| 3654 | If not set, the submit type is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3655 | |`state` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3656 | The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. + |
| 3657 | Not set if the project state is `ACTIVE`. + |
| 3658 | If not set, the project state is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3659 | |`plugin_config_values` |optional| |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 3660 | Plugin configuration values as map which maps the plugin name to a map |
| 3661 | of parameter names to values. |
Patrick Hiesel | dc285c7 | 2018-01-08 17:20:15 +0100 | [diff] [blame] | 3662 | |`reject_empty_commit` |optional| |
| 3663 | Whether empty commits should be rejected when a change is merged. |
| 3664 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 3665 | If not set, this setting is not updated. |
David Pursehouse | 67c8f14 | 2018-10-14 14:01:29 +0900 | [diff] [blame] | 3666 | |commentlinks |optional| |
| 3667 | Map of commentlink names to link:#commentlink-input[CommentLinkInput] |
| 3668 | entities to add or update on the project. If the given commentlink |
| 3669 | already exists, it will be updated with the given values, otherwise |
| 3670 | it will be created. If the value is null, that entry is deleted. |
David Pursehouse | 510b87d | 2014-11-25 16:46:28 +0900 | [diff] [blame] | 3671 | |====================================================== |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3672 | |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 3673 | [[config-parameter-info]] |
David Pursehouse | b10c266 | 2016-12-06 08:41:33 +0900 | [diff] [blame] | 3674 | === ConfigParameterInfo |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 3675 | The `ConfigParameterInfo` entity describes a project configuration |
| 3676 | parameter. |
| 3677 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3678 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 3679 | |=============================== |
| 3680 | |Field Name ||Description |
| 3681 | |`display_name` |optional| |
| 3682 | The display name of the configuration parameter. |
Edwin Kempin | d92196d | 2014-01-27 21:55:46 +0100 | [diff] [blame] | 3683 | |`description` |optional| |
| 3684 | The description of the configuration parameter. |
Edwin Kempin | aec6132 | 2014-01-28 12:59:22 +0100 | [diff] [blame] | 3685 | |`warning` |optional| |
| 3686 | Warning message for the configuration parameter. |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 3687 | |`type` || |
David Ostrovsky | c6dd217 | 2014-02-01 19:13:27 +0100 | [diff] [blame] | 3688 | The type of the configuration parameter. Can be `STRING`, `INT`, |
| 3689 | `LONG`, `BOOLEAN`, `LIST` or `ARRAY`. |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 3690 | |`value` |optional| |
Edwin Kempin | d32beef | 2013-11-28 20:36:33 +0100 | [diff] [blame] | 3691 | The value of the configuration parameter as string. If the parameter |
| 3692 | is inheritable this is the effective value which is deduced from |
| 3693 | `configured_value` and `inherited_value`. |
David Ostrovsky | c6dd217 | 2014-02-01 19:13:27 +0100 | [diff] [blame] | 3694 | |`values` |optional| |
| 3695 | The list of values. Only set if the `type` is `ARRAY`. |
Doug Claar | 1b0f7625 | 2016-03-23 13:34:55 -0700 | [diff] [blame] | 3696 | |`editable` |`false` if not set| |
Edwin Kempin | 0d48523 | 2013-11-17 18:55:48 +0100 | [diff] [blame] | 3697 | Whether the value is editable. |
Edwin Kempin | 20f256fb | 2013-11-28 19:56:15 +0100 | [diff] [blame] | 3698 | |`permitted_values`|optional| |
David Ostrovsky | c6dd217 | 2014-02-01 19:13:27 +0100 | [diff] [blame] | 3699 | The list of permitted values. Only set if the `type` is `LIST`. |
Edwin Kempin | d32beef | 2013-11-28 20:36:33 +0100 | [diff] [blame] | 3700 | |`inheritable` |`false` if not set| |
| 3701 | Whether the configuration parameter can be inherited. |
| 3702 | |`configured_value`|optional| |
| 3703 | The value of the configuration parameter that is configured on this |
| 3704 | project, only set if `inheritable` is true. |
| 3705 | |`inherited_value` |optional| |
| 3706 | The inherited value of the configuration parameter, only set if |
| 3707 | `inheritable` is true. |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 3708 | |=============================== |
| 3709 | |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3710 | [[dashboard-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3711 | === DashboardInfo |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3712 | The `DashboardInfo` entity contains information about a project |
| 3713 | dashboard. |
| 3714 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3715 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3716 | |=============================== |
| 3717 | |Field Name ||Description |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3718 | |`id` || |
| 3719 | The ID of the dashboard. The ID has the format '<ref>:<path>', |
| 3720 | where ref and path are URL encoded. |
| 3721 | |`project` || |
| 3722 | The name of the project for which this dashboard is returned. |
| 3723 | |`defining_project`|| |
| 3724 | The name of the project in which this dashboard is defined. |
| 3725 | This is different from `project` if the dashboard is inherited from a |
| 3726 | parent project. |
| 3727 | |`ref` || |
| 3728 | The name of the ref in which the dashboard is defined, without the |
| 3729 | `refs/meta/dashboards/` prefix, which is common for all dashboard refs. |
| 3730 | |`path` || |
| 3731 | The path of the file in which the dashboard is defined. |
| 3732 | |`description` |optional|The description of the dashboard. |
| 3733 | |`foreach` |optional| |
| 3734 | Subquery that applies to all sections in the dashboard. + |
| 3735 | Tokens such as `${project}` are not resolved. |
| 3736 | |`url` || |
David Pursehouse | a1d633b | 2014-05-02 17:21:02 +0900 | [diff] [blame] | 3737 | 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] | 3738 | The URL is relative to the canonical web URL. + |
| 3739 | Tokens in the queries such as `${project}` are resolved. |
David Pursehouse | 8edc199 | 2017-09-15 17:12:09 +0900 | [diff] [blame] | 3740 | |`is_default` |not set if `false`| |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3741 | Whether this is the default dashboard of the project. |
| 3742 | |`title` |optional|The title of the dashboard. |
| 3743 | |`sections` || |
| 3744 | The list of link:#dashboard-section-info[sections] in the dashboard. |
| 3745 | |=============================== |
| 3746 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 3747 | [[dashboard-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3748 | === DashboardInput |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 3749 | The `DashboardInput` entity contains information to create/update a |
| 3750 | project dashboard. |
| 3751 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3752 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 3753 | |============================= |
| 3754 | |Field Name ||Description |
| 3755 | |`id` |optional| |
Edwin Kempin | c95c508 | 2013-03-12 16:56:25 +0100 | [diff] [blame] | 3756 | 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] | 3757 | |`commit_message`|optional| |
| 3758 | Message that should be used to commit the change of the dashboard. |
| 3759 | |============================= |
| 3760 | |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3761 | [[dashboard-section-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3762 | === DashboardSectionInfo |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3763 | The `DashboardSectionInfo` entity contains information about a section |
| 3764 | in a dashboard. |
| 3765 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3766 | [options="header",cols="1,6"] |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3767 | |=========================== |
| 3768 | |Field Name |Description |
| 3769 | |`name` |The title of the section. |
| 3770 | |`query` |The query of the section. + |
| 3771 | Tokens such as `${project}` are not resolved. |
| 3772 | |=========================== |
| 3773 | |
Edwin Kempin | 920f6f8 | 2019-10-28 10:43:13 +0100 | [diff] [blame] | 3774 | [[delete-label-input]] |
| 3775 | === DeleteLabelInput |
| 3776 | The `DeleteLabelInput` entity contains information for deleting a label |
| 3777 | definition in a project. |
| 3778 | |
| 3779 | [options="header",cols="1,^2,4"] |
| 3780 | |============================= |
| 3781 | |Field Name ||Description |
| 3782 | |`commit_message`|optional| |
| 3783 | Message that should be used to commit the deletion of the label in the |
| 3784 | `project.config` file to the `refs/meta/config` branch. |
| 3785 | |============================= |
| 3786 | |
Hugo Arès | ef8e320 | 2015-01-12 15:09:06 -0500 | [diff] [blame] | 3787 | [[delete-branches-input]] |
| 3788 | === DeleteBranchesInput |
| 3789 | The `DeleteBranchesInput` entity contains information about branches that should |
| 3790 | be deleted. |
| 3791 | |
| 3792 | [options="header",width="50%",cols="1,6"] |
| 3793 | |========================== |
| 3794 | |Field Name |Description |
| 3795 | |`branches` |A list of branch names that identify the branches that should be |
| 3796 | deleted. |
| 3797 | |========================== |
| 3798 | |
David Pursehouse | 467aecb | 2016-12-02 14:18:42 +0900 | [diff] [blame] | 3799 | [[delete-tags-input]] |
| 3800 | === DeleteTagsInput |
| 3801 | The `DeleteTagsInput` entity contains information about tags that should |
| 3802 | be deleted. |
| 3803 | |
| 3804 | [options="header",width="50%",cols="1,6"] |
| 3805 | |========================== |
| 3806 | |Field Name |Description |
| 3807 | |`tags` |A list of tag names that identify the tags that should be |
| 3808 | deleted. |
| 3809 | |========================== |
| 3810 | |
Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 3811 | [[gc-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3812 | === GCInput |
Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 3813 | The `GCInput` entity contains information to run the Git garbage |
| 3814 | collection. |
| 3815 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3816 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 3817 | |============================= |
| 3818 | |Field Name ||Description |
| 3819 | |`show_progress` |`false` if not set| |
| 3820 | Whether progress information should be shown. |
Christian Halstrick | 2f94e2e | 2015-03-11 15:13:31 +0100 | [diff] [blame] | 3821 | |`aggressive` |`false` if not set| |
| 3822 | Whether an aggressive garbage collection should be done. |
Adrian Görler | 92410a1 | 2015-11-03 16:20:56 +0100 | [diff] [blame] | 3823 | |`async` |`false` if not set| |
| 3824 | Whether the garbage collection should run asynchronously. |
Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 3825 | |============================= |
| 3826 | |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 3827 | [[head-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3828 | === HeadInput |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 3829 | The `HeadInput` entity contains information for setting `HEAD` for a |
| 3830 | project. |
| 3831 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3832 | [options="header",cols="1,6"] |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 3833 | |============================ |
| 3834 | |Field Name |Description |
| 3835 | |`ref` | |
| 3836 | The ref to which `HEAD` should be set, the `refs/heads` prefix can be |
| 3837 | omitted. |
| 3838 | |============================ |
| 3839 | |
Patrick Hiesel | 20d981e | 2018-07-04 09:48:21 +0200 | [diff] [blame] | 3840 | [[index-project-input]] |
| 3841 | === IndexProjectInput |
| 3842 | The `IndexProjectInput` contains parameters for indexing a project. |
| 3843 | |
| 3844 | [options="header",cols="1,^2,4"] |
| 3845 | |================================ |
| 3846 | |Field Name ||Description |
| 3847 | |`index_children` || |
| 3848 | If children should be indexed recursively. |
Patrick Hiesel | 6b7d9b1 | 2018-07-10 14:11:35 +0200 | [diff] [blame] | 3849 | |`async` || |
| 3850 | If projects should be indexed asynchronously. |
Patrick Hiesel | 20d981e | 2018-07-04 09:48:21 +0200 | [diff] [blame] | 3851 | |================================ |
| 3852 | |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3853 | [[inherited-boolean-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3854 | === InheritedBooleanInfo |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3855 | A boolean value that can also be inherited. |
| 3856 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3857 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3858 | |================================ |
| 3859 | |Field Name ||Description |
| 3860 | |`value` || |
| 3861 | The effective boolean value. |
| 3862 | |`configured_value` || |
| 3863 | The configured value, can be `TRUE`, `FALSE` or `INHERITED`. |
| 3864 | |`inherited_value` |optional| |
| 3865 | The boolean value inherited from the parent. + |
| 3866 | Not set if there is no parent. |
| 3867 | |================================ |
| 3868 | |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 3869 | [[label-definition-info]] |
| 3870 | === LabelDefinitionInfo |
Edwin Kempin | 07bd713 | 2019-11-11 13:11:00 +0100 | [diff] [blame] | 3871 | The `LabelDefinitionInfo` entity describes a link:config-labels.html[ |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 3872 | review label]. |
| 3873 | |
| 3874 | [options="header",cols="1,^2,4"] |
| 3875 | |============================= |
| 3876 | |Field Name ||Description |
| 3877 | |`name` || |
| 3878 | The link:config-labels.html#label_name[name] of the label. |
Edwin Kempin | b527526 | 2019-10-24 16:03:27 +0200 | [diff] [blame] | 3879 | |`project_name` || |
| 3880 | The name of the project in which this label is defined. |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 3881 | |`function` || |
| 3882 | The link:config-labels.html#label_function[function] of the label (can be |
| 3883 | `MaxWithBlock`, `AnyWithBlock`, `MaxNoBlock`, `NoBlock`, `NoOp` and `PatchSetLock`. |
| 3884 | |`values` || |
| 3885 | The link:config-labels.html#label_value[values] of the label as a map of label |
| 3886 | value to value description. The label values are formatted strings, e.g. "+1" |
| 3887 | instead of "1", " 0" instead of "0". |
| 3888 | |`default_value` || |
| 3889 | The link:config-labels.html#label_defaultValue[default value] of the label (as |
| 3890 | integer). |
| 3891 | |`branches` |optional| |
| 3892 | A list of link:config-labels.html#label_branch[branches] for which the label |
| 3893 | applies. A branch can be a ref, a ref pattern or a regular expression. If not |
| 3894 | set, the label applies for all branches. |
| 3895 | |`can_override` |`false` if not set| |
| 3896 | Whether this label can be link:config-labels.html#label_canOverride[overridden] |
| 3897 | by child projects. |
| 3898 | |`copy_any_score`|`false` if not set| |
| 3899 | Whether link:config-labels.html#label_copyAnyScore[copyAnyScore] is set on the |
| 3900 | label. |
| 3901 | |`copy_min_score`|`false` if not set| |
| 3902 | Whether link:config-labels.html#label_copyMinScore[copyMinScore] is set on the |
| 3903 | label. |
| 3904 | |`copy_max_score`|`false` if not set| |
| 3905 | Whether link:config-labels.html#label_copyMaxScore[copyMaxScore] is set on the |
| 3906 | label. |
| 3907 | |`copy_all_scores_if_no_change`|`false` if not set| |
| 3908 | Whether link:config-labels.html#label_copyAllScoresIfNoChange[ |
| 3909 | copyAllScoresIfNoChange] is set on the label. |
| 3910 | |`copy_all_scores_if_no_code_change`|`false` if not set| |
| 3911 | Whether link:config-labels.html#label_copyAllScoresIfNoCodeChange[ |
| 3912 | copyAllScoresIfNoCodeChange] is set on the label. |
| 3913 | |`copy_all_scores_on_trivial_rebase`|`false` if not set| |
| 3914 | Whether link:config-labels.html#label_copyAllScoresOnTrivialRebase[ |
| 3915 | copyAllScoresOnTrivialRebase] is set on the label. |
| 3916 | |`copy_all_scores_on_merge_first_parent_update`|`false` if not set| |
| 3917 | Whether link:config-labels.html#label_copyAllScoresOnMergeFirstParentUpdate[ |
| 3918 | copyAllScoresOnMergeFirstParentUpdate] is set on the label. |
Edwin Kempin | 33c13a4 | 2020-01-10 11:38:06 +0100 | [diff] [blame] | 3919 | |`copy_values` |optional| |
| 3920 | List of values that should be copied forward when a new patch set is uploaded. |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 3921 | |`allow_post_submit`|`false` if not set| |
| 3922 | Whether link:config-labels.html#label_allowPostSubmit[allowPostSubmit] is set |
| 3923 | on the label. |
| 3924 | |`ignore_self_approval`|`false` if not set| |
| 3925 | Whether link:config-labels.html#label_ignoreSelfApproval[ignoreSelfApproval] is |
| 3926 | set on the label. |
| 3927 | |============================= |
Han-Wen Nienhuys | 22f2774 | 2017-06-27 18:01:07 +0200 | [diff] [blame] | 3928 | |
Edwin Kempin | b5e8745 | 2019-10-25 13:28:46 +0200 | [diff] [blame] | 3929 | [[label-definition-input]] |
| 3930 | === LabelDefinitionInput |
Edwin Kempin | 07bd713 | 2019-11-11 13:11:00 +0100 | [diff] [blame] | 3931 | The `LabelDefinitionInput` entity describes a link:config-labels.html[ |
Edwin Kempin | b5e8745 | 2019-10-25 13:28:46 +0200 | [diff] [blame] | 3932 | review label]. |
| 3933 | |
| 3934 | [options="header",cols="1,^2,4"] |
| 3935 | |============================= |
| 3936 | |Field Name ||Description |
| 3937 | |`commit_message`|optional| |
| 3938 | Message that should be used to commit the change of the label in the |
Edwin Kempin | 83d6d22 | 2019-10-28 13:45:52 +0100 | [diff] [blame] | 3939 | `project.config` file to the `refs/meta/config` branch.+ |
| 3940 | Must not be set if this `LabelDefinitionInput` entity is contained in a |
| 3941 | link:#batch-label-input[BatchLabelInput] entity. |
Edwin Kempin | b5e8745 | 2019-10-25 13:28:46 +0200 | [diff] [blame] | 3942 | |`name` |optional| |
Edwin Kempin | 83d6d22 | 2019-10-28 13:45:52 +0100 | [diff] [blame] | 3943 | The new link:config-labels.html#label_name[name] of the label.+ |
| 3944 | For label creation the name is required if this `LabelDefinitionInput` entity |
| 3945 | is contained in a link:#batch-label-input[BatchLabelInput] |
| 3946 | entity. |
Edwin Kempin | b5e8745 | 2019-10-25 13:28:46 +0200 | [diff] [blame] | 3947 | |`function` |optional| |
| 3948 | The new link:config-labels.html#label_function[function] of the label (can be |
| 3949 | `MaxWithBlock`, `AnyWithBlock`, `MaxNoBlock`, `NoBlock`, `NoOp` and `PatchSetLock`. |
| 3950 | |`values` |optional| |
| 3951 | The new link:config-labels.html#label_value[values] of the label as a map of |
| 3952 | label value to value description. The label values are formatted strings, e.g. |
| 3953 | "+1" instead of "1", " 0" instead of "0". |
| 3954 | |`default_value` |optional| |
| 3955 | The new link:config-labels.html#label_defaultValue[default value] of the label |
| 3956 | (as integer). |
| 3957 | |`branches` |optional| |
| 3958 | The new branches for which the label applies as a list of |
| 3959 | link:config-labels.html#label_branch[branches]. A branch can be a ref, a ref |
| 3960 | pattern or a regular expression. If not set, the label applies for all |
| 3961 | branches. |
| 3962 | |`can_override` |optional| |
| 3963 | Whether this label can be link:config-labels.html#label_canOverride[overridden] |
| 3964 | by child projects. |
| 3965 | |`copy_any_score`|optional| |
| 3966 | Whether link:config-labels.html#label_copyAnyScore[copyAnyScore] is set on the |
| 3967 | label. |
| 3968 | |`copy_min_score`|optional| |
| 3969 | Whether link:config-labels.html#label_copyMinScore[copyMinScore] is set on the |
| 3970 | label. |
| 3971 | |`copy_max_score`|optional| |
| 3972 | Whether link:config-labels.html#label_copyMaxScore[copyMaxScore] is set on the |
| 3973 | label. |
| 3974 | |`copy_all_scores_if_no_change`|optional| |
| 3975 | Whether link:config-labels.html#label_copyAllScoresIfNoChange[ |
| 3976 | copyAllScoresIfNoChange] is set on the label. |
| 3977 | |`copy_all_scores_if_no_code_change`|optional| |
| 3978 | Whether link:config-labels.html#label_copyAllScoresIfNoCodeChange[ |
| 3979 | copyAllScoresIfNoCodeChange] is set on the label. |
| 3980 | |`copy_all_scores_on_trivial_rebase`|optional| |
| 3981 | Whether link:config-labels.html#label_copyAllScoresOnTrivialRebase[ |
| 3982 | copyAllScoresOnTrivialRebase] is set on the label. |
| 3983 | |`copy_all_scores_on_merge_first_parent_update`|optional| |
| 3984 | Whether link:config-labels.html#label_copyAllScoresOnMergeFirstParentUpdate[ |
| 3985 | copyAllScoresOnMergeFirstParentUpdate] is set on the label. |
Edwin Kempin | 33c13a4 | 2020-01-10 11:38:06 +0100 | [diff] [blame] | 3986 | |`copy_values` |optional| |
| 3987 | List of values that should be copied forward when a new patch set is uploaded. |
Edwin Kempin | b5e8745 | 2019-10-25 13:28:46 +0200 | [diff] [blame] | 3988 | |`allow_post_submit`|optional| |
| 3989 | Whether link:config-labels.html#label_allowPostSubmit[allowPostSubmit] is set |
| 3990 | on the label. |
| 3991 | |`ignore_self_approval`|optional| |
| 3992 | Whether link:config-labels.html#label_ignoreSelfApproval[ignoreSelfApproval] is |
| 3993 | set on the label. |
| 3994 | |============================= |
| 3995 | |
Han-Wen Nienhuys | 22f2774 | 2017-06-27 18:01:07 +0200 | [diff] [blame] | 3996 | [[label-type-info]] |
| 3997 | === LabelTypeInfo |
| 3998 | The `LabelTypeInfo` entity contains metadata about the labels that a |
| 3999 | project has. |
| 4000 | |
| 4001 | [options="header",cols="1,^2,4"] |
| 4002 | |================================ |
| 4003 | |Field Name ||Description |
| 4004 | |`values` ||Map of the available values to their description. |
| 4005 | |`default_value` ||The default value of this label. |
| 4006 | |================================ |
| 4007 | |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 4008 | [[max-object-size-limit-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4009 | === MaxObjectSizeLimitInfo |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 4010 | The `MaxObjectSizeLimitInfo` entity contains information about the |
| 4011 | link:config-gerrit.html#receive.maxObjectSizeLimit[max object size |
| 4012 | limit] of a project. |
| 4013 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4014 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 4015 | |=============================== |
| 4016 | |Field Name ||Description |
| 4017 | |`value` |optional| |
David Pursehouse | 33f544a | 2018-08-20 12:20:18 +0900 | [diff] [blame] | 4018 | The effective value in bytes of the max object size limit. + |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 4019 | Not set if there is no limit for the object size. |
| 4020 | |`configured_value`|optional| |
| 4021 | The max object size limit that is configured on the project as a |
| 4022 | formatted string. + |
| 4023 | Not set if there is no limit for the object size configured on project |
| 4024 | level. |
David Pursehouse | 81f2b5c | 2018-08-23 14:44:14 +0900 | [diff] [blame] | 4025 | |`summary` |optional| |
| 4026 | A string describing whether the value was inherited or overridden from |
| 4027 | the parent project or global config. + |
| 4028 | Not set if not inherited or overridden. |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 4029 | |=============================== |
| 4030 | |
Edwin Kempin | 83d6d22 | 2019-10-28 13:45:52 +0100 | [diff] [blame] | 4031 | [[batch-label-input]] |
| 4032 | === BatchLabelInput |
| 4033 | The `BatchLabelInput` entity contains information for batch updating label |
| 4034 | definitions in a project. |
| 4035 | |
| 4036 | [options="header",cols="1,^2,4"] |
| 4037 | |============================= |
| 4038 | |Field Name ||Description |
| 4039 | |`commit_message`|optional| |
| 4040 | Message that should be used to commit the label updates in the |
| 4041 | `project.config` file to the `refs/meta/config` branch. |
| 4042 | |`delete` |optional| |
| 4043 | List of labels that should be deleted. |
| 4044 | |`create` |optional| |
| 4045 | List of link:#label-definition-input[LabelDefinitionInput] entities that |
| 4046 | describe labels that should be created. |
| 4047 | |`update` |optional| |
| 4048 | Map of label names to link:#label-definition-input[LabelDefinitionInput] |
| 4049 | entities that describe the updates that should be done for the labels. |
| 4050 | |============================= |
| 4051 | |
Patrick Hiesel | 21816f1 | 2016-04-22 08:53:06 +0200 | [diff] [blame] | 4052 | [[project-access-input]] |
| 4053 | === ProjectAccessInput |
| 4054 | The `ProjectAccessInput` describes changes that should be applied to a project |
| 4055 | access config. |
| 4056 | |
| 4057 | [options="header",cols="1,^2,4"] |
| 4058 | |============================= |
| 4059 | |Field Name | |Description |
| 4060 | |`remove` |optional| |
| 4061 | A list of deductions to be applied to the project access as |
| 4062 | link:rest-api-access.html#project-access-info[ProjectAccessInfo] entities. |
| 4063 | |`add` |optional| |
| 4064 | A list of additions to be applied to the project access as |
| 4065 | link:rest-api-access.html#project-access-info[ProjectAccessInfo] entities. |
| 4066 | |`message` |optional| |
| 4067 | A commit message for this change. |
| 4068 | |`parent` |optional| |
| 4069 | A new parent for the project to inherit from. Changing the parent project |
| 4070 | requires administrative privileges. |
| 4071 | |============================= |
| 4072 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 4073 | [[project-description-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4074 | === ProjectDescriptionInput |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 4075 | The `ProjectDescriptionInput` entity contains information for setting a |
| 4076 | project description. |
| 4077 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4078 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 4079 | |============================= |
| 4080 | |Field Name ||Description |
| 4081 | |`description` |optional|The project description. + |
| 4082 | The project description will be deleted if not set. |
| 4083 | |`commit_message`|optional| |
| 4084 | Message that should be used to commit the change of the project |
| 4085 | description in the `project.config` file to the `refs/meta/config` |
| 4086 | branch. |
| 4087 | |============================= |
| 4088 | |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 4089 | [[project-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4090 | === ProjectInfo |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 4091 | The `ProjectInfo` entity contains information about a project. |
| 4092 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4093 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 4094 | |=========================== |
| 4095 | |Field Name ||Description |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 4096 | |`id` ||The URL encoded project name. |
| 4097 | |`name` | |
| 4098 | not set if returned in a map where the project name is used as map key| |
| 4099 | The name of the project. |
Edwin Kempin | f361182 | 2013-03-19 08:23:09 +0100 | [diff] [blame] | 4100 | |`parent` |optional| |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 4101 | The name of the parent project. + |
| 4102 | `?-<n>` if the parent project is not visible (`<n>` is a number which |
| 4103 | is increased for each non-visible project). |
| 4104 | |`description` |optional|The description of the project. |
Shawn Pearce | 21a6c21 | 2014-04-23 12:35:10 -0700 | [diff] [blame] | 4105 | |`state` |optional|`ACTIVE`, `READ_ONLY` or `HIDDEN`. |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 4106 | |`branches` |optional|Map of branch names to HEAD revisions. |
Han-Wen Nienhuys | 22f2774 | 2017-06-27 18:01:07 +0200 | [diff] [blame] | 4107 | |`labels` |optional| |
| 4108 | Map of label names to |
| 4109 | link:#label-type-info[LabelTypeInfo] entries. |
| 4110 | This field is filled for link:#create-project[Create Project] and |
| 4111 | link:#get-project[Get Project] calls. |
Edwin Kempin | 26c95a4 | 2014-11-25 16:29:47 +0100 | [diff] [blame] | 4112 | |`web_links` |optional| |
Edwin Kempin | ea00475 | 2014-04-11 15:56:02 +0200 | [diff] [blame] | 4113 | Links to the project in external sites as a list of |
| 4114 | link:rest-api-changes.html#web-link-info[WebLinkInfo] entries. |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 4115 | |=========================== |
| 4116 | |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4117 | [[project-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4118 | === ProjectInput |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4119 | The `ProjectInput` entity contains information for the creation of |
| 4120 | a new project. |
| 4121 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4122 | [options="header",cols="1,^2,4"] |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4123 | |========================================= |
| 4124 | |Field Name ||Description |
| 4125 | |`name` |optional| |
| 4126 | The name of the project (not encoded). + |
David Pursehouse | 8c5ad41 | 2015-02-03 14:19:09 +0900 | [diff] [blame] | 4127 | If set, must match the project name in the URL. + |
| 4128 | If name ends with `.git` the suffix will be automatically removed. |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4129 | |`parent` |optional| |
| 4130 | The name of the parent project. + |
| 4131 | If not set, the `All-Projects` project will be the parent project. |
| 4132 | |`description` |optional|The description of the project. |
| 4133 | |`permissions_only` |`false` if not set| |
| 4134 | Whether a permission-only project should be created. |
| 4135 | |`create_empty_commit` |`false` if not set| |
| 4136 | Whether an empty initial commit should be created. |
| 4137 | |`submit_type` |optional| |
| 4138 | The submit type that should be set for the project |
Gert van Dijk | a4e49d0 | 2017-08-27 22:50:40 +0200 | [diff] [blame] | 4139 | (`MERGE_IF_NECESSARY`, `REBASE_IF_NECESSARY`, `REBASE_ALWAYS`, |
| 4140 | `FAST_FORWARD_ONLY`, `MERGE_ALWAYS`, `CHERRY_PICK`). + |
Edwin Kempin | a79ea55 | 2013-11-19 11:24:37 +0100 | [diff] [blame] | 4141 | If not set, `MERGE_IF_NECESSARY` is set as submit type unless |
| 4142 | link:config-gerrit.html#repository.name.defaultSubmitType[ |
| 4143 | repository.<name>.defaultSubmitType] is set to a different value. |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4144 | |`branches` |optional| |
| 4145 | A list of branches that should be initially created. + |
| 4146 | For the branch names the `refs/heads/` prefix can be omitted. |
| 4147 | |`owners` |optional| |
| 4148 | A list of groups that should be assigned as project owner. + |
| 4149 | Each group in the list must be specified as |
| 4150 | link:rest-api-groups.html#group-id[group-id]. + |
| 4151 | If not set, the link:config-gerrit.html#repository.name.ownerGroup[ |
| 4152 | groups that are configured as default owners] are set as project |
| 4153 | owners. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 4154 | |`use_contributor_agreements` |`INHERIT` if not set| |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4155 | Whether contributor agreements should be used for the project (`TRUE`, |
| 4156 | `FALSE`, `INHERIT`). |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 4157 | |`use_signed_off_by` |`INHERIT` if not set| |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4158 | Whether the usage of 'Signed-Off-By' footers is required for the |
| 4159 | project (`TRUE`, `FALSE`, `INHERIT`). |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 4160 | |`create_new_change_for_all_not_in_target` |`INHERIT` if not set| |
| 4161 | Whether a new change is created for every commit not in target branch |
| 4162 | for the project (`TRUE`, `FALSE`, `INHERIT`). |
| 4163 | |`use_content_merge` |`INHERIT` if not set| |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4164 | Whether content merge should be enabled for the project (`TRUE`, |
| 4165 | `FALSE`, `INHERIT`). + |
| 4166 | `FALSE`, if the `submit_type` is `FAST_FORWARD_ONLY`. |
Han-Wen Nienhuys | cdde7a30 | 2019-07-24 12:19:16 +0200 | [diff] [blame] | 4167 | |`require_change_id` |`INHERIT` if not set| |
| 4168 | Whether the usage of Change-Ids is required for the project (`TRUE`, |
| 4169 | `FALSE`, `INHERIT`). |
| 4170 | This property is deprecated and will be removed in |
| 4171 | a future release. |
David Ostrovsky | 1c6ff2e | 2018-09-18 07:52:51 +0200 | [diff] [blame] | 4172 | |`enable_signed_push` |`INHERIT` if not set| |
| 4173 | Whether signed push validation is enabled on the project (`TRUE`, |
| 4174 | `FALSE`, `INHERIT`). |
| 4175 | |`require_signed_push` |`INHERIT` if not set| |
| 4176 | Whether signed push validation is required on the project (`TRUE`, |
| 4177 | `FALSE`, `INHERIT`). |
Sasa Zivkov | 6b40cb4 | 2013-07-01 15:28:22 +0200 | [diff] [blame] | 4178 | |`max_object_size_limit` |optional| |
| 4179 | Max allowed Git object size for this project. |
| 4180 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
Edwin Kempin | fb053c3 | 2013-12-04 20:32:41 +0100 | [diff] [blame] | 4181 | |`plugin_config_values` |optional| |
| 4182 | Plugin configuration values as map which maps the plugin name to a map |
| 4183 | of parameter names to values. |
Patrick Hiesel | dc285c7 | 2018-01-08 17:20:15 +0100 | [diff] [blame] | 4184 | |`reject_empty_commit` |optional| |
| 4185 | Whether empty commits should be rejected when a change is merged |
| 4186 | (`TRUE`, `FALSE`, `INHERIT`). |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4187 | |========================================= |
| 4188 | |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 4189 | [[project-parent-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4190 | === ProjectParentInput |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 4191 | The `ProjectParentInput` entity contains information for setting a |
| 4192 | project parent. |
| 4193 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4194 | [options="header",cols="1,^2,4"] |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 4195 | |============================= |
| 4196 | |Field Name ||Description |
| 4197 | |`parent` ||The name of the parent project. |
| 4198 | |`commit_message`|optional| |
| 4199 | Message that should be used to commit the change of the project parent |
| 4200 | in the `project.config` file to the `refs/meta/config` branch. |
| 4201 | |============================= |
| 4202 | |
Edwin Kempin | 87504d9 | 2014-07-04 12:59:19 +0200 | [diff] [blame] | 4203 | [[reflog-entry-info]] |
| 4204 | === ReflogEntryInfo |
| 4205 | The `ReflogEntryInfo` entity describes an entry in a reflog. |
| 4206 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4207 | [options="header",cols="1,6"] |
Edwin Kempin | 87504d9 | 2014-07-04 12:59:19 +0200 | [diff] [blame] | 4208 | |============================ |
| 4209 | |Field Name |Description |
| 4210 | |`old_id` |The old commit ID. |
| 4211 | |`new_id` |The new commit ID. |
| 4212 | |`who` | |
| 4213 | The user performing the change as a |
| 4214 | link:rest-api-changes.html#git-person-info[GitPersonInfo] entity. |
| 4215 | |`comment` |Comment of the reflog entry. |
| 4216 | |============================ |
| 4217 | |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 4218 | [[repository-statistics-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4219 | === RepositoryStatisticsInfo |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 4220 | The `RepositoryStatisticsInfo` entity contains information about |
| 4221 | statistics of a Git repository. |
| 4222 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4223 | [options="header",cols="1,6"] |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 4224 | |====================================== |
| 4225 | |Field Name |Description |
| 4226 | |`number_of_loose_objects` |Number of loose objects. |
| 4227 | |`number_of_loose_refs` |Number of loose refs. |
| 4228 | |`number_of_pack_files` |Number of pack files. |
| 4229 | |`number_of_packed_objects`|Number of packed objects. |
| 4230 | |`number_of_packed_refs` |Number of packed refs. |
| 4231 | |`size_of_loose_objects` |Size of loose objects in bytes. |
| 4232 | |`size_of_packed_objects` |Size of packed objects in bytes. |
| 4233 | |====================================== |
| 4234 | |
Dave Borowitz | c8f8d2e | 2017-10-23 11:18:23 -0400 | [diff] [blame] | 4235 | [[submit-type-info]] |
| 4236 | === SubmitTypeInfo |
Changcheng Xiao | 2188598 | 2019-01-15 18:16:51 +0100 | [diff] [blame] | 4237 | Information about the link:config-project-config.html#submit-type[default submit |
Dave Borowitz | c8f8d2e | 2017-10-23 11:18:23 -0400 | [diff] [blame] | 4238 | type of a project], taking into account project inheritance. |
| 4239 | |
| 4240 | Valid values for each field are `MERGE_IF_NECESSARY`, `FAST_FORWARD_ONLY`, |
| 4241 | `REBASE_IF_NECESSARY`, `REBASE_ALWAYS`, `MERGE_ALWAYS` or `CHERRY_PICK`, plus |
| 4242 | `INHERIT` where applicable. |
| 4243 | |
| 4244 | [options="header",cols="1,6"] |
| 4245 | |=============================== |
| 4246 | |Field Name |Description |
| 4247 | |`value` | |
| 4248 | The effective submit type value. Never `INHERIT`. |
| 4249 | |`configured_value` | |
| 4250 | The configured value, can be one of the submit types, or `INHERIT` to inherit |
| 4251 | from the parent project. |
| 4252 | |`inherited_value` | |
| 4253 | The effective value that would be inherited from the parent. Never `INHERIT`. |
| 4254 | |=============================== |
| 4255 | |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 4256 | [[tag-info]] |
| 4257 | === TagInfo |
| 4258 | The `TagInfo` entity contains information about a tag. |
| 4259 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4260 | [options="header",cols="1,^2,4"] |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 4261 | |========================= |
| 4262 | |Field Name ||Description |
| 4263 | |`ref` ||The ref of the tag. |
| 4264 | |`revision` ||For lightweight tags, the revision of the commit to which the tag |
| 4265 | points. For annotated tags, the revision of the tag object. |
| 4266 | |`object`|Only set for annotated tags.|The revision of the object to which the |
| 4267 | tag points. |
| 4268 | |`message`|Only set for annotated tags.|The tag message. For signed tags, includes |
| 4269 | the signature. |
David Pursehouse | c9f5a5a | 2015-12-07 19:13:16 +0900 | [diff] [blame] | 4270 | |`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] | 4271 | link:rest-api-changes.html#git-person-info[GitPersonInfo] entity. |
David Pursehouse | c4e4d93 | 2017-11-10 10:17:46 +0900 | [diff] [blame] | 4272 | |`created`|optional|The link:rest-api.html#timestamp[timestamp] of when the tag |
| 4273 | was created. For annotated and signed tags, this is the timestamp of the tag object |
| 4274 | and is the same as the `date` field in the `tagger`. For lightweight tags, it is |
| 4275 | the commit timestamp of the commit to which the tag points, when the object is a |
| 4276 | commit. It is not set when the object is any other type. |
David Pursehouse | d00515e | 2017-11-10 15:57:41 +0900 | [diff] [blame] | 4277 | |`can_delete`|not set if `false`| |
David Pursehouse | 23669da | 2017-02-23 13:43:57 +0900 | [diff] [blame] | 4278 | Whether the calling user can delete this tag. |
Paladox none | 34da15c | 2017-07-01 14:49:10 +0000 | [diff] [blame] | 4279 | |`web_links` |optional| |
| 4280 | Links to the tag in external sites as a list of |
| 4281 | link:rest-api-changes.html#web-link-info[WebLinkInfo] entries. |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 4282 | |========================= |
| 4283 | |
David Pursehouse | 6a44619 | 2016-06-03 10:00:34 +0900 | [diff] [blame] | 4284 | [[tag-input]] |
| 4285 | === TagInput |
| 4286 | |
| 4287 | The `TagInput` entity contains information for creating a tag. |
| 4288 | |
| 4289 | [options="header",cols="1,^2,4"] |
| 4290 | |========================= |
| 4291 | |Field Name ||Description |
| 4292 | |`ref` ||The name of the tag. The leading `refs/tags/` is optional. |
| 4293 | |`revision` |optional|The revision to which the tag should point. If not |
| 4294 | specified, the project's `HEAD` will be used. |
| 4295 | |`message` |optional|The tag message. When set, the tag will be created |
| 4296 | as an annotated tag. |
| 4297 | |========================= |
| 4298 | |
| 4299 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 4300 | GERRIT |
| 4301 | ------ |
| 4302 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 4303 | |
| 4304 | SEARCHBOX |
| 4305 | --------- |