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` |
Nasser Grainawi | f7059c7 | 2021-09-22 19:44:39 -0600 | [diff] [blame] | 424 | parameter. The results will skip `start` projects from project list. |
Xin Sun | d8dd153 | 2017-07-18 17:13:52 -0700 | [diff] [blame] | 425 | |
| 426 | Query 25 projects starting from index 50. |
| 427 | ---- |
Nasser Grainawi | f7059c7 | 2021-09-22 19:44:39 -0600 | [diff] [blame] | 428 | GET /projects/?query=<query>&limit=25&start=50 HTTP/1.0 |
Xin Sun | d8dd153 | 2017-07-18 17:13:52 -0700 | [diff] [blame] | 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", |
Patrick Hiesel | e587c40 | 2020-08-07 16:11:29 +0200 | [diff] [blame] | 1156 | "name": "Service Users" |
Han-Wen Nienhuys | e2258f6e | 2017-08-08 15:38:18 -0300 | [diff] [blame] | 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 | a4726c3 | 2019-10-14 17:47:42 +0200 | [diff] [blame] | 1256 | [[create-change]] |
| 1257 | === Create Change for review. |
| 1258 | |
| 1259 | This endpoint is functionally equivalent to |
| 1260 | link:rest-api-changes.html#create-change[create change in the change |
| 1261 | API], but it has the project name in the URL, which is easier to route |
| 1262 | in sharded deployments. |
| 1263 | |
| 1264 | .Request |
| 1265 | ---- |
| 1266 | POST /projects/myProject/create.change HTTP/1.0 |
| 1267 | Content-Type: application/json; charset=UTF-8 |
| 1268 | |
| 1269 | { |
| 1270 | "subject" : "Let's support 100% Gerrit workflow direct in browser", |
| 1271 | "branch" : "master", |
| 1272 | "topic" : "create-change-in-browser", |
| 1273 | "status" : "NEW" |
| 1274 | } |
| 1275 | ---- |
| 1276 | |
| 1277 | As response a link:#change-info[ChangeInfo] entity is returned that describes |
| 1278 | the resulting change. |
| 1279 | |
| 1280 | .Response |
| 1281 | ---- |
| 1282 | HTTP/1.1 201 OK |
| 1283 | Content-Disposition: attachment |
| 1284 | Content-Type: application/json; charset=UTF-8 |
| 1285 | |
| 1286 | )]}' |
| 1287 | { |
| 1288 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 1289 | "project": "myProject", |
| 1290 | "branch": "master", |
| 1291 | "topic": "create-change-in-browser", |
| 1292 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 1293 | "subject": "Let's support 100% Gerrit workflow direct in browser", |
| 1294 | "status": "NEW", |
| 1295 | "created": "2014-05-05 07:15:44.639000000", |
| 1296 | "updated": "2014-05-05 07:15:44.639000000", |
| 1297 | "mergeable": true, |
| 1298 | "insertions": 0, |
| 1299 | "deletions": 0, |
| 1300 | "_number": 4711, |
| 1301 | "owner": { |
| 1302 | "name": "John Doe" |
| 1303 | } |
| 1304 | } |
| 1305 | ---- |
| 1306 | |
Han-Wen Nienhuys | 4f6fab3 | 2017-09-07 15:26:54 +0200 | [diff] [blame] | 1307 | [[create-access-change]] |
| 1308 | === Create Access Rights Change for review. |
| 1309 | -- |
| 1310 | 'PUT /projects/link:rest-api-projects.html#project-name[\{project-name\}]/access:review |
| 1311 | -- |
| 1312 | |
| 1313 | Sets access rights for the project using the diff schema provided by |
| 1314 | link:#project-access-input[ProjectAccessInput] |
| 1315 | |
| 1316 | This takes the same input as link:#set-access[Update Access Rights], but creates a pending |
| 1317 | change for review. Like link:#create-change[Create Change], it returns |
| 1318 | a link:#change-info[ChangeInfo] entity describing the resulting change. |
| 1319 | |
| 1320 | .Request |
| 1321 | ---- |
| 1322 | PUT /projects/MyProject/access:review HTTP/1.0 |
| 1323 | Content-Type: application/json; charset=UTF-8 |
| 1324 | |
| 1325 | { |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 1326 | "add": { |
| 1327 | "refs/heads/*": { |
| 1328 | "permissions": { |
| 1329 | "read": { |
| 1330 | "rules": { |
Han-Wen Nienhuys | 4f6fab3 | 2017-09-07 15:26:54 +0200 | [diff] [blame] | 1331 | "global:Anonymous-Users": { |
Edwin Kempin | e813c5a | 2019-03-13 09:51:12 +0100 | [diff] [blame] | 1332 | "action": "DENY", |
| 1333 | "force": false |
Han-Wen Nienhuys | 4f6fab3 | 2017-09-07 15:26:54 +0200 | [diff] [blame] | 1334 | } |
| 1335 | } |
| 1336 | } |
| 1337 | } |
| 1338 | } |
| 1339 | } |
| 1340 | } |
| 1341 | ---- |
| 1342 | |
| 1343 | .Response |
| 1344 | ---- |
| 1345 | HTTP/1.1 200 OK |
| 1346 | Content-Type: application/json; charset=UTF-8 |
| 1347 | |
| 1348 | )]}' |
| 1349 | { |
| 1350 | "id": "testproj~refs%2Fmeta%2Fconfig~Ieaf185bf90a1fc3b58461e399385e158a20b31a2", |
| 1351 | "project": "testproj", |
| 1352 | "branch": "refs/meta/config", |
| 1353 | "hashtags": [], |
| 1354 | "change_id": "Ieaf185bf90a1fc3b58461e399385e158a20b31a2", |
| 1355 | "subject": "Review access change", |
| 1356 | "status": "NEW", |
| 1357 | "created": "2017-09-07 14:31:11.852000000", |
| 1358 | "updated": "2017-09-07 14:31:11.852000000", |
| 1359 | "submit_type": "CHERRY_PICK", |
| 1360 | "mergeable": true, |
| 1361 | "insertions": 2, |
| 1362 | "deletions": 0, |
| 1363 | "unresolved_comment_count": 0, |
| 1364 | "has_review_started": true, |
| 1365 | "_number": 7, |
| 1366 | "owner": { |
| 1367 | "_account_id": 1000000 |
| 1368 | } |
| 1369 | } |
| 1370 | ---- |
| 1371 | |
Han-Wen Nienhuys | d1ed08d | 2017-09-04 18:13:23 +0200 | [diff] [blame] | 1372 | [[check-access]] |
| 1373 | === Check Access |
| 1374 | -- |
Han-Wen Nienhuys | 751e824 | 2018-10-01 16:43:05 +0200 | [diff] [blame] | 1375 | '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] | 1376 | -- |
| 1377 | |
Han-Wen Nienhuys | 751e824 | 2018-10-01 16:43:05 +0200 | [diff] [blame] | 1378 | This command runs access checks for other users. This requires the |
| 1379 | link:access-control.html#capability_viewAccess[View Access] global |
| 1380 | capability. |
Han-Wen Nienhuys | d1ed08d | 2017-09-04 18:13:23 +0200 | [diff] [blame] | 1381 | |
| 1382 | The result is a link:#access-check-info[AccessCheckInfo] entity |
Han-Wen Nienhuys | 8a4a682 | 2018-01-18 19:27:46 +0100 | [diff] [blame] | 1383 | detailing the access of the given user for the given project, |
| 1384 | project-ref, or project-permission-ref combination. |
Han-Wen Nienhuys | d1ed08d | 2017-09-04 18:13:23 +0200 | [diff] [blame] | 1385 | |
| 1386 | .Response |
| 1387 | ---- |
| 1388 | HTTP/1.1 200 OK |
| 1389 | Content-Type: application/json; charset=UTF-8 |
| 1390 | |
| 1391 | )]}' |
| 1392 | { |
| 1393 | "message": "user Kristen Burns \u003cKristen.Burns@gerritcodereview.com\u003e (1000098) cannot see ref refs/heads/secret/bla in project MyProject", |
| 1394 | "status": 403 |
| 1395 | } |
| 1396 | ---- |
Han-Wen Nienhuys | 4f6fab3 | 2017-09-07 15:26:54 +0200 | [diff] [blame] | 1397 | |
Han-Wen Nienhuys | 751e824 | 2018-10-01 16:43:05 +0200 | [diff] [blame] | 1398 | [[check-access-options]] |
| 1399 | ==== Check Access Options |
Han-Wen Nienhuys | 5b089f2 | 2018-04-17 16:26:44 +0200 | [diff] [blame] | 1400 | |
Han-Wen Nienhuys | 751e824 | 2018-10-01 16:43:05 +0200 | [diff] [blame] | 1401 | Account(account):: |
| 1402 | The account for which to check access. Mandatory. |
Han-Wen Nienhuys | 5b089f2 | 2018-04-17 16:26:44 +0200 | [diff] [blame] | 1403 | |
Han-Wen Nienhuys | 751e824 | 2018-10-01 16:43:05 +0200 | [diff] [blame] | 1404 | Permission(perm):: |
| 1405 | The ref permission for which to check access. If not specified, read |
| 1406 | access to at least branch is checked. |
| 1407 | |
| 1408 | Ref(ref):: |
| 1409 | The branch for which to check access. This must be given if `perm` is specified. |
| 1410 | |
Hector Oswaldo Caballero | 2b4239a | 2017-02-13 07:40:33 -0500 | [diff] [blame] | 1411 | [[index]] |
Patrick Hiesel | 20d981e | 2018-07-04 09:48:21 +0200 | [diff] [blame] | 1412 | === Index project |
| 1413 | |
| 1414 | 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] | 1415 | The indexing task is executed asynchronously in background and this command returns |
| 1416 | immediately if `async` is specified in the input. |
Patrick Hiesel | 20d981e | 2018-07-04 09:48:21 +0200 | [diff] [blame] | 1417 | |
| 1418 | As an input, a link:#index-project-input[IndexProjectInput] entity can be provided. |
| 1419 | |
| 1420 | .Request |
| 1421 | ---- |
| 1422 | POST /projects/MyProject/index HTTP/1.0 |
| 1423 | Content-Type: application/json; charset=UTF-8 |
| 1424 | |
| 1425 | { |
| 1426 | "index_children": "true" |
Patrick Hiesel | 6b7d9b1 | 2018-07-10 14:11:35 +0200 | [diff] [blame] | 1427 | "async": "true" |
Patrick Hiesel | 20d981e | 2018-07-04 09:48:21 +0200 | [diff] [blame] | 1428 | } |
| 1429 | ---- |
| 1430 | |
| 1431 | .Response |
| 1432 | ---- |
| 1433 | HTTP/1.1 202 Accepted |
| 1434 | Content-Disposition: attachment |
| 1435 | ---- |
| 1436 | |
| 1437 | [[index.changes]] |
Hector Oswaldo Caballero | 2b4239a | 2017-02-13 07:40:33 -0500 | [diff] [blame] | 1438 | === Index all changes in a project |
| 1439 | |
| 1440 | Adds or updates all the changes belonging to a project in the secondary index. |
| 1441 | The indexing task is executed asynchronously in background, so this command |
| 1442 | returns immediately. |
| 1443 | |
| 1444 | .Request |
| 1445 | ---- |
Patrick Hiesel | 20d981e | 2018-07-04 09:48:21 +0200 | [diff] [blame] | 1446 | POST /projects/MyProject/index.changes HTTP/1.0 |
Hector Oswaldo Caballero | 2b4239a | 2017-02-13 07:40:33 -0500 | [diff] [blame] | 1447 | ---- |
| 1448 | |
| 1449 | .Response |
| 1450 | ---- |
Edwin Kempin | 4145f97 | 2018-01-12 16:30:44 +0100 | [diff] [blame] | 1451 | HTTP/1.1 202 Accepted |
| 1452 | Content-Disposition: attachment |
Hector Oswaldo Caballero | 2b4239a | 2017-02-13 07:40:33 -0500 | [diff] [blame] | 1453 | ---- |
| 1454 | |
Edwin Kempin | bf9df39 | 2018-01-12 15:20:48 +0100 | [diff] [blame] | 1455 | [[check]] |
| 1456 | === Check project consistency |
| 1457 | |
| 1458 | Performs consistency checks on the project. |
| 1459 | |
| 1460 | Which consistency checks should be performed is controlled by the |
| 1461 | link:#check-project-input[CheckProjectInput] entity in the request |
| 1462 | body. |
| 1463 | |
| 1464 | The following consistency checks are supported: |
| 1465 | |
| 1466 | [[auto-closeable-changes-check]] |
| 1467 | -- |
| 1468 | * AutoCloseableChangesCheck: Searches for open changes that can be |
| 1469 | auto-closed because a patch set of the change is already contained in |
| 1470 | the destination branch or because the destination branch contains a |
| 1471 | commit with the same Change-Id. Normally Gerrit auto-closes such |
| 1472 | changes when the corresponding commits are pushed directly to the |
| 1473 | repository. However if a branch is updated behind Gerrit's back or if |
| 1474 | auto-closing changes fails (and the push is still successful) change |
| 1475 | states can get inconsistent (changes that are already part of the |
| 1476 | destination branch are still open). This consistency check is |
| 1477 | intended to detect and repair this situation. |
| 1478 | -- |
| 1479 | |
| 1480 | To fix any problems that can be fixed automatically set the `fix` field |
| 1481 | in the inputs for the consistency checks to `true`. |
| 1482 | |
| 1483 | This REST endpoint requires the |
| 1484 | link:access-control.html#capability_administrateServer[Administrate Server] |
| 1485 | global capability. |
| 1486 | |
| 1487 | .Request |
| 1488 | ---- |
| 1489 | POST /projects/MyProject/check HTTP/1.0 |
| 1490 | Content-Type: application/json; charset=UTF-8 |
| 1491 | |
| 1492 | { |
| 1493 | "auto_closeable_changes_check": { |
| 1494 | "fix": true, |
| 1495 | "branch": "refs/heads/master", |
| 1496 | "max_commits": 100 |
| 1497 | } |
| 1498 | } |
| 1499 | ---- |
| 1500 | |
| 1501 | As response a link:#check-project-result-info[CheckProjectResultInfo] |
| 1502 | entity is returned that results for the consistency checks. |
| 1503 | |
| 1504 | .Response |
| 1505 | ---- |
| 1506 | HTTP/1.1 200 OK |
| 1507 | Content-Disposition: attachment |
| 1508 | Content-Type: application/json; charset=UTF-8 |
| 1509 | |
| 1510 | )]}' |
| 1511 | { |
| 1512 | "auto_closeable_changes_check_result": { |
| 1513 | "auto_closeable_changes": { |
| 1514 | "refs/heads/master": [ |
| 1515 | { |
| 1516 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1517 | "project": "myProject", |
| 1518 | "branch": "master", |
| 1519 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9940", |
| 1520 | "subject": "Implementing Feature X", |
| 1521 | "status": "NEW", |
| 1522 | "created": "2013-02-01 09:59:32.126000000", |
| 1523 | "updated": "2013-02-21 11:16:36.775000000", |
| 1524 | "insertions": 34, |
| 1525 | "deletions": 101, |
| 1526 | "_number": 3965, |
| 1527 | "owner": { |
| 1528 | "name": "John Doe" |
| 1529 | }, |
| 1530 | "problems": [ |
| 1531 | { |
| 1532 | "message": "Patch set 1 (2f15e416237ed9b561199f24184f5f5d2708c584) is merged into destination ref refs/heads/master (2f15e416237ed9b561199f24184f5f5d2708c584), but change status is NEW", |
| 1533 | "status": "FIXED", |
| 1534 | "outcome": "Marked change as merged" |
| 1535 | } |
| 1536 | ] |
| 1537 | } |
| 1538 | ] |
| 1539 | } |
| 1540 | } |
| 1541 | } |
| 1542 | ---- |
| 1543 | |
Prudhvi Akhil Alahari | 559132d | 2021-09-28 18:27:44 +0530 | [diff] [blame] | 1544 | [[commits-included-in]] |
| 1545 | === Get Commits Included In Refs |
| 1546 | -- |
| 1547 | 'GET /projects/link:#project-name[\{project-name\}]/commits:in' |
| 1548 | -- |
| 1549 | |
| 1550 | Gets refs in which the specified commits were merged into. Returns a map of commits |
| 1551 | to sets of full ref names. |
| 1552 | |
| 1553 | One or more `commit` query parameters are required and each specifies a |
| 1554 | commit-id (SHA-1 in 40 digit hex representation). Commits will not be contained |
| 1555 | in the map if they do not exist or are not reachable from visible, specified refs. |
| 1556 | |
| 1557 | One or more `ref` query parameters are required and each specifies a full ref name. |
| 1558 | Refs which are not visible to the calling user according to the project's read |
| 1559 | permissions and refs which do not exist will be filtered out from the result. |
| 1560 | |
| 1561 | .Request |
| 1562 | ---- |
| 1563 | GET /projects/work%2Fmy-project/commits:in?commit=a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96&commit=6d2a3adb10e844c33617fc948dbeb88e868d396e&ref=refs/heads/master&ref=refs/heads/branch1 HTTP/1.0 |
| 1564 | ---- |
| 1565 | |
| 1566 | .Response |
| 1567 | ---- |
| 1568 | HTTP/1.1 200 OK |
| 1569 | Content-Disposition: attachment |
| 1570 | Content-Type: application/json;charset=UTF-8 |
| 1571 | |
| 1572 | )]}' |
| 1573 | { |
| 1574 | "a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96": [ |
| 1575 | "refs/heads/master" |
| 1576 | ], |
| 1577 | "6d2a3adb10e844c33617fc948dbeb88e868d396e": [ |
| 1578 | "refs/heads/branch1", |
| 1579 | "refs/heads/master" |
| 1580 | ] |
| 1581 | } |
| 1582 | |
| 1583 | ---- |
| 1584 | |
Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1585 | [[branch-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1586 | == Branch Endpoints |
Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1587 | |
| 1588 | [[list-branches]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1589 | === List Branches |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1590 | -- |
Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1591 | 'GET /projects/link:#project-name[\{project-name\}]/branches/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1592 | -- |
Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1593 | |
| 1594 | List the branches of a project. |
| 1595 | |
| 1596 | As result a list of link:#branch-info[BranchInfo] entries is |
| 1597 | returned. |
| 1598 | |
| 1599 | .Request |
| 1600 | ---- |
| 1601 | GET /projects/work%2Fmy-project/branches/ HTTP/1.0 |
| 1602 | ---- |
| 1603 | |
| 1604 | .Response |
| 1605 | ---- |
| 1606 | HTTP/1.1 200 OK |
| 1607 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1608 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1609 | |
| 1610 | )]}' |
| 1611 | [ |
| 1612 | { |
| 1613 | "ref": "HEAD", |
| 1614 | "revision": "master" |
| 1615 | }, |
| 1616 | { |
| 1617 | "ref": "refs/meta/config", |
| 1618 | "revision": "76016386a0d8ecc7b6be212424978bb45959d668" |
| 1619 | }, |
| 1620 | { |
| 1621 | "ref": "refs/heads/master", |
| 1622 | "revision": "67ebf73496383c6777035e374d2d664009e2aa5c" |
| 1623 | }, |
| 1624 | { |
| 1625 | "ref": "refs/heads/stable", |
| 1626 | "revision": "64ca533bd0eb5252d2fee83f63da67caae9b4674", |
| 1627 | "can_delete": true |
| 1628 | } |
| 1629 | ] |
| 1630 | ---- |
| 1631 | |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1632 | [[branch-options]] |
| 1633 | ==== Branch Options |
| 1634 | |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1635 | Limit(n):: |
| 1636 | Limit the number of branches to be included in the results. |
| 1637 | + |
| 1638 | .Request |
| 1639 | ---- |
| 1640 | GET /projects/testproject/branches?n=1 HTTP/1.0 |
| 1641 | ---- |
| 1642 | + |
| 1643 | .Response |
| 1644 | ---- |
| 1645 | HTTP/1.1 200 OK |
| 1646 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1647 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1648 | |
| 1649 | )]}' |
| 1650 | [ |
| 1651 | { |
| 1652 | "ref": "HEAD", |
| 1653 | "revision": "master", |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1654 | } |
| 1655 | ] |
| 1656 | ---- |
| 1657 | |
David Pursehouse | 5cb3819 | 2017-07-28 16:11:33 +0100 | [diff] [blame] | 1658 | Skip(S):: |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1659 | Skip the given number of branches from the beginning of the list. |
| 1660 | + |
| 1661 | .Request |
| 1662 | ---- |
| 1663 | GET /projects/testproject/branches?n=1&s=0 HTTP/1.0 |
| 1664 | ---- |
| 1665 | + |
| 1666 | .Response |
| 1667 | ---- |
| 1668 | HTTP/1.1 200 OK |
| 1669 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1670 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1671 | |
| 1672 | )]}' |
| 1673 | [ |
| 1674 | { |
| 1675 | "ref": "HEAD", |
| 1676 | "revision": "master", |
Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 1677 | } |
| 1678 | ] |
| 1679 | ---- |
| 1680 | |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1681 | Substring(m):: |
David Pursehouse | 1d4d67d | 2017-07-13 09:58:10 +0900 | [diff] [blame] | 1682 | Limit the results to those branches that match the specified substring. |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1683 | + |
David Pursehouse | 16a1a4b | 2017-07-13 10:22:28 +0900 | [diff] [blame] | 1684 | The match is case insensitive. May not be used together with `r`. |
David Pursehouse | 5851bfe | 2017-07-13 09:56:26 +0900 | [diff] [blame] | 1685 | + |
David Pursehouse | 1d4d67d | 2017-07-13 09:58:10 +0900 | [diff] [blame] | 1686 | List all branches that match substring `test`: |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1687 | + |
| 1688 | .Request |
| 1689 | ---- |
| 1690 | GET /projects/testproject/branches?m=test HTTP/1.0 |
| 1691 | ---- |
| 1692 | + |
| 1693 | .Response |
| 1694 | ---- |
| 1695 | HTTP/1.1 200 OK |
| 1696 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1697 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1698 | |
| 1699 | )]}' |
| 1700 | [ |
| 1701 | { |
| 1702 | "ref": "refs/heads/test1", |
| 1703 | "revision": "9c9d08a438e55e52f33b608415e6dddd9b18550d", |
| 1704 | "can_delete": true |
| 1705 | } |
| 1706 | ] |
| 1707 | ---- |
| 1708 | |
| 1709 | Regex(r):: |
| 1710 | Limit the results to those branches that match the specified regex. |
| 1711 | Boundary matchers '^' and '$' are implicit. For example: the regex 't*' will |
David Pursehouse | a6cd67f | 2017-07-13 16:40:58 +0900 | [diff] [blame] | 1712 | match any branches that start with 't' and regex '*t' will match any |
| 1713 | branches that end with 't'. |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1714 | + |
David Pursehouse | 16a1a4b | 2017-07-13 10:22:28 +0900 | [diff] [blame] | 1715 | 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] | 1716 | + |
| 1717 | List all branches that match regex `t.*1`: |
| 1718 | + |
| 1719 | .Request |
| 1720 | ---- |
| 1721 | GET /projects/testproject/branches?r=t.*1 HTTP/1.0 |
| 1722 | ---- |
| 1723 | + |
| 1724 | .Response |
| 1725 | ---- |
| 1726 | HTTP/1.1 200 OK |
| 1727 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1728 | Content-Type: application/json; charset=UTF-8 |
Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1729 | |
| 1730 | )]}' |
| 1731 | [ |
| 1732 | { |
| 1733 | "ref": "refs/heads/test1", |
| 1734 | "revision": "9c9d08a438e55e52f33b608415e6dddd9b18550d", |
| 1735 | "can_delete": true |
| 1736 | } |
| 1737 | ] |
| 1738 | ---- |
| 1739 | |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1740 | [[get-branch]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1741 | === Get Branch |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1742 | -- |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1743 | '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] | 1744 | -- |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1745 | |
Youssef Elghareeb | a5639fc | 2020-10-26 19:02:39 +0100 | [diff] [blame] | 1746 | Retrieves a branch of a project. For the "All-Users" repository, the magic |
| 1747 | branch "refs/users/self" is automatically resolved to the user branch of the |
| 1748 | calling user. |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1749 | |
| 1750 | .Request |
| 1751 | ---- |
| 1752 | GET /projects/work%2Fmy-project/branches/master HTTP/1.0 |
| 1753 | ---- |
| 1754 | |
| 1755 | As response a link:#branch-info[BranchInfo] entity is returned that |
| 1756 | describes the branch. |
| 1757 | |
| 1758 | .Response |
| 1759 | ---- |
| 1760 | HTTP/1.1 200 OK |
| 1761 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1762 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1763 | |
| 1764 | )]}' |
| 1765 | { |
| 1766 | "ref": "refs/heads/master", |
| 1767 | "revision": "67ebf73496383c6777035e374d2d664009e2aa5c" |
| 1768 | } |
| 1769 | ---- |
| 1770 | |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1771 | [[create-branch]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1772 | === Create Branch |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1773 | -- |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1774 | '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] | 1775 | -- |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1776 | |
| 1777 | Creates a new branch. |
| 1778 | |
| 1779 | In the request body additional data for the branch can be provided as |
Youssef Elghareeb | 4945191 | 2021-01-15 11:49:15 +0100 | [diff] [blame] | 1780 | link:#branch-input[BranchInput]. The link:#branch-id[\{branch-id\}] in the URL |
| 1781 | should exactly match with the `ref` field of link:#branch-input[BranchInput], or |
| 1782 | otherwise the request would fail with `400 Bad Request`. |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1783 | |
| 1784 | .Request |
| 1785 | ---- |
| 1786 | PUT /projects/MyProject/branches/stable HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1787 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1788 | |
| 1789 | { |
| 1790 | "revision": "76016386a0d8ecc7b6be212424978bb45959d668" |
| 1791 | } |
| 1792 | ---- |
| 1793 | |
| 1794 | As response a link:#branch-info[BranchInfo] entity is returned that |
| 1795 | describes the created branch. |
| 1796 | |
| 1797 | .Response |
| 1798 | ---- |
| 1799 | HTTP/1.1 201 Created |
| 1800 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1801 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1802 | |
| 1803 | )]}' |
| 1804 | { |
| 1805 | "ref": "refs/heads/stable", |
| 1806 | "revision": "76016386a0d8ecc7b6be212424978bb45959d668", |
| 1807 | "can_delete": true |
| 1808 | } |
| 1809 | ---- |
| 1810 | |
Edwin Kempin | 6ce96a1 | 2013-06-06 13:20:01 +0200 | [diff] [blame] | 1811 | [[delete-branch]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1812 | === Delete Branch |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1813 | -- |
Edwin Kempin | 6ce96a1 | 2013-06-06 13:20:01 +0200 | [diff] [blame] | 1814 | '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] | 1815 | -- |
Edwin Kempin | 6ce96a1 | 2013-06-06 13:20:01 +0200 | [diff] [blame] | 1816 | |
| 1817 | Deletes a branch. |
| 1818 | |
| 1819 | .Request |
| 1820 | ---- |
| 1821 | DELETE /projects/MyProject/branches/stable HTTP/1.0 |
| 1822 | ---- |
| 1823 | |
| 1824 | .Response |
| 1825 | ---- |
| 1826 | HTTP/1.1 204 No Content |
| 1827 | ---- |
| 1828 | |
Hugo Arès | ef8e320 | 2015-01-12 15:09:06 -0500 | [diff] [blame] | 1829 | [[delete-branches]] |
| 1830 | === Delete Branches |
| 1831 | -- |
| 1832 | 'POST /projects/link:#project-name[\{project-name\}]/branches:delete' |
| 1833 | -- |
| 1834 | |
| 1835 | Delete one or more branches. |
| 1836 | |
| 1837 | The branches to be deleted must be provided in the request body as a |
| 1838 | link:#delete-branches-input[DeleteBranchesInput] entity. |
| 1839 | |
| 1840 | .Request |
| 1841 | ---- |
| 1842 | POST /projects/MyProject/branches:delete HTTP/1.0 |
| 1843 | Content-Type: application/json;charset=UTF-8 |
| 1844 | |
| 1845 | { |
| 1846 | "branches": [ |
| 1847 | "stable-1.0", |
| 1848 | "stable-2.0" |
| 1849 | ] |
| 1850 | } |
| 1851 | ---- |
| 1852 | |
| 1853 | .Response |
| 1854 | ---- |
| 1855 | HTTP/1.1 204 No Content |
| 1856 | ---- |
| 1857 | |
| 1858 | If some branches could not be deleted, the response is "`409 Conflict`" and the |
| 1859 | error message is contained in the response body. |
| 1860 | |
Edwin Kempin | d31e558 | 2013-11-30 12:07:08 +0100 | [diff] [blame] | 1861 | [[get-content]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1862 | === Get Content |
Edwin Kempin | d31e558 | 2013-11-30 12:07:08 +0100 | [diff] [blame] | 1863 | -- |
| 1864 | 'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]/files/link:rest-api-changes.html#file-id[\{file-id\}]/content' |
| 1865 | -- |
| 1866 | |
| 1867 | Gets the content of a file from the HEAD revision of a certain branch. |
| 1868 | |
| 1869 | .Request |
| 1870 | ---- |
| 1871 | GET /projects/gerrit/branches/master/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/content HTTP/1.0 |
| 1872 | ---- |
| 1873 | |
| 1874 | The content is returned as base64 encoded string. |
| 1875 | |
| 1876 | .Response |
| 1877 | ---- |
| 1878 | HTTP/1.1 200 OK |
| 1879 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1880 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | d31e558 | 2013-11-30 12:07:08 +0100 | [diff] [blame] | 1881 | |
| 1882 | Ly8gQ29weXJpZ2h0IChDKSAyMDEwIFRoZSBBbmRyb2lkIE9wZW4gU291cmNlIFByb2plY... |
| 1883 | ---- |
| 1884 | |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 1885 | |
| 1886 | [[get-mergeable-info]] |
| 1887 | === Get Mergeable Information |
| 1888 | -- |
| 1889 | 'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]/mergeable' |
| 1890 | -- |
| 1891 | |
| 1892 | Gets whether the source is mergeable with the target branch. |
| 1893 | |
Han-Wen Nienhuys | 253730c | 2020-12-23 16:26:12 +0100 | [diff] [blame] | 1894 | The `source` query parameter is required, which can be anything that |
| 1895 | could be resolved to a commit, and is visible to the caller. See |
| 1896 | examples of the `source` attribute in |
Zhen Chen | 8f00d55 | 2016-07-26 16:54:59 -0700 | [diff] [blame] | 1897 | link:rest-api-changes.html#merge-input[MergeInput]. |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 1898 | |
| 1899 | Also takes an optional parameter `strategy`, which can be `recursive`, `resolve`, |
| 1900 | `simple-two-way-in-core`, `ours` or `theirs`, default will use project settings. |
| 1901 | |
| 1902 | .Request |
| 1903 | ---- |
| 1904 | GET /projects/test/branches/master/mergeable?source=testbranch&strategy=recursive HTTP/1.0 |
| 1905 | ---- |
| 1906 | |
Zhen Chen | 8f00d55 | 2016-07-26 16:54:59 -0700 | [diff] [blame] | 1907 | 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] | 1908 | |
| 1909 | .Response |
| 1910 | ---- |
| 1911 | HTTP/1.1 200 OK |
| 1912 | Content-Disposition: attachment |
| 1913 | Content-Type: application/json; charset=UTF-8 |
| 1914 | |
| 1915 | )]}' |
| 1916 | { |
Zhen Chen | 8f00d55 | 2016-07-26 16:54:59 -0700 | [diff] [blame] | 1917 | "submit_type": "MERGE_IF_NECESSARY", |
| 1918 | "strategy": "recursive", |
| 1919 | "mergeable": true, |
| 1920 | "commit_merged": false, |
| 1921 | "content_merged": false |
| 1922 | } |
| 1923 | ---- |
| 1924 | |
| 1925 | or when there were conflicts. |
| 1926 | |
| 1927 | .Response |
| 1928 | ---- |
| 1929 | HTTP/1.1 200 OK |
| 1930 | Content-Disposition: attachment |
| 1931 | Content-Type: application/json; charset=UTF-8 |
| 1932 | |
| 1933 | )]}' |
| 1934 | { |
| 1935 | "submit_type": "MERGE_IF_NECESSARY", |
| 1936 | "strategy": "recursive", |
| 1937 | "mergeable": false, |
| 1938 | "conflicts": [ |
| 1939 | "common.txt", |
| 1940 | "shared.txt" |
| 1941 | ] |
| 1942 | } |
| 1943 | ---- |
| 1944 | |
| 1945 | or when the 'testbranch' has been already merged. |
| 1946 | |
| 1947 | .Response |
| 1948 | ---- |
| 1949 | HTTP/1.1 200 OK |
| 1950 | Content-Disposition: attachment |
| 1951 | Content-Type: application/json; charset=UTF-8 |
| 1952 | |
| 1953 | )]}' |
| 1954 | { |
| 1955 | "submit_type": "MERGE_IF_NECESSARY", |
| 1956 | "strategy": "recursive", |
| 1957 | "mergeable": true, |
| 1958 | "commit_merged": true, |
| 1959 | "content_merged": true |
| 1960 | } |
| 1961 | ---- |
| 1962 | |
| 1963 | or when only the content of 'testbranch' has been merged. |
| 1964 | |
| 1965 | .Response |
| 1966 | ---- |
| 1967 | HTTP/1.1 200 OK |
| 1968 | Content-Disposition: attachment |
| 1969 | Content-Type: application/json; charset=UTF-8 |
| 1970 | |
| 1971 | )]}' |
| 1972 | { |
| 1973 | "submit_type": "MERGE_IF_NECESSARY", |
| 1974 | "strategy": "recursive", |
| 1975 | "mergeable": true, |
| 1976 | "commit_merged": false, |
| 1977 | "content_merged": true |
Zhen Chen | f7d85ea | 2016-05-02 15:14:43 -0700 | [diff] [blame] | 1978 | } |
| 1979 | ---- |
| 1980 | |
Edwin Kempin | 87504d9 | 2014-07-04 12:59:19 +0200 | [diff] [blame] | 1981 | [[get-reflog]] |
| 1982 | === Get Reflog |
| 1983 | -- |
| 1984 | 'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]/reflog' |
| 1985 | -- |
| 1986 | |
| 1987 | Gets the reflog of a certain branch. |
| 1988 | |
| 1989 | The caller must be project owner. |
| 1990 | |
| 1991 | .Request |
| 1992 | ---- |
| 1993 | GET /projects/gerrit/branches/master/reflog HTTP/1.0 |
| 1994 | ---- |
| 1995 | |
| 1996 | As response a list of link:#reflog-entry-info[ReflogEntryInfo] entities |
| 1997 | is returned that describe the reflog entries. The reflog entries are |
| 1998 | returned in reverse order. |
| 1999 | |
| 2000 | .Response |
| 2001 | ---- |
| 2002 | HTTP/1.1 200 OK |
| 2003 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2004 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 87504d9 | 2014-07-04 12:59:19 +0200 | [diff] [blame] | 2005 | |
| 2006 | )]}' |
| 2007 | [ |
| 2008 | { |
| 2009 | "old_id": "976ced8f4fc0909d7e1584d18455299545881d60", |
| 2010 | "new_id": "2eaa94bac536654eb592c941e33b91f925698d16", |
| 2011 | "who": { |
| 2012 | "name": "Jane Roe", |
| 2013 | "email": "jane.roe@example.com", |
| 2014 | "date": "2014-06-30 11:53:43.000000000", |
| 2015 | "tz": 120 |
| 2016 | }, |
| 2017 | "comment": "merged: fast forward" |
| 2018 | }, |
| 2019 | { |
| 2020 | "old_id": "c271c6a7161b74f85560c5899c8c73ee89ca5e29", |
| 2021 | "new_id": "976ced8f4fc0909d7e1584d18455299545881d60", |
| 2022 | "who": { |
| 2023 | "name": "John Doe", |
| 2024 | "email": "john.doe@example.com", |
| 2025 | "date": "2013-10-02 10:45:26.000000000", |
| 2026 | "tz": 120 |
| 2027 | }, |
| 2028 | "comment": "merged: fast forward" |
| 2029 | }, |
| 2030 | { |
| 2031 | "old_id": "0000000000000000000000000000000000000000", |
| 2032 | "new_id": "c271c6a7161b74f85560c5899c8c73ee89ca5e29", |
| 2033 | "who": { |
| 2034 | "name": "John Doe", |
| 2035 | "email": "john.doe@example.com", |
| 2036 | "date": "2013-09-30 19:08:44.000000000", |
| 2037 | "tz": 120 |
| 2038 | }, |
| 2039 | "comment": "" |
| 2040 | } |
| 2041 | ] |
| 2042 | ---- |
| 2043 | |
| 2044 | The get reflog endpoint also accepts a limit integer in the `n` |
| 2045 | parameter. This limits the results to show the last `n` reflog entries. |
| 2046 | |
| 2047 | Query the last 25 reflog entries. |
| 2048 | ---- |
| 2049 | GET /projects/gerrit/branches/master/reflog?n=25 HTTP/1.0 |
| 2050 | ---- |
| 2051 | |
Edwin Kempin | 2a581fd | 2014-07-04 14:04:54 +0200 | [diff] [blame] | 2052 | The reflog can also be filtered by timestamp by specifying the `from` |
| 2053 | and `to` parameters. The timestamp for `from` and `to` must be given as |
| 2054 | UTC in the following format: `yyyyMMdd_HHmm`. |
| 2055 | |
| 2056 | ---- |
| 2057 | GET /projects/gerrit/branches/master/reflog?from=20130101_0000&to=20140101_0000=25 HTTP/1.0 |
| 2058 | ---- |
| 2059 | |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 2060 | [[child-project-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2061 | == Child Project Endpoints |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 2062 | |
| 2063 | [[list-child-projects]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2064 | === List Child Projects |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2065 | -- |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 2066 | 'GET /projects/link:#project-name[\{project-name\}]/children/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2067 | -- |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 2068 | |
| 2069 | List the direct child projects of a project. |
| 2070 | |
| 2071 | .Request |
| 2072 | ---- |
| 2073 | GET /projects/Public-Plugins/children/ HTTP/1.0 |
| 2074 | ---- |
| 2075 | |
| 2076 | As result a list of link:#project-info[ProjectInfo] entries is |
| 2077 | returned that describe the child projects. |
| 2078 | |
| 2079 | .Response |
| 2080 | ---- |
| 2081 | HTTP/1.1 200 OK |
| 2082 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2083 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 2084 | |
| 2085 | )]}' |
| 2086 | [ |
| 2087 | { |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +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 | { |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 2094 | "id": "plugins%2Freviewnotes", |
| 2095 | "name": "plugins/reviewnotes", |
| 2096 | "parent": "Public-Plugins", |
| 2097 | "description": "Annotates merged commits using notes on refs/notes/review." |
| 2098 | }, |
| 2099 | { |
Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 2100 | "id": "plugins%2Fsingleusergroup", |
| 2101 | "name": "plugins/singleusergroup", |
| 2102 | "parent": "Public-Plugins", |
| 2103 | "description": "GroupBackend enabling users to be directly added to access rules" |
| 2104 | } |
| 2105 | ] |
| 2106 | ---- |
| 2107 | |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 2108 | To resolve the child projects of a project recursively the parameter |
| 2109 | `recursive` can be set. |
| 2110 | |
| 2111 | Child projects that are not visible to the calling user are ignored and |
| 2112 | are not resolved further. |
| 2113 | |
| 2114 | .Request |
| 2115 | ---- |
| 2116 | GET /projects/Public-Projects/children/?recursive HTTP/1.0 |
| 2117 | ---- |
| 2118 | |
| 2119 | .Response |
| 2120 | ---- |
| 2121 | HTTP/1.1 200 OK |
| 2122 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2123 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 2124 | |
| 2125 | )]}' |
| 2126 | [ |
| 2127 | { |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 2128 | "id": "gerrit", |
| 2129 | "name": "gerrit", |
| 2130 | "parent": "Public-Projects", |
| 2131 | "description": "Gerrit Code Review" |
| 2132 | }, |
| 2133 | { |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 2134 | "id": "plugins%2Freplication", |
| 2135 | "name": "plugins/replication", |
| 2136 | "parent": "Public-Plugins", |
| 2137 | "description": "Copies to other servers using the Git protocol" |
| 2138 | }, |
| 2139 | { |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 2140 | "id": "plugins%2Freviewnotes", |
| 2141 | "name": "plugins/reviewnotes", |
| 2142 | "parent": "Public-Plugins", |
| 2143 | "description": "Annotates merged commits using notes on refs/notes/review." |
| 2144 | }, |
| 2145 | { |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 2146 | "id": "plugins%2Fsingleusergroup", |
| 2147 | "name": "plugins/singleusergroup", |
| 2148 | "parent": "Public-Plugins", |
| 2149 | "description": "GroupBackend enabling users to be directly added to access rules" |
| 2150 | }, |
| 2151 | { |
Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 2152 | "id": "Public-Plugins", |
| 2153 | "name": "Public-Plugins", |
| 2154 | "parent": "Public-Projects", |
| 2155 | "description": "Parent project for plugins/*" |
| 2156 | } |
| 2157 | ] |
| 2158 | ---- |
| 2159 | |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 2160 | [[get-child-project]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2161 | === Get Child Project |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2162 | -- |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 2163 | '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] | 2164 | -- |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 2165 | |
Edwin Kempin | 8a3fb5b | 2013-03-21 15:02:22 +0100 | [diff] [blame] | 2166 | Retrieves a child project. If a non-direct child project should be |
| 2167 | retrieved the parameter `recursive` must be set. |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 2168 | |
| 2169 | .Request |
| 2170 | ---- |
| 2171 | GET /projects/Public-Plugins/children/plugins%2Freplication HTTP/1.0 |
| 2172 | ---- |
| 2173 | |
| 2174 | As response a link:#project-info[ProjectInfo] entity is returned that |
| 2175 | describes the child project. |
| 2176 | |
| 2177 | .Response |
| 2178 | ---- |
| 2179 | HTTP/1.1 200 OK |
| 2180 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2181 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 2182 | |
| 2183 | )]}' |
| 2184 | { |
Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 2185 | "id": "plugins%2Freplication", |
| 2186 | "name": "plugins/replication", |
| 2187 | "parent": "Public-Plugins", |
| 2188 | "description": "Copies to other servers using the Git protocol" |
| 2189 | } |
| 2190 | ---- |
| 2191 | |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2192 | [[tag-endpoints]] |
| 2193 | == Tag Endpoints |
| 2194 | |
David Pursehouse | 6a44619 | 2016-06-03 10:00:34 +0900 | [diff] [blame] | 2195 | [[create-tag]] |
| 2196 | === Create Tag |
| 2197 | |
| 2198 | -- |
| 2199 | 'PUT /projects/link:#project-name[\{project-name\}]/tags/link:#tag-id[\{tag-id\}]' |
| 2200 | -- |
| 2201 | |
| 2202 | Create a new tag on the project. |
| 2203 | |
| 2204 | In the request body additional data for the tag can be provided as |
| 2205 | link:#tag-input[TagInput]. |
| 2206 | |
| 2207 | If a message is provided in the input, the tag is created as an |
| 2208 | annotated tag with the current user as tagger. Signed tags are not |
| 2209 | supported. |
| 2210 | |
| 2211 | .Request |
| 2212 | ---- |
| 2213 | PUT /projects/MyProject/tags/v1.0 HTTP/1.0 |
| 2214 | Content-Type: application/json; charset=UTF-8 |
| 2215 | |
| 2216 | { |
| 2217 | "message": "annotation", |
| 2218 | "revision": "c83117624b5b5d8a7f86093824e2f9c1ed309d63" |
| 2219 | } |
| 2220 | ---- |
| 2221 | |
| 2222 | As response a link:#tag-info[TagInfo] entity is returned that describes |
| 2223 | the created tag. |
| 2224 | |
| 2225 | .Response |
| 2226 | ---- |
| 2227 | HTTP/1.1 201 Created |
| 2228 | Content-Disposition: attachment |
| 2229 | Content-Type: application/json; charset=UTF-8 |
| 2230 | |
| 2231 | )]}' |
| 2232 | |
| 2233 | "object": "d48d304adc4b6674e11dc2c018ea05fcbdda32fd", |
| 2234 | "message": "annotation", |
| 2235 | "tagger": { |
| 2236 | "name": "David Pursehouse", |
| 2237 | "email": "dpursehouse@collab.net", |
| 2238 | "date": "2016-06-06 01:22:03.000000000", |
| 2239 | "tz": 540 |
| 2240 | }, |
| 2241 | "ref": "refs/tags/v1.0", |
| 2242 | "revision": "c83117624b5b5d8a7f86093824e2f9c1ed309d63" |
| 2243 | } |
| 2244 | ---- |
| 2245 | |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2246 | [[list-tags]] |
| 2247 | === List Tags |
| 2248 | -- |
| 2249 | 'GET /projects/link:#project-name[\{project-name\}]/tags/' |
| 2250 | -- |
| 2251 | |
| 2252 | List the tags of a project. |
| 2253 | |
| 2254 | As result a list of link:#tag-info[TagInfo] entries is returned. |
| 2255 | |
| 2256 | Only includes tags under the `refs/tags/` namespace. |
| 2257 | |
| 2258 | .Request |
| 2259 | ---- |
| 2260 | GET /projects/work%2Fmy-project/tags/ HTTP/1.0 |
| 2261 | ---- |
| 2262 | |
| 2263 | .Response |
| 2264 | ---- |
| 2265 | HTTP/1.1 200 OK |
| 2266 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2267 | Content-Type: application/json; charset=UTF-8 |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2268 | |
| 2269 | )]}' |
| 2270 | [ |
| 2271 | { |
| 2272 | "ref": "refs/tags/v1.0", |
| 2273 | "revision": "49ce77fdcfd3398dc0dedbe016d1a425fd52d666", |
| 2274 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2275 | "message": "Annotated tag", |
| 2276 | "tagger": { |
| 2277 | "name": "David Pursehouse", |
| 2278 | "email": "david.pursehouse@sonymobile.com", |
| 2279 | "date": "2014-10-06 07:35:03.000000000", |
| 2280 | "tz": 540 |
| 2281 | } |
| 2282 | }, |
| 2283 | { |
| 2284 | "ref": "refs/tags/v2.0", |
| 2285 | "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30" |
| 2286 | }, |
| 2287 | { |
| 2288 | "ref": "refs/tags/v3.0", |
| 2289 | "revision": "c628685b3c5a3614571ecb5c8fceb85db9112313", |
| 2290 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2291 | "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-----", |
| 2292 | "tagger": { |
| 2293 | "name": "David Pursehouse", |
| 2294 | "email": "david.pursehouse@sonymobile.com", |
| 2295 | "date": "2014-10-06 09:02:16.000000000", |
| 2296 | "tz": 540 |
| 2297 | } |
| 2298 | } |
| 2299 | ] |
| 2300 | ---- |
| 2301 | |
David Pursehouse | b0ba151 | 2015-09-10 14:17:05 +0900 | [diff] [blame] | 2302 | [[tag-options]] |
| 2303 | ==== Tag Options |
| 2304 | |
| 2305 | Limit(n):: |
| 2306 | Limit the number of tags to be included in the results. |
| 2307 | + |
| 2308 | .Request |
| 2309 | ---- |
| 2310 | GET /projects/work%2Fmy-project/tags?n=2 HTTP/1.0 |
| 2311 | ---- |
| 2312 | + |
| 2313 | .Response |
| 2314 | ---- |
| 2315 | HTTP/1.1 200 OK |
| 2316 | Content-Disposition: attachment |
| 2317 | Content-Type: application/json; charset=UTF-8 |
| 2318 | |
| 2319 | )]}' |
| 2320 | [ |
| 2321 | { |
| 2322 | "ref": "refs/tags/v1.0", |
| 2323 | "revision": "49ce77fdcfd3398dc0dedbe016d1a425fd52d666", |
| 2324 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2325 | "message": "Annotated tag", |
| 2326 | "tagger": { |
| 2327 | "name": "David Pursehouse", |
| 2328 | "email": "david.pursehouse@sonymobile.com", |
| 2329 | "date": "2014-10-06 07:35:03.000000000", |
| 2330 | "tz": 540 |
| 2331 | } |
| 2332 | }, |
| 2333 | { |
| 2334 | "ref": "refs/tags/v2.0", |
| 2335 | "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30" |
| 2336 | } |
| 2337 | ] |
| 2338 | ---- |
| 2339 | |
David Pursehouse | 5cb3819 | 2017-07-28 16:11:33 +0100 | [diff] [blame] | 2340 | Skip(S):: |
David Pursehouse | b0ba151 | 2015-09-10 14:17:05 +0900 | [diff] [blame] | 2341 | Skip the given number of tags from the beginning of the list. |
| 2342 | + |
| 2343 | .Request |
| 2344 | ---- |
| 2345 | GET /projects/work%2Fmy-project/tags?n=2&s=1 HTTP/1.0 |
| 2346 | ---- |
| 2347 | + |
| 2348 | .Response |
| 2349 | ---- |
| 2350 | HTTP/1.1 200 OK |
| 2351 | Content-Disposition: attachment |
| 2352 | Content-Type: application/json; charset=UTF-8 |
| 2353 | |
| 2354 | )]}' |
| 2355 | [ |
| 2356 | { |
| 2357 | "ref": "refs/tags/v2.0", |
| 2358 | "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30" |
| 2359 | }, |
| 2360 | { |
| 2361 | "ref": "refs/tags/v3.0", |
| 2362 | "revision": "c628685b3c5a3614571ecb5c8fceb85db9112313", |
| 2363 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2364 | "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-----", |
| 2365 | "tagger": { |
| 2366 | "name": "David Pursehouse", |
| 2367 | "email": "david.pursehouse@sonymobile.com", |
| 2368 | "date": "2014-10-06 09:02:16.000000000", |
| 2369 | "tz": 540 |
| 2370 | } |
| 2371 | } |
| 2372 | ] |
| 2373 | ---- |
| 2374 | |
David Pursehouse | cf1ed06 | 2017-07-13 10:05:43 +0900 | [diff] [blame] | 2375 | Substring(m):: |
| 2376 | Limit the results to those tags that match the specified substring. |
| 2377 | + |
David Pursehouse | 16a1a4b | 2017-07-13 10:22:28 +0900 | [diff] [blame] | 2378 | The match is case insensitive. May not be used together with `r`. |
David Pursehouse | cf1ed06 | 2017-07-13 10:05:43 +0900 | [diff] [blame] | 2379 | + |
| 2380 | List all tags that match substring `v2`: |
| 2381 | |
| 2382 | + |
| 2383 | .Request |
| 2384 | ---- |
| 2385 | GET /projects/testproject/tags?m=v2 HTTP/1.0 |
| 2386 | ---- |
| 2387 | + |
| 2388 | .Response |
| 2389 | ---- |
| 2390 | HTTP/1.1 200 OK |
| 2391 | Content-Disposition: attachment |
| 2392 | Content-Type: application/json; charset=UTF-8 |
| 2393 | |
| 2394 | )]}' |
| 2395 | [ |
| 2396 | { |
| 2397 | "ref": "refs/tags/v2.0", |
| 2398 | "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30" |
| 2399 | }, |
| 2400 | ] |
| 2401 | ---- |
| 2402 | |
| 2403 | Regex(r):: |
| 2404 | Limit the results to those tags that match the specified regex. |
| 2405 | Boundary matchers '^' and '$' are implicit. For example: the regex 't*' will |
| 2406 | match any tags that start with 't' and regex '*t' will match any |
| 2407 | tags that end with 't'. |
| 2408 | + |
David Pursehouse | 16a1a4b | 2017-07-13 10:22:28 +0900 | [diff] [blame] | 2409 | The match is case sensitive. May not be used together with `m`. |
David Pursehouse | f648e04 | 2017-07-13 10:08:46 +0900 | [diff] [blame] | 2410 | + |
David Pursehouse | cf1ed06 | 2017-07-13 10:05:43 +0900 | [diff] [blame] | 2411 | List all tags that match regex `v.*0`: |
| 2412 | + |
| 2413 | .Request |
| 2414 | ---- |
| 2415 | GET /projects/testproject/tags?r=v.*0 HTTP/1.0 |
| 2416 | ---- |
| 2417 | + |
| 2418 | .Response |
| 2419 | ---- |
| 2420 | HTTP/1.1 200 OK |
| 2421 | Content-Disposition: attachment |
| 2422 | Content-Type: application/json; charset=UTF-8 |
| 2423 | |
| 2424 | )]}' |
| 2425 | [ |
| 2426 | { |
| 2427 | "ref": "refs/tags/v1.0", |
| 2428 | "revision": "49ce77fdcfd3398dc0dedbe016d1a425fd52d666", |
| 2429 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2430 | "message": "Annotated tag", |
| 2431 | "tagger": { |
| 2432 | "name": "David Pursehouse", |
| 2433 | "email": "david.pursehouse@sonymobile.com", |
| 2434 | "date": "2014-10-06 07:35:03.000000000", |
| 2435 | "tz": 540 |
| 2436 | } |
| 2437 | }, |
| 2438 | { |
| 2439 | "ref": "refs/tags/v2.0", |
| 2440 | "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30" |
| 2441 | }, |
| 2442 | { |
| 2443 | "ref": "refs/tags/v3.0", |
| 2444 | "revision": "c628685b3c5a3614571ecb5c8fceb85db9112313", |
| 2445 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2446 | "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-----", |
| 2447 | "tagger": { |
| 2448 | "name": "David Pursehouse", |
| 2449 | "email": "david.pursehouse@sonymobile.com", |
| 2450 | "date": "2014-10-06 09:02:16.000000000", |
| 2451 | "tz": 540 |
| 2452 | } |
| 2453 | } |
| 2454 | ] |
| 2455 | ---- |
David Pursehouse | b0ba151 | 2015-09-10 14:17:05 +0900 | [diff] [blame] | 2456 | |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2457 | [[get-tag]] |
| 2458 | === Get Tag |
| 2459 | -- |
| 2460 | 'GET /projects/link:#project-name[\{project-name\}]/tags/link:#tag-id[\{tag-id\}]' |
| 2461 | -- |
| 2462 | |
| 2463 | Retrieves a tag of a project. |
| 2464 | |
| 2465 | .Request |
| 2466 | ---- |
| 2467 | GET /projects/work%2Fmy-project/tags/v1.0 HTTP/1.0 |
| 2468 | ---- |
| 2469 | |
| 2470 | As response a link:#tag-info[TagInfo] entity is returned that describes the tag. |
| 2471 | |
| 2472 | .Response |
| 2473 | ---- |
| 2474 | HTTP/1.1 200 OK |
| 2475 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2476 | Content-Type: application/json; charset=UTF-8 |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2477 | |
| 2478 | )]}' |
| 2479 | { |
| 2480 | "ref": "refs/tags/v1.0", |
| 2481 | "revision": "49ce77fdcfd3398dc0dedbe016d1a425fd52d666", |
| 2482 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 2483 | "message": "Annotated tag", |
| 2484 | "tagger": { |
| 2485 | "name": "David Pursehouse", |
| 2486 | "email": "david.pursehouse@sonymobile.com", |
| 2487 | "date": "2014-10-06 07:35:03.000000000", |
| 2488 | "tz": 540 |
| 2489 | } |
| 2490 | } |
| 2491 | ---- |
| 2492 | |
David Pursehouse | e113216 | 2016-11-30 20:42:33 +0900 | [diff] [blame] | 2493 | [[delete-tag]] |
| 2494 | === Delete Tag |
| 2495 | -- |
| 2496 | 'DELETE /projects/link:#project-name[\{project-name\}]/tags/link:#tag-id[\{tag-id\}]' |
| 2497 | -- |
| 2498 | |
| 2499 | Deletes a tag. |
| 2500 | |
| 2501 | .Request |
| 2502 | ---- |
| 2503 | DELETE /projects/MyProject/tags/v1.0 HTTP/1.0 |
| 2504 | ---- |
| 2505 | |
| 2506 | .Response |
| 2507 | ---- |
| 2508 | HTTP/1.1 204 No Content |
| 2509 | ---- |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2510 | |
David Pursehouse | 467aecb | 2016-12-02 14:18:42 +0900 | [diff] [blame] | 2511 | [[delete-tags]] |
| 2512 | === Delete Tags |
| 2513 | -- |
| 2514 | 'POST /projects/link:#project-name[\{project-name\}]/tags:delete' |
| 2515 | -- |
| 2516 | |
| 2517 | Delete one or more tags. |
| 2518 | |
| 2519 | The tags to be deleted must be provided in the request body as a |
| 2520 | link:#delete-tags-input[DeleteTagsInput] entity. |
| 2521 | |
| 2522 | .Request |
| 2523 | ---- |
| 2524 | POST /projects/MyProject/tags:delete HTTP/1.0 |
| 2525 | Content-Type: application/json;charset=UTF-8 |
| 2526 | |
| 2527 | { |
| 2528 | "tags": [ |
| 2529 | "v1.0", |
| 2530 | "v2.0" |
| 2531 | ] |
| 2532 | } |
| 2533 | ---- |
| 2534 | |
| 2535 | .Response |
| 2536 | ---- |
| 2537 | HTTP/1.1 204 No Content |
| 2538 | ---- |
| 2539 | |
| 2540 | If some tags could not be deleted, the response is "`409 Conflict`" and the |
| 2541 | error message is contained in the response body. |
| 2542 | |
Edwin Kempin | 1b99360 | 2014-07-08 16:18:45 +0200 | [diff] [blame] | 2543 | [[commit-endpoints]] |
| 2544 | == Commit Endpoints |
| 2545 | |
| 2546 | [[get-commit]] |
| 2547 | === Get Commit |
| 2548 | -- |
| 2549 | 'GET /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]' |
| 2550 | -- |
| 2551 | |
| 2552 | Retrieves a commit of a project. |
| 2553 | |
| 2554 | The commit must be visible to the caller. |
| 2555 | |
| 2556 | .Request |
| 2557 | ---- |
| 2558 | GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96 HTTP/1.0 |
| 2559 | ---- |
| 2560 | |
| 2561 | As response a link:rest-api-changes.html#commit-info[CommitInfo] entity |
| 2562 | is returned that describes the commit. |
| 2563 | |
| 2564 | .Response |
| 2565 | ---- |
| 2566 | HTTP/1.1 200 OK |
| 2567 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2568 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 1b99360 | 2014-07-08 16:18:45 +0200 | [diff] [blame] | 2569 | |
| 2570 | )]}' |
| 2571 | { |
| 2572 | "commit": "184ebe53805e102605d11f6b143486d15c23a09c", |
| 2573 | "parents": [ |
| 2574 | { |
| 2575 | "commit": "1eee2c9d8f352483781e772f35dc586a69ff5646", |
| 2576 | "subject": "Migrate contributor agreements to All-Projects." |
| 2577 | } |
| 2578 | ], |
| 2579 | "author": { |
| 2580 | "name": "Shawn O. Pearce", |
| 2581 | "email": "sop@google.com", |
| 2582 | "date": "2012-04-24 18:08:08.000000000", |
| 2583 | "tz": -420 |
| 2584 | }, |
| 2585 | "committer": { |
| 2586 | "name": "Shawn O. Pearce", |
| 2587 | "email": "sop@google.com", |
| 2588 | "date": "2012-04-24 18:08:08.000000000", |
| 2589 | "tz": -420 |
| 2590 | }, |
| 2591 | "subject": "Use an EventBus to manage star icons", |
| 2592 | "message": "Use an EventBus to manage star icons\n\nImage widgets that need to ..." |
| 2593 | } |
| 2594 | ---- |
| 2595 | |
Gustaf Lundh | 1386d59 | 2016-10-19 23:19:08 +0200 | [diff] [blame] | 2596 | [[get-included-in]] |
| 2597 | === Get Included In |
| 2598 | -- |
| 2599 | 'GET /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]/in' |
| 2600 | -- |
| 2601 | |
| 2602 | Retrieves the branches and tags in which a change is included. As result |
| 2603 | an link:rest-api-changes.html#included-in-info[IncludedInInfo] entity is returned. |
| 2604 | |
Youssef Elghareeb | 4c3ee4b | 2021-06-18 14:10:25 +0200 | [diff] [blame] | 2605 | Branches that are not visible to the calling user according to the project's |
| 2606 | read permissions are filtered out from the result. |
| 2607 | |
Gustaf Lundh | 1386d59 | 2016-10-19 23:19:08 +0200 | [diff] [blame] | 2608 | .Request |
| 2609 | ---- |
| 2610 | GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96/in HTTP/1.0 |
| 2611 | ---- |
| 2612 | |
| 2613 | .Response |
| 2614 | ---- |
| 2615 | HTTP/1.1 200 OK |
| 2616 | Content-Disposition: attachment |
| 2617 | Content-Type: application/json;charset=UTF-8 |
| 2618 | |
| 2619 | )]}' |
| 2620 | { |
| 2621 | "branches": [ |
| 2622 | "master" |
| 2623 | ], |
| 2624 | "tags": [] |
| 2625 | } |
| 2626 | ---- |
| 2627 | |
Zhen Chen | d1462d8 | 2016-05-12 13:55:37 -0700 | [diff] [blame] | 2628 | [[get-content-from-commit]] |
Edwin Kempin | 6f7410a | 2014-07-09 15:46:22 +0200 | [diff] [blame] | 2629 | === Get Content |
| 2630 | -- |
| 2631 | 'GET /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]/files/link:rest-api-changes.html#file-id[\{file-id\}]/content' |
| 2632 | -- |
| 2633 | |
| 2634 | Gets the content of a file from a certain commit. |
| 2635 | |
| 2636 | .Request |
| 2637 | ---- |
| 2638 | GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/content HTTP/1.0 |
| 2639 | ---- |
| 2640 | |
| 2641 | The content is returned as base64 encoded string. |
| 2642 | |
| 2643 | .Response |
| 2644 | ---- |
| 2645 | HTTP/1.1 200 OK |
| 2646 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2647 | Content-Type: text/plain; charset=UTF-8 |
Edwin Kempin | 6f7410a | 2014-07-09 15:46:22 +0200 | [diff] [blame] | 2648 | |
| 2649 | Ly8gQ29weXJpZ2h0IChDKSAyMDEwIFRoZSBBbmRyb2lkIE9wZW4gU291cmNlIFByb2plY... |
| 2650 | ---- |
| 2651 | |
Changcheng Xiao | 9d2ec04 | 2017-03-22 17:16:57 +0100 | [diff] [blame] | 2652 | |
| 2653 | [[cherry-pick-commit]] |
| 2654 | === Cherry Pick Commit |
| 2655 | -- |
| 2656 | 'POST /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]/cherrypick' |
| 2657 | -- |
| 2658 | |
| 2659 | Cherry-picks a commit of a project to a destination branch. |
| 2660 | |
Changcheng Xiao | 54b6c0c | 2017-10-23 14:57:42 +0200 | [diff] [blame] | 2661 | To cherry pick a change revision, see link:rest-api-changes.html#cherry-pick[CherryPick]. |
| 2662 | |
Changcheng Xiao | 9d2ec04 | 2017-03-22 17:16:57 +0100 | [diff] [blame] | 2663 | The destination branch must be provided in the request body inside a |
| 2664 | link:rest-api-changes.html#cherrypick-input[CherryPickInput] entity. |
| 2665 | If the commit message is not set, the commit message of the source |
| 2666 | commit will be used. |
| 2667 | |
Gal Paikin | 8dadd42 | 2021-05-07 10:21:54 +0200 | [diff] [blame] | 2668 | When cherry-picking a commit into a branch that already contains the Change-Id |
| 2669 | that we want to cherry-pick, the cherry-pick will create a new patch-set on the |
| 2670 | destination's branch's appropriate Change-Id. If the change is closed on the |
| 2671 | destination branch, the cherry-pick will fail. |
| 2672 | |
Changcheng Xiao | 9d2ec04 | 2017-03-22 17:16:57 +0100 | [diff] [blame] | 2673 | .Request |
| 2674 | ---- |
| 2675 | POST /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96/cherrypick HTTP/1.0 |
| 2676 | Content-Type: application/json; charset=UTF-8 |
| 2677 | |
| 2678 | { |
| 2679 | "message" : "Implementing Feature X", |
| 2680 | "destination" : "release-branch" |
| 2681 | } |
| 2682 | ---- |
| 2683 | |
Edwin Kempin | aab27d3 | 2020-01-29 13:17:04 +0100 | [diff] [blame] | 2684 | As response a link:rest-api-changes.html#change-info[ChangeInfo] entity |
| 2685 | is returned that describes the resulting cherry-picked change. |
Changcheng Xiao | 9d2ec04 | 2017-03-22 17:16:57 +0100 | [diff] [blame] | 2686 | |
| 2687 | .Response |
| 2688 | ---- |
| 2689 | HTTP/1.1 200 OK |
| 2690 | Content-Disposition: attachment |
| 2691 | Content-Type: application/json; charset=UTF-8 |
| 2692 | |
| 2693 | )]}' |
| 2694 | { |
| 2695 | "id": "myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 2696 | "project": "myProject", |
| 2697 | "branch": "release-branch", |
| 2698 | "change_id": "I8473b95934b5732ac55d26311a706c9c2bde9941", |
| 2699 | "subject": "Implementing Feature X", |
| 2700 | "status": "NEW", |
| 2701 | "created": "2013-02-01 09:59:32.126000000", |
| 2702 | "updated": "2013-02-21 11:16:36.775000000", |
| 2703 | "mergeable": true, |
| 2704 | "insertions": 12, |
| 2705 | "deletions": 11, |
| 2706 | "_number": 3965, |
| 2707 | "owner": { |
| 2708 | "name": "John Doe" |
| 2709 | } |
| 2710 | } |
| 2711 | ---- |
| 2712 | |
Makson Lee | 7824f30 | 2018-07-20 10:33:56 +0800 | [diff] [blame] | 2713 | [[list-files]] |
| 2714 | === List Files |
| 2715 | -- |
| 2716 | 'GET /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]/files/' |
| 2717 | -- |
| 2718 | |
| 2719 | Lists the files that were modified, added or deleted in a commit. |
| 2720 | |
| 2721 | .Request |
| 2722 | ---- |
| 2723 | GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96/files/ HTTP/1.0 |
| 2724 | ---- |
| 2725 | |
| 2726 | As result a map is returned that maps the link:rest-api-changes.html#file-id[file path] to a |
| 2727 | link:rest-api-changes.html#file-info[FileInfo] entry. The entries in the map are |
| 2728 | sorted by file path. |
| 2729 | |
| 2730 | .Response |
| 2731 | ---- |
| 2732 | HTTP/1.1 200 OK |
| 2733 | Content-Disposition: attachment |
| 2734 | Content-Type: application/json; charset=UTF-8 |
| 2735 | |
| 2736 | )]}' |
| 2737 | { |
| 2738 | "/COMMIT_MSG": { |
| 2739 | "status": "A", |
| 2740 | "lines_inserted": 7, |
| 2741 | "size_delta": 551, |
| 2742 | "size": 551 |
| 2743 | }, |
| 2744 | "gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java": { |
| 2745 | "lines_inserted": 5, |
| 2746 | "lines_deleted": 3, |
| 2747 | "size_delta": 98, |
| 2748 | "size": 23348 |
| 2749 | } |
| 2750 | } |
| 2751 | ---- |
| 2752 | |
| 2753 | The integer-valued request parameter `parent` changes the response to return a |
| 2754 | list of the files which are different in this commit compared to the given |
| 2755 | parent commit. This is useful for supporting review of merge commits. The value |
Youssef Elghareeb | 8df6d5c | 2021-02-08 12:19:27 +0100 | [diff] [blame] | 2756 | is the 1-based index of the parent's position in the commit object. If the |
| 2757 | value 0 is used for `parent`, the default base commit will be used, which is |
| 2758 | the only parent for commits having one parent or the auto-merge commit |
| 2759 | otherwise. |
Makson Lee | 7824f30 | 2018-07-20 10:33:56 +0800 | [diff] [blame] | 2760 | |
Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 2761 | [[dashboard-endpoints]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2762 | == Dashboard Endpoints |
Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 2763 | |
Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 2764 | [[list-dashboards]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2765 | === List Dashboards |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2766 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2767 | 'GET /projects/link:#project-name[\{project-name\}]/dashboards/' |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2768 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2769 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2770 | List custom dashboards for a project. |
| 2771 | |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 2772 | As result a list of link:#dashboard-info[DashboardInfo] entries is |
| 2773 | returned. |
| 2774 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2775 | List all dashboards for the `work/my-project` project: |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2776 | |
| 2777 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2778 | ---- |
| 2779 | GET /projects/work%2Fmy-project/dashboards/ HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2780 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2781 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2782 | .Response |
| 2783 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2784 | HTTP/1.1 200 OK |
| 2785 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2786 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2787 | |
| 2788 | )]}' |
| 2789 | [ |
| 2790 | { |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2791 | "id": "main:closed", |
| 2792 | "ref": "main", |
| 2793 | "path": "closed", |
| 2794 | "description": "Merged and abandoned changes in last 7 weeks", |
| 2795 | "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] | 2796 | "is_default": true, |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2797 | "title": "Closed changes", |
| 2798 | "sections": [ |
| 2799 | { |
| 2800 | "name": "Merged", |
| 2801 | "query": "status:merged age:7w" |
| 2802 | }, |
| 2803 | { |
| 2804 | "name": "Abandoned", |
| 2805 | "query": "status:abandoned age:7w" |
| 2806 | } |
| 2807 | ] |
| 2808 | } |
| 2809 | ] |
| 2810 | ---- |
| 2811 | |
Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 2812 | .Get all dashboards of the 'All-Projects' project |
| 2813 | **** |
| 2814 | get::/projects/All-Projects/dashboards/ |
| 2815 | **** |
| 2816 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2817 | [[get-dashboard]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2818 | === Get Dashboard |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2819 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2820 | '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] | 2821 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2822 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2823 | Retrieves a project dashboard. The dashboard can be defined on that |
| 2824 | project or be inherited from a parent project. |
| 2825 | |
| 2826 | .Request |
| 2827 | ---- |
| 2828 | GET /projects/work%2Fmy-project/dashboards/main:closed HTTP/1.0 |
| 2829 | ---- |
| 2830 | |
| 2831 | As response a link:#dashboard-info[DashboardInfo] entity is returned |
| 2832 | that describes the dashboard. |
| 2833 | |
| 2834 | .Response |
| 2835 | ---- |
| 2836 | HTTP/1.1 200 OK |
| 2837 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2838 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2839 | |
| 2840 | )]}' |
| 2841 | { |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2842 | "id": "main:closed", |
| 2843 | "ref": "main", |
| 2844 | "path": "closed", |
| 2845 | "description": "Merged and abandoned changes in last 7 weeks", |
| 2846 | "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] | 2847 | "is_default": true, |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2848 | "title": "Closed changes", |
| 2849 | "sections": [ |
| 2850 | { |
| 2851 | "name": "Merged", |
| 2852 | "query": "status:merged age:7w" |
| 2853 | }, |
| 2854 | { |
| 2855 | "name": "Abandoned", |
| 2856 | "query": "status:abandoned age:7w" |
| 2857 | } |
| 2858 | ] |
| 2859 | } |
| 2860 | ---- |
| 2861 | |
| 2862 | To retrieve the default dashboard of a project use `default` as |
| 2863 | dashboard-id. |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2864 | |
| 2865 | .Request |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2866 | ---- |
| 2867 | GET /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2868 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2869 | |
Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 2870 | .Response |
| 2871 | ---- |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2872 | HTTP/1.1 200 OK |
| 2873 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2874 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2875 | |
| 2876 | )]}' |
| 2877 | { |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2878 | "id": "main:closed", |
| 2879 | "ref": "main", |
| 2880 | "path": "closed", |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2881 | "description": "Merged and abandoned changes in last 7 weeks", |
| 2882 | "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] | 2883 | "is_default": true, |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2884 | "title": "Closed changes", |
| 2885 | "sections": [ |
| 2886 | { |
| 2887 | "name": "Merged", |
| 2888 | "query": "status:merged age:7w" |
| 2889 | }, |
| 2890 | { |
| 2891 | "name": "Abandoned", |
| 2892 | "query": "status:abandoned age:7w" |
| 2893 | } |
| 2894 | ] |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2895 | } |
| 2896 | ---- |
| 2897 | |
Edwin Kempin | 339cb31 | 2019-08-05 15:59:58 +0200 | [diff] [blame] | 2898 | [[create-dashboard]] |
| 2899 | === Create Dashboard |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 2900 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2901 | '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] | 2902 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 2903 | |
Edwin Kempin | 339cb31 | 2019-08-05 15:59:58 +0200 | [diff] [blame] | 2904 | Creates a project dashboard, if a project dashboard with the given |
| 2905 | dashboard ID doesn't exist yet. |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2906 | |
| 2907 | Currently only supported for the `default` dashboard. |
| 2908 | |
Edwin Kempin | 339cb31 | 2019-08-05 15:59:58 +0200 | [diff] [blame] | 2909 | The creation information for the dashboard must be provided in |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2910 | the request body as a link:#dashboard-input[DashboardInput] entity. |
| 2911 | |
| 2912 | .Request |
| 2913 | ---- |
| 2914 | PUT /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2915 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2916 | |
| 2917 | { |
| 2918 | "id": "main:closed", |
| 2919 | "commit_message": "Define the default dashboard" |
| 2920 | } |
| 2921 | ---- |
| 2922 | |
Edwin Kempin | 339cb31 | 2019-08-05 15:59:58 +0200 | [diff] [blame] | 2923 | As response the new dashboard is returned as a link:#dashboard-info[ |
| 2924 | DashboardInfo] entity. |
| 2925 | |
| 2926 | .Response |
| 2927 | ---- |
| 2928 | HTTP/1.1 201 Created |
| 2929 | Content-Disposition: attachment |
| 2930 | Content-Type: application/json; charset=UTF-8 |
| 2931 | |
| 2932 | )]}' |
| 2933 | { |
| 2934 | "id": "main:closed", |
| 2935 | "ref": "main", |
| 2936 | "path": "closed", |
| 2937 | "description": "Merged and abandoned changes in last 7 weeks", |
| 2938 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 2939 | "is_default": true, |
| 2940 | "title": "Closed changes", |
| 2941 | "sections": [ |
| 2942 | { |
| 2943 | "name": "Merged", |
| 2944 | "query": "status:merged age:7w" |
| 2945 | }, |
| 2946 | { |
| 2947 | "name": "Abandoned", |
| 2948 | "query": "status:abandoned age:7w" |
| 2949 | } |
| 2950 | ] |
| 2951 | } |
| 2952 | ---- |
| 2953 | |
| 2954 | [[update-dashboard]] |
| 2955 | === Update Dashboard |
| 2956 | -- |
| 2957 | 'PUT /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]' |
| 2958 | -- |
| 2959 | |
| 2960 | Updates a project dashboard, if a project dashboard with the given |
| 2961 | dashboard ID already exists. |
| 2962 | |
| 2963 | Currently only supported for the `default` dashboard. |
| 2964 | |
| 2965 | The update information for the dashboard must be provided in |
| 2966 | the request body as a link:#dashboard-input[DashboardInput] entity. |
| 2967 | |
| 2968 | .Request |
| 2969 | ---- |
| 2970 | PUT /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| 2971 | Content-Type: application/json; charset=UTF-8 |
| 2972 | |
| 2973 | { |
| 2974 | "id": "main:closed", |
| 2975 | "commit_message": "Update the default dashboard" |
| 2976 | } |
| 2977 | ---- |
| 2978 | |
| 2979 | As response the updated dashboard is returned as a |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2980 | link:#dashboard-info[DashboardInfo] entity. |
| 2981 | |
| 2982 | .Response |
| 2983 | ---- |
| 2984 | HTTP/1.1 200 OK |
| 2985 | Content-Disposition: attachment |
David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 2986 | Content-Type: application/json; charset=UTF-8 |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2987 | |
| 2988 | )]}' |
| 2989 | { |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2990 | "id": "main:closed", |
| 2991 | "ref": "main", |
| 2992 | "path": "closed", |
| 2993 | "description": "Merged and abandoned changes in last 7 weeks", |
| 2994 | "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] | 2995 | "is_default": true, |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2996 | "title": "Closed changes", |
| 2997 | "sections": [ |
| 2998 | { |
| 2999 | "name": "Merged", |
| 3000 | "query": "status:merged age:7w" |
| 3001 | }, |
| 3002 | { |
| 3003 | "name": "Abandoned", |
| 3004 | "query": "status:abandoned age:7w" |
| 3005 | } |
| 3006 | ] |
| 3007 | } |
| 3008 | ---- |
| 3009 | |
| 3010 | [[delete-dashboard]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3011 | === Delete Dashboard |
Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 3012 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3013 | '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] | 3014 | -- |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3015 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 3016 | Deletes a project dashboard. |
| 3017 | |
| 3018 | Currently only supported for the `default` dashboard. |
| 3019 | |
Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 3020 | The request body does not need to include a link:#dashboard-input[ |
John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 3021 | DashboardInput] entity if no commit message is specified. |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 3022 | |
| 3023 | Please note that some proxies prohibit request bodies for DELETE |
| 3024 | requests. |
| 3025 | |
| 3026 | .Request |
| 3027 | ---- |
| 3028 | DELETE /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| 3029 | ---- |
| 3030 | |
| 3031 | .Response |
| 3032 | ---- |
| 3033 | HTTP/1.1 204 No Content |
| 3034 | ---- |
| 3035 | |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 3036 | [[label-endpoints]] |
| 3037 | == Label Endpoints |
| 3038 | |
| 3039 | [[list-labels]] |
| 3040 | === List Labels |
| 3041 | -- |
| 3042 | 'GET /projects/link:#project-name[\{project-name\}]/labels/' |
| 3043 | -- |
| 3044 | |
| 3045 | Lists the labels that are defined in this project. |
| 3046 | |
| 3047 | The calling user must have read access to the `refs/meta/config` branch of the |
| 3048 | project. |
| 3049 | |
| 3050 | .Request |
| 3051 | ---- |
| 3052 | GET /projects/All-Projects/labels/ HTTP/1.0 |
| 3053 | ---- |
| 3054 | |
| 3055 | As result a list of link:#label-definition-info[LabelDefinitionInfo] entities |
| 3056 | is returned that describe the labels that are defined in this project |
Edwin Kempin | b527526 | 2019-10-24 16:03:27 +0200 | [diff] [blame] | 3057 | (inherited labels are not returned unless the `inherited` parameter is set, see |
| 3058 | link:#list-with-inherited-labels[below]). The returned labels are sorted by |
| 3059 | label name. |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 3060 | |
| 3061 | .Response |
| 3062 | ---- |
| 3063 | HTTP/1.1 200 OK |
| 3064 | Content-Disposition: attachment |
| 3065 | Content-Type: application/json; charset=UTF-8 |
| 3066 | |
| 3067 | )]}' |
| 3068 | [ |
| 3069 | { |
| 3070 | "name": "Code-Review", |
Edwin Kempin | b527526 | 2019-10-24 16:03:27 +0200 | [diff] [blame] | 3071 | "project": "All-Projects", |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 3072 | "function": "MaxWithBlock", |
| 3073 | "values": { |
| 3074 | " 0": "No score", |
Oswald Buddenhagen | f887770 | 2022-02-15 14:01:34 +0100 | [diff] [blame] | 3075 | "-1": "I would prefer this is not submitted as is", |
| 3076 | "-2": "This shall not be submitted", |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 3077 | "+1": "Looks good to me, but someone else must approve", |
| 3078 | "+2": "Looks good to me, approved" |
| 3079 | }, |
| 3080 | "default_value": 0, |
| 3081 | "can_override": true, |
Edwin Kempin | 53bdd55 | 2022-04-05 14:03:26 +0200 | [diff] [blame] | 3082 | "copy_condition": "changekind:NO_CHANGE OR changekind:TRIVIAL_REBASE or is:MIN", |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 3083 | "allow_post_submit": true |
| 3084 | } |
| 3085 | ] |
| 3086 | ---- |
| 3087 | |
Edwin Kempin | b527526 | 2019-10-24 16:03:27 +0200 | [diff] [blame] | 3088 | [[list-with-inherited-labels]] |
| 3089 | To include inherited labels from all parent projects the parameter `inherited` |
| 3090 | can be set. |
| 3091 | |
| 3092 | The calling user must have read access to the `refs/meta/config` branch of the |
| 3093 | project and all its parent projects. |
| 3094 | |
| 3095 | .Request |
| 3096 | ---- |
| 3097 | GET /projects/My-Project/labels/?inherited HTTP/1.0 |
| 3098 | ---- |
| 3099 | |
| 3100 | As result a list of link:#label-definition-info[LabelDefinitionInfo] entities |
| 3101 | is returned that describe the labels that are defined in this project and in |
| 3102 | all its parent projects. The returned labels are sorted by parent projects |
| 3103 | in-order from `All-Projects` through the project hierarchy to this project. |
| 3104 | Labels that belong to the same project are sorted by label name. |
| 3105 | |
| 3106 | .Response |
| 3107 | ---- |
| 3108 | HTTP/1.1 200 OK |
| 3109 | Content-Disposition: attachment |
| 3110 | Content-Type: application/json; charset=UTF-8 |
| 3111 | |
| 3112 | )]}' |
| 3113 | [ |
| 3114 | { |
| 3115 | "name": "Code-Review", |
| 3116 | "project": "All-Projects", |
| 3117 | "function": "MaxWithBlock", |
| 3118 | "values": { |
| 3119 | " 0": "No score", |
Oswald Buddenhagen | f887770 | 2022-02-15 14:01:34 +0100 | [diff] [blame] | 3120 | "-1": "I would prefer this is not submitted as is", |
| 3121 | "-2": "This shall not be submitted", |
Edwin Kempin | b527526 | 2019-10-24 16:03:27 +0200 | [diff] [blame] | 3122 | "+1": "Looks good to me, but someone else must approve", |
| 3123 | "+2": "Looks good to me, approved" |
| 3124 | }, |
| 3125 | "default_value": 0, |
| 3126 | "can_override": true, |
Edwin Kempin | 53bdd55 | 2022-04-05 14:03:26 +0200 | [diff] [blame] | 3127 | "copy_condition": "changekind:NO_CHANGE OR changekind:TRIVIAL_REBASE or is:MIN", |
Edwin Kempin | b527526 | 2019-10-24 16:03:27 +0200 | [diff] [blame] | 3128 | "allow_post_submit": true |
| 3129 | }, |
| 3130 | { |
| 3131 | "name": "Foo-Review", |
| 3132 | "project": "My-Project", |
| 3133 | "function": "MaxWithBlock", |
| 3134 | "values": { |
| 3135 | " 0": "No score", |
Oswald Buddenhagen | f887770 | 2022-02-15 14:01:34 +0100 | [diff] [blame] | 3136 | "-1": "I would prefer this is not submitted as is", |
| 3137 | "-2": "This shall not be submitted", |
Edwin Kempin | b527526 | 2019-10-24 16:03:27 +0200 | [diff] [blame] | 3138 | "+1": "Looks good to me, but someone else must approve", |
| 3139 | "+2": "Looks good to me, approved" |
| 3140 | }, |
| 3141 | "default_value": 0, |
| 3142 | "can_override": true, |
Edwin Kempin | 53bdd55 | 2022-04-05 14:03:26 +0200 | [diff] [blame] | 3143 | "copy_condition": "is:ANY", |
Edwin Kempin | b527526 | 2019-10-24 16:03:27 +0200 | [diff] [blame] | 3144 | "allow_post_submit": true |
| 3145 | } |
| 3146 | ] |
| 3147 | ---- |
| 3148 | |
Edwin Kempin | aa56f44 | 2019-10-25 08:40:24 +0200 | [diff] [blame] | 3149 | [[get-label]] |
| 3150 | === Get Label |
| 3151 | -- |
| 3152 | 'GET /projects/link:#project-name[\{project-name\}]/labels/link:#label-name[\{label-name\}]' |
| 3153 | -- |
| 3154 | |
| 3155 | Retrieves the definition of a label that is defined in this project. |
| 3156 | |
| 3157 | The calling user must have read access to the `refs/meta/config` branch of the |
| 3158 | project. |
| 3159 | |
| 3160 | .Request |
| 3161 | ---- |
| 3162 | GET /projects/All-Projects/labels/Code-Review HTTP/1.0 |
| 3163 | ---- |
| 3164 | |
| 3165 | As response a link:#label-definition-info[LabelDefinitionInfo] entity is |
| 3166 | returned that describes the label. |
| 3167 | |
| 3168 | .Response |
| 3169 | ---- |
| 3170 | HTTP/1.1 200 OK |
| 3171 | Content-Disposition: attachment |
| 3172 | Content-Type: application/json; charset=UTF-8 |
| 3173 | |
| 3174 | )]}' |
| 3175 | { |
| 3176 | "name": "Code-Review", |
| 3177 | "project": "All-Projects", |
| 3178 | "function": "MaxWithBlock", |
| 3179 | "values": { |
| 3180 | " 0": "No score", |
Oswald Buddenhagen | f887770 | 2022-02-15 14:01:34 +0100 | [diff] [blame] | 3181 | "-1": "I would prefer this is not submitted as is", |
| 3182 | "-2": "This shall not be submitted", |
Edwin Kempin | aa56f44 | 2019-10-25 08:40:24 +0200 | [diff] [blame] | 3183 | "+1": "Looks good to me, but someone else must approve", |
| 3184 | "+2": "Looks good to me, approved" |
| 3185 | }, |
| 3186 | "default_value": 0, |
| 3187 | "can_override": true, |
Edwin Kempin | 53bdd55 | 2022-04-05 14:03:26 +0200 | [diff] [blame] | 3188 | "copy_condition": "changekind:NO_CHANGE OR changekind:TRIVIAL_REBASE OR is:MIN", |
Edwin Kempin | aa56f44 | 2019-10-25 08:40:24 +0200 | [diff] [blame] | 3189 | "allow_post_submit": true |
| 3190 | } |
| 3191 | ---- |
| 3192 | |
Edwin Kempin | a020d26 | 2019-10-25 16:36:45 +0200 | [diff] [blame] | 3193 | [[create-label]] |
| 3194 | === Create Label |
| 3195 | -- |
| 3196 | 'PUT /projects/link:#project-name[\{project-name\}]/labels/link:#label-name[\{label-name\}]' |
| 3197 | -- |
| 3198 | |
| 3199 | Creates a new label definition in this project. |
| 3200 | |
| 3201 | The calling user must have write access to the `refs/meta/config` branch of the |
| 3202 | project. |
| 3203 | |
| 3204 | If a label with this name is already defined in this project, this label |
| 3205 | definition is updated (see link:#set-label[Set Label]). |
| 3206 | |
| 3207 | .Request |
| 3208 | ---- |
| 3209 | PUT /projects/My-Project/labels/Foo HTTP/1.0 |
| 3210 | Content-Type: application/json; charset=UTF-8 |
| 3211 | |
| 3212 | { |
| 3213 | "commit_message": "Create Foo Label", |
| 3214 | "values": { |
| 3215 | " 0": "No score", |
Oswald Buddenhagen | f887770 | 2022-02-15 14:01:34 +0100 | [diff] [blame] | 3216 | "-1": "I would prefer this is not submitted as is", |
| 3217 | "-2": "This shall not be submitted", |
Edwin Kempin | a020d26 | 2019-10-25 16:36:45 +0200 | [diff] [blame] | 3218 | "+1": "Looks good to me, but someone else must approve", |
| 3219 | "+2": "Looks good to me, approved" |
| 3220 | } |
| 3221 | } |
| 3222 | ---- |
| 3223 | |
| 3224 | As response a link:#label-definition-info[LabelDefinitionInfo] entity is |
| 3225 | returned that describes the created label. |
| 3226 | |
| 3227 | .Response |
| 3228 | ---- |
| 3229 | HTTP/1.1 200 OK |
| 3230 | Content-Disposition: attachment |
| 3231 | Content-Type: application/json; charset=UTF-8 |
| 3232 | |
| 3233 | )]}' |
| 3234 | { |
| 3235 | "name": "Foo", |
| 3236 | "project_name": "My-Project", |
| 3237 | "function": "MaxWithBlock", |
| 3238 | "values": { |
| 3239 | " 0": "No score", |
Oswald Buddenhagen | f887770 | 2022-02-15 14:01:34 +0100 | [diff] [blame] | 3240 | "-1": "I would prefer this is not submitted as is", |
| 3241 | "-2": "This shall not be submitted", |
Edwin Kempin | a020d26 | 2019-10-25 16:36:45 +0200 | [diff] [blame] | 3242 | "+1": "Looks good to me, but someone else must approve", |
| 3243 | "+2": "Looks good to me, approved" |
| 3244 | }, |
| 3245 | "default_value": 0, |
| 3246 | "can_override": true, |
Edwin Kempin | 53bdd55 | 2022-04-05 14:03:26 +0200 | [diff] [blame] | 3247 | "copy_condition": "changekind:NO_CHANGE", |
Edwin Kempin | a020d26 | 2019-10-25 16:36:45 +0200 | [diff] [blame] | 3248 | "allow_post_submit": true |
| 3249 | } |
| 3250 | ---- |
| 3251 | |
Edwin Kempin | b5e8745 | 2019-10-25 13:28:46 +0200 | [diff] [blame] | 3252 | [[set-label]] |
| 3253 | === Set Label |
| 3254 | -- |
| 3255 | 'PUT /projects/link:#project-name[\{project-name\}]/labels/link:#label-name[\{label-name\}]' |
| 3256 | -- |
| 3257 | |
| 3258 | Updates the definition of a label that is defined in this project. |
| 3259 | |
| 3260 | The calling user must have write access to the `refs/meta/config` branch of the |
| 3261 | project. |
| 3262 | |
| 3263 | Properties which are not set in the input entity are not modified. |
| 3264 | |
| 3265 | .Request |
| 3266 | ---- |
| 3267 | PUT /projects/All-Projects/labels/Code-Review HTTP/1.0 |
| 3268 | Content-Type: application/json; charset=UTF-8 |
| 3269 | |
| 3270 | { |
| 3271 | "commit_message": "Ignore self approvals for Code-Review label", |
| 3272 | "ignore_self_approval": true |
| 3273 | } |
| 3274 | ---- |
| 3275 | |
| 3276 | As response a link:#label-definition-info[LabelDefinitionInfo] entity is |
| 3277 | returned that describes the updated label. |
| 3278 | |
| 3279 | .Response |
| 3280 | ---- |
| 3281 | HTTP/1.1 200 OK |
| 3282 | Content-Disposition: attachment |
| 3283 | Content-Type: application/json; charset=UTF-8 |
| 3284 | |
| 3285 | )]}' |
| 3286 | { |
| 3287 | "name": "Code-Review", |
| 3288 | "project": "All-Projects", |
| 3289 | "function": "MaxWithBlock", |
| 3290 | "values": { |
| 3291 | " 0": "No score", |
Oswald Buddenhagen | f887770 | 2022-02-15 14:01:34 +0100 | [diff] [blame] | 3292 | "-1": "I would prefer this is not submitted as is", |
| 3293 | "-2": "This shall not be submitted", |
Edwin Kempin | b5e8745 | 2019-10-25 13:28:46 +0200 | [diff] [blame] | 3294 | "+1": "Looks good to me, but someone else must approve", |
| 3295 | "+2": "Looks good to me, approved" |
| 3296 | }, |
| 3297 | "default_value": 0, |
| 3298 | "can_override": true, |
Edwin Kempin | 53bdd55 | 2022-04-05 14:03:26 +0200 | [diff] [blame] | 3299 | "copy_condition": "changekind:NO_CHANGE OR changekind:TRIVIAL_REBASE OR is:MIN", |
Edwin Kempin | b5e8745 | 2019-10-25 13:28:46 +0200 | [diff] [blame] | 3300 | "allow_post_submit": true, |
| 3301 | "ignore_self_approval": true |
| 3302 | } |
| 3303 | ---- |
| 3304 | |
Edwin Kempin | 920f6f8 | 2019-10-28 10:43:13 +0100 | [diff] [blame] | 3305 | [[delete-label]] |
| 3306 | === Delete Label |
| 3307 | -- |
| 3308 | 'DELETE /projects/link:#project-name[\{project-name\}]/labels/link:#label-name[\{label-name\}]' |
| 3309 | -- |
| 3310 | |
| 3311 | Deletes the definition of a label that is defined in this project. |
| 3312 | |
| 3313 | The calling user must have write access to the `refs/meta/config` branch of the |
| 3314 | project. |
| 3315 | |
| 3316 | The request body does not need to include a link:#delete-label-input[ |
| 3317 | DeleteLabelInput] entity if no commit message is specified. |
| 3318 | |
| 3319 | .Request |
| 3320 | ---- |
Edwin Kempin | 6b96af6 | 2019-10-28 13:55:14 +0100 | [diff] [blame] | 3321 | DELETE /projects/My-Project/labels/Foo-Review HTTP/1.0 |
Edwin Kempin | 920f6f8 | 2019-10-28 10:43:13 +0100 | [diff] [blame] | 3322 | Content-Type: application/json; charset=UTF-8 |
| 3323 | |
| 3324 | { |
| 3325 | "commit_message": "Delete Foo-Review label", |
| 3326 | } |
| 3327 | ---- |
| 3328 | |
| 3329 | If a label was deleted the response is "`204 No Content`". |
| 3330 | |
| 3331 | .Response |
| 3332 | ---- |
| 3333 | HTTP/1.1 204 No Content |
| 3334 | ---- |
| 3335 | |
Edwin Kempin | 83d6d22 | 2019-10-28 13:45:52 +0100 | [diff] [blame] | 3336 | [[batch-update-labels]] |
| 3337 | === Batch Update Labels |
| 3338 | -- |
| 3339 | 'POST /projects/link:#project-name[\{project-name\}]/labels/' |
| 3340 | -- |
| 3341 | |
| 3342 | Creates/updates/deletes multiple label definitions in this project at once. |
| 3343 | |
| 3344 | The calling user must have write access to the `refs/meta/config` branch of the |
| 3345 | project. |
| 3346 | |
| 3347 | The updates must be specified in the request body as |
| 3348 | link:#batch-label-input[BatchLabelInput] entity. |
| 3349 | |
| 3350 | The updates are processed in the following order: |
| 3351 | |
| 3352 | 1. label deletions |
| 3353 | 2. label creations |
| 3354 | 3. label updates |
| 3355 | |
| 3356 | .Request |
| 3357 | ---- |
| 3358 | POST /projects/My-Project/labels/ HTTP/1.0 |
| 3359 | Content-Type: application/json; charset=UTF-8 |
| 3360 | |
| 3361 | { |
| 3362 | "commit_message": "Update Labels", |
| 3363 | "delete": [ |
| 3364 | "Old-Review", |
| 3365 | "Unused-Review" |
| 3366 | ], |
| 3367 | "create": [ |
| 3368 | { |
| 3369 | "name": "Foo-Review", |
| 3370 | "values": { |
| 3371 | " 0": "No score", |
Oswald Buddenhagen | f887770 | 2022-02-15 14:01:34 +0100 | [diff] [blame] | 3372 | "-1": "I would prefer this is not submitted as is", |
| 3373 | "-2": "This shall not be submitted", |
Edwin Kempin | 83d6d22 | 2019-10-28 13:45:52 +0100 | [diff] [blame] | 3374 | "+1": "Looks good to me, but someone else must approve", |
| 3375 | "+2": "Looks good to me, approved" |
| 3376 | } |
| 3377 | ], |
| 3378 | "update:" { |
| 3379 | "Bar-Review": { |
| 3380 | "function": "MaxWithBlock" |
| 3381 | }, |
| 3382 | "Baz-Review": { |
Edwin Kempin | 53bdd55 | 2022-04-05 14:03:26 +0200 | [diff] [blame] | 3383 | "copy_condition": "is:MIN" |
Edwin Kempin | 83d6d22 | 2019-10-28 13:45:52 +0100 | [diff] [blame] | 3384 | } |
| 3385 | } |
| 3386 | } |
| 3387 | ---- |
| 3388 | |
| 3389 | If the label updates were done successfully the response is "`200 OK`". |
| 3390 | |
| 3391 | .Response |
| 3392 | ---- |
| 3393 | HTTP/1.1 200 OK |
| 3394 | ---- |
| 3395 | |
Youssef Elghareeb | 859b052 | 2021-05-21 00:34:59 +0200 | [diff] [blame^] | 3396 | [[submit-requirement-endpoints]] |
| 3397 | == Submit Requirement Endpoints |
| 3398 | |
| 3399 | [[create-submit-requirement]] |
| 3400 | === Create Submit Requirement |
| 3401 | |
| 3402 | -- |
| 3403 | 'PUT /projects/link:#project-name[\{project-name\}]/submit_requirements/link:#submit-requirement-name[\{submit-requirement-name\}]' |
| 3404 | -- |
| 3405 | |
| 3406 | Creates a new submit requirement definition in this project. |
| 3407 | |
| 3408 | The calling user must have write access to the `refs/meta/config` branch of the |
| 3409 | project. |
| 3410 | |
| 3411 | If a submit requirement with this name is already defined in this project, this |
| 3412 | submit requirement definition is updated |
| 3413 | (see link:#update-submit-requirement[Update Submit Requirement]). |
| 3414 | |
| 3415 | The submit requirement data must be provided in the request body as |
| 3416 | link:#submit-requirement-input[SubmitRequirementInput]. |
| 3417 | |
| 3418 | .Request |
| 3419 | ---- |
| 3420 | PUT /projects/My-Project/submit_requirements/Code-Review HTTP/1.0 |
| 3421 | Content-Type: application/json; charset=UTF-8 |
| 3422 | |
| 3423 | { |
| 3424 | "name": "Code-Review", |
| 3425 | "description": "At least one maximum vote for the Code-Review label is required", |
| 3426 | "submittability_expression": "label:Code-Review=+2" |
| 3427 | } |
| 3428 | ---- |
| 3429 | |
| 3430 | As response a link:#submit-requirement-info[SubmitRequirementInfo] entity is |
| 3431 | returned that describes the created submit requirement. |
| 3432 | |
| 3433 | .Response |
| 3434 | ---- |
| 3435 | HTTP/1.1 200 OK |
| 3436 | Content-Disposition: attachment |
| 3437 | Content-Type: application/json; charset=UTF-8 |
| 3438 | |
| 3439 | )]}' |
| 3440 | { |
| 3441 | "name": "Code-Review", |
| 3442 | "description": "At least one maximum vote for the Code-Review label is required", |
| 3443 | "submittability_expression": "label:Code-Review=+2", |
| 3444 | "allow_override_in_child_projects": false |
| 3445 | } |
| 3446 | ---- |
| 3447 | |
| 3448 | [[update-submit-requirement]] |
| 3449 | === Update Submit Requirement |
| 3450 | |
| 3451 | -- |
| 3452 | 'PUT /projects/link:#project-name[\{project-name\}]/submit_requirements/link:#submit-requirement-name[\{submit-requirement-name\}]' |
| 3453 | -- |
| 3454 | |
| 3455 | Updates the definition of a submit requirement that is defined in this project. |
| 3456 | |
| 3457 | The calling user must have write access to the `refs/meta/config` branch of the |
| 3458 | project. |
| 3459 | |
| 3460 | The new submit requirement will overwrite the existing submit requirement. |
| 3461 | That is, unspecified attributes will be set to their defaults. |
| 3462 | |
| 3463 | .Request |
| 3464 | ---- |
| 3465 | PUT /projects/My-Project/submit_requirements/Code-Review HTTP/1.0 |
| 3466 | Content-Type: application/json; charset=UTF-8 |
| 3467 | |
| 3468 | { |
| 3469 | "name": "Code-Review", |
| 3470 | "description": "At least one maximum vote for the Code-Review label is required", |
| 3471 | "submittability_expression": "label:Code-Review=+2" |
| 3472 | } |
| 3473 | ---- |
| 3474 | |
| 3475 | As response a link:#submit-requirement-info[SubmitRequirementInfo] entity is |
| 3476 | returned that describes the created submit requirement. |
| 3477 | |
| 3478 | .Response |
| 3479 | ---- |
| 3480 | HTTP/1.1 200 OK |
| 3481 | Content-Disposition: attachment |
| 3482 | Content-Type: application/json; charset=UTF-8 |
| 3483 | |
| 3484 | )]}' |
| 3485 | { |
| 3486 | "name": "Code-Review", |
| 3487 | "description": "At least one maximum vote for the Code-Review label is required", |
| 3488 | "submittability_expression": "label:Code-Review=+2", |
| 3489 | "allow_override_in_child_projects": false |
| 3490 | } |
| 3491 | ---- |
| 3492 | |
| 3493 | [[get-submit-requirement]] |
| 3494 | === Get Submit Requirement |
| 3495 | -- |
| 3496 | 'GET /projects/link:#project-name[\{project-name\}]/submit_requirements/link:#submit-requirement-name[\{submit-requirement-name\}]' |
| 3497 | -- |
| 3498 | |
| 3499 | Retrieves the definition of a submit requirement that is defined in this project. |
| 3500 | |
| 3501 | The calling user must have read access to the `refs/meta/config` branch of the |
| 3502 | project. |
| 3503 | |
| 3504 | .Request |
| 3505 | ---- |
| 3506 | GET /projects/All-Projects/submit-requirement/Code-Review HTTP/1.0 |
| 3507 | ---- |
| 3508 | |
| 3509 | .Response |
| 3510 | ---- |
| 3511 | HTTP/1.1 200 OK |
| 3512 | Content-Disposition: attachment |
| 3513 | Content-Type: application/json; charset=UTF-8 |
| 3514 | |
| 3515 | )]}' |
| 3516 | { |
| 3517 | "name": "Code-Review", |
| 3518 | "description": "At least one maximum vote for the Code-Review label is required", |
| 3519 | "submittability_expression": "label:Code-Review=+2", |
| 3520 | "allow_override_in_child_projects": false |
| 3521 | } |
| 3522 | ---- |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 3523 | |
| 3524 | [[ids]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3525 | == IDs |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 3526 | |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 3527 | [[branch-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3528 | === \{branch-id\} |
Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 3529 | The name of a branch or `HEAD`. The prefix `refs/heads/` can be |
| 3530 | omitted. |
| 3531 | |
Edwin Kempin | 1b99360 | 2014-07-08 16:18:45 +0200 | [diff] [blame] | 3532 | [[commit-id]] |
| 3533 | === \{commit-id\} |
| 3534 | Commit ID. |
| 3535 | |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 3536 | [[tag-id]] |
| 3537 | === \{tag-id\} |
| 3538 | The name of a tag. The prefix `refs/tags/` can be omitted. |
| 3539 | |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3540 | [[dashboard-id]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3541 | === \{dashboard-id\} |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 3542 | The ID of a dashboard in the format '<ref>:<path>'. |
| 3543 | |
| 3544 | A special dashboard ID is `default` which represents the default |
| 3545 | dashboard of a project. |
| 3546 | |
Edwin Kempin | aa56f44 | 2019-10-25 08:40:24 +0200 | [diff] [blame] | 3547 | [[label-name]] |
| 3548 | === \{label-name\} |
| 3549 | The name of a review label. |
| 3550 | |
Youssef Elghareeb | 859b052 | 2021-05-21 00:34:59 +0200 | [diff] [blame^] | 3551 | [[submit-requirement-name]] |
| 3552 | === \{submit-requirement-name\} |
| 3553 | The name of a submit requirement. |
| 3554 | |
| 3555 | |
Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 3556 | [[project-name]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3557 | === \{project-name\} |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 3558 | The name of the project. |
| 3559 | |
Edwin Kempin | a9e94ab | 2015-03-06 10:35:39 +0100 | [diff] [blame] | 3560 | If the name ends with `.git`, the suffix will be automatically removed. |
| 3561 | |
Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 3562 | |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 3563 | [[json-entities]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3564 | == JSON Entities |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 3565 | |
Han-Wen Nienhuys | d1ed08d | 2017-09-04 18:13:23 +0200 | [diff] [blame] | 3566 | [[access-check-info]] |
| 3567 | === AccessCheckInfo |
| 3568 | |
| 3569 | The `AccessCheckInfo` entity is the result of an access check. |
| 3570 | |
| 3571 | [options="header",cols="1,^1,5"] |
| 3572 | |========================================= |
| 3573 | |Field Name ||Description |
| 3574 | |`status` ||The HTTP status code for the access. |
Han-Wen Nienhuys | 3364c47 | 2018-10-01 16:49:42 +0200 | [diff] [blame] | 3575 | 200 means success and 403 means denied. |
Han-Wen Nienhuys | d1ed08d | 2017-09-04 18:13:23 +0200 | [diff] [blame] | 3576 | |`message` |optional|A clarifying message if `status` is not 200. |
Edwin Kempin | 35b6f4a | 2020-02-14 13:33:45 +0100 | [diff] [blame] | 3577 | |`debug_logs` |optional| |
| 3578 | Debug logs that may help to understand why a permission is denied or allowed. |
Han-Wen Nienhuys | d1ed08d | 2017-09-04 18:13:23 +0200 | [diff] [blame] | 3579 | |========================================= |
| 3580 | |
Edwin Kempin | bf9df39 | 2018-01-12 15:20:48 +0100 | [diff] [blame] | 3581 | [[auto_closeable_changes_check_input]] |
| 3582 | === AutoCloseableChangesCheckInput |
| 3583 | The `AutoCloseableChangesCheckInput` entity contains options for running |
| 3584 | the link:#auto-closeable-changes-check[AutoCloseableChangesCheck]. |
| 3585 | |
| 3586 | [options="header",cols="1,^2,4"] |
| 3587 | |============================= |
| 3588 | |Field Name ||Description |
| 3589 | |`fix` |optional| |
| 3590 | Whether auto-closeable changes should be closed automatically. |
| 3591 | |`branch` || |
| 3592 | The branch for which the link:#auto-closeable-changes-check[ |
| 3593 | AutoCloseableChangesCheck] should be performed. The 'refs/heads/' |
| 3594 | prefix for the branch name can be omitted. |
| 3595 | |`skip_commits` |optional| |
| 3596 | Number of commits that should be skipped when walking the commits of |
| 3597 | the branch. |
| 3598 | |`max_commits` |optional| |
| 3599 | Maximum number of commits to walk. If not specified this defaults to |
| 3600 | 10,000 commits. 10,000 is also the maximum that can be set. |
| 3601 | Auto-closing changes is an expensive operation and the more commits |
| 3602 | are walked the slower it gets. This is why you should avoid walking too |
| 3603 | many commits. |
| 3604 | |============================= |
| 3605 | |
| 3606 | [[auto_closeable_changes_check_result]] |
| 3607 | === AutoCloseableChangesCheckResult |
| 3608 | The `AutoCloseableChangesCheckResult` entity contains the results of |
| 3609 | running the link:#auto-closeable-changes-check[AutoCloseableChangesCheck] |
| 3610 | on a project. |
| 3611 | |
| 3612 | [options="header",cols="1,6"] |
| 3613 | |==================================== |
| 3614 | |Field Name |Description |
| 3615 | |`auto_closeable_changes`| |
| 3616 | Changes that can be auto-closed as list of |
| 3617 | link:rest-api-changes.html#change-info[ChangeInfo] entities. For each |
| 3618 | returned link:rest-api-changes.html#change-info[ChangeInfo] entity the |
| 3619 | `problems` field is populated that includes details about the detected |
| 3620 | issues. If `fix` in the link:#auto_closeable_changes_check_input[ |
| 3621 | AutoCloseableChangesCheckInput] was set to `true`, `status` and |
| 3622 | `outcome` in link:rest-api-changes.html#problem-info[ProblemInfo] are |
| 3623 | populated. If the status says `FIXED` Gerrit was able to auto-close the |
| 3624 | change now. |
| 3625 | |==================================== |
| 3626 | |
Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 3627 | [[ban-input]] |
| 3628 | === BanInput |
| 3629 | The `BanInput` entity contains information for banning commits in a |
| 3630 | project. |
| 3631 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3632 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 3633 | |======================= |
| 3634 | |Field Name||Description |
| 3635 | |`commits` ||List of commits to be banned. |
| 3636 | |`reason` |optional|Reason for banning the commits. |
| 3637 | |======================= |
| 3638 | |
| 3639 | [[ban-result-info]] |
| 3640 | === BanResultInfo |
| 3641 | The `BanResultInfo` entity describes the result of banning commits. |
| 3642 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3643 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 3644 | |============================= |
| 3645 | |Field Name ||Description |
| 3646 | |`newly_banned` |optional|List of newly banned commits. |
| 3647 | |`already_banned`|optional|List of commits that were already banned. |
| 3648 | |`ignored` |optional|List of object IDs that were ignored. |
| 3649 | |============================= |
| 3650 | |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 3651 | [[branch-info]] |
| 3652 | === BranchInfo |
| 3653 | The `BranchInfo` entity contains information about a branch. |
| 3654 | |
| 3655 | [options="header",cols="1,^2,4"] |
| 3656 | |========================= |
| 3657 | |Field Name ||Description |
| 3658 | |`ref` ||The ref of the branch. |
| 3659 | |`revision` ||The revision to which the branch points. |
David Pursehouse | d00515e | 2017-11-10 15:57:41 +0900 | [diff] [blame] | 3660 | |`can_delete`|not set if `false`| |
Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 3661 | Whether the calling user can delete this branch. |
| 3662 | |`web_links` |optional| |
| 3663 | Links to the branch in external sites as a list of |
| 3664 | link:rest-api-changes.html#web-link-info[WebLinkInfo] entries. |
| 3665 | |========================= |
| 3666 | |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 3667 | [[branch-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3668 | === BranchInput |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 3669 | The `BranchInput` entity contains information for the creation of |
| 3670 | a new branch. |
| 3671 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3672 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 3673 | |======================= |
Edwin Kempin | 11663f7 | 2022-02-15 10:24:33 +0100 | [diff] [blame] | 3674 | |Field Name ||Description |
| 3675 | |`ref` |optional| |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 3676 | The name of the branch. The prefix `refs/heads/` can be |
| 3677 | omitted. + |
| 3678 | If set, must match the branch ID in the URL. |
Edwin Kempin | 11663f7 | 2022-02-15 10:24:33 +0100 | [diff] [blame] | 3679 | |`revision` |optional| |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 3680 | The base revision of the new branch. + |
| 3681 | If not set, `HEAD` will be used as base revision. |
Edwin Kempin | 11663f7 | 2022-02-15 10:24:33 +0100 | [diff] [blame] | 3682 | |`validation_options`|optional| |
| 3683 | Map with key-value pairs that are forwarded as options to the ref operation |
| 3684 | validation listeners (e.g. can be used to skip certain validations). Which |
| 3685 | validation options are supported depends on the installed ref operation |
| 3686 | validation listeners. Gerrit core doesn't support any validation options, but |
| 3687 | ref operation validation listeners that are implemented in plugins may. Please |
| 3688 | refer to the documentation of the installed plugins to learn whether they |
| 3689 | support validation options. Unknown validation options are silently ignored. |
Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 3690 | |======================= |
| 3691 | |
Edwin Kempin | bf9df39 | 2018-01-12 15:20:48 +0100 | [diff] [blame] | 3692 | [[check-project-input]] |
| 3693 | === CheckProjectInput |
| 3694 | The `CheckProjectInput` entity contains information about which |
| 3695 | consistency checks should be run on a project. |
| 3696 | |
| 3697 | [options="header",cols="1,^2,4"] |
| 3698 | |=========================================== |
| 3699 | |Field Name ||Description |
| 3700 | |`auto_closeable_changes_check`|optional| |
| 3701 | Parameters for the link:#auto-closeable-changes-check[ |
| 3702 | AutoCloseableChangesCheck] as |
| 3703 | link:rest-api-changes.html#auto_closeable_changes_check_input[ |
| 3704 | AutoCloseableChangesCheckInput] entity. |
| 3705 | |=========================================== |
| 3706 | |
| 3707 | [[check-project-result-info]] |
| 3708 | === CheckProjectResultInfo |
| 3709 | The `CheckProjectResultInfo` entity contains results for consistency |
| 3710 | checks that have been run on a project. |
| 3711 | |
| 3712 | [options="header",cols="1,^2,4"] |
| 3713 | |================================================== |
| 3714 | |Field Name ||Description |
| 3715 | |`auto_closeable_changes_check_result`|optional| |
| 3716 | Results for the link:#auto-closeable-changes-check[ |
| 3717 | AutoCloseableChangesCheck] as |
| 3718 | link:rest-api-changes.html#auto_closeable_changes_check_result[ |
| 3719 | AutoCloseableChangesCheckResult] entity. |
| 3720 | |================================================== |
| 3721 | |
Edwin Kempin | 043436d | 2018-10-17 12:23:22 +0200 | [diff] [blame] | 3722 | [[commentlink-info]] |
| 3723 | === CommentLinkInfo |
| 3724 | The `CommentLinkInfo` entity describes a |
| 3725 | link:config-gerrit.html#commentlink[commentlink]. |
| 3726 | |
| 3727 | [options="header",cols="1,^2,4"] |
| 3728 | |================================================== |
| 3729 | |Field Name | |Description |
| 3730 | |`match` | |A JavaScript regular expression to match |
| 3731 | positions to be replaced with a hyperlink, as documented in |
Gal Paikin | 8636747 | 2019-08-02 09:59:42 +0200 | [diff] [blame] | 3732 | link:config-gerrit.html#commentlink.name.match[commentlink.name.match]. |
Edwin Kempin | 043436d | 2018-10-17 12:23:22 +0200 | [diff] [blame] | 3733 | |`link` | |The URL to direct the user to whenever the |
| 3734 | regular expression is matched, as documented in |
Gal Paikin | 8636747 | 2019-08-02 09:59:42 +0200 | [diff] [blame] | 3735 | link:config-gerrit.html#commentlink.name.link[commentlink.name.link]. |
Edwin Kempin | 043436d | 2018-10-17 12:23:22 +0200 | [diff] [blame] | 3736 | |`enabled` |optional|Whether the commentlink is enabled, as documented |
Gal Paikin | 8636747 | 2019-08-02 09:59:42 +0200 | [diff] [blame] | 3737 | in link:config-gerrit.html#commentlink.name.enabled[ |
Edwin Kempin | 043436d | 2018-10-17 12:23:22 +0200 | [diff] [blame] | 3738 | commentlink.name.enabled]. If not set the commentlink is enabled. |
David Pursehouse | 67c8f14 | 2018-10-14 14:01:29 +0900 | [diff] [blame] | 3739 | |
| 3740 | [[commentlink-input]] |
| 3741 | === CommentLinkInput |
| 3742 | The `CommentLinkInput` entity describes the input for a |
| 3743 | link:config-gerrit.html#commentlink[commentlink]. |
| 3744 | |
| 3745 | |================================================== |
| 3746 | [options="header",cols="1,^2,4"] |
| 3747 | |================================================== |
| 3748 | |Field Name | |Description |
| 3749 | |`match` | |A JavaScript regular expression to match |
| 3750 | positions to be replaced with a hyperlink, as documented in |
| 3751 | link:config-gerrit.html#commentlink.name.match[commentlink.name.match]. |
| 3752 | |`link` | |The URL to direct the user to whenever the |
| 3753 | regular expression is matched, as documented in |
| 3754 | link:config-gerrit.html#commentlink.name.link[commentlink.name.link]. |
| 3755 | |`enabled` |optional|Whether the commentlink is enabled, as documented |
| 3756 | in link:config-gerrit.html#commentlink.name.enabled[ |
| 3757 | commentlink.name.enabled]. If not set the commentlink is enabled. |
Edwin Kempin | 043436d | 2018-10-17 12:23:22 +0200 | [diff] [blame] | 3758 | |================================================== |
| 3759 | |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3760 | [[config-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3761 | === ConfigInfo |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3762 | The `ConfigInfo` entity contains information about the effective project |
| 3763 | configuration. |
| 3764 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3765 | [options="header",cols="1,^2,4"] |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3766 | |======================================================= |
| 3767 | |Field Name ||Description |
| 3768 | |`description` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3769 | The description of the project. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3770 | |`use_contributor_agreements` |optional| |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3771 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3772 | authors must complete a contributor agreement on the site before |
| 3773 | pushing any commits or changes to this project. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3774 | |`use_content_merge` |optional| |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3775 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3776 | Gerrit will try to perform a 3-way merge of text file content when a |
| 3777 | file has been modified by both the destination branch and the change |
| 3778 | being submitted. This option only takes effect if submit type is not |
| 3779 | FAST_FORWARD_ONLY. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3780 | |`use_signed_off_by` |optional| |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3781 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3782 | each change must contain a Signed-off-by line from either the author or |
| 3783 | the uploader in the commit message. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3784 | |`create_new_change_for_all_not_in_target` |optional| |
| 3785 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3786 | 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] | 3787 | |`require_change_id` |optional| |
| 3788 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether a |
| 3789 | valid link:user-changeid.html[Change-Id] footer in any commit uploaded |
| 3790 | for review is required. This does not apply to commits pushed directly |
| 3791 | to a branch or tag. This property is deprecated and will be removed in |
| 3792 | a future release. |
Doug Claar | 1b0f7625 | 2016-03-23 13:34:55 -0700 | [diff] [blame] | 3793 | |`enable_signed_push`|optional, not set if signed push is disabled| |
Dave Borowitz | 5170e0f | 2015-06-18 21:05:29 -0400 | [diff] [blame] | 3794 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3795 | signed push validation is enabled on the project. |
Doug Claar | 1b0f7625 | 2016-03-23 13:34:55 -0700 | [diff] [blame] | 3796 | |`require_signed_push`|optional, not set if signed push is disabled| |
Dave Borowitz | 0543c73 | 2015-10-20 10:35:26 -0400 | [diff] [blame] | 3797 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3798 | signed push validation is required on the project. |
Saša Živkov | 225b7a7 | 2015-11-17 17:37:43 +0100 | [diff] [blame] | 3799 | |`reject_implicit_merges`|optional| |
| 3800 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3801 | implicit merges should be rejected on changes pushed to the project. |
David Ostrovsky | 9690994 | 2018-06-10 08:30:33 +0200 | [diff] [blame] | 3802 | |`private_by_default` || |
Changcheng Xiao | d089b4a | 2017-08-10 14:05:22 +0200 | [diff] [blame] | 3803 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3804 | all new changes are set as private by default. |
David Ostrovsky | 9690994 | 2018-06-10 08:30:33 +0200 | [diff] [blame] | 3805 | |`work_in_progress_by_default`|| |
| 3806 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3807 | all new changes are set as work-in-progress by default. |
| 3808 | |`max_object_size_limit` || |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 3809 | The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size |
| 3810 | limit] of this project as a link:#max-object-size-limit-info[ |
| 3811 | MaxObjectSizeLimitInfo] entity. |
Dave Borowitz | c8f8d2e | 2017-10-23 11:18:23 -0400 | [diff] [blame] | 3812 | |`default_submit_type` || |
| 3813 | link:#submit-type-info[SubmitTypeInfo] that describes the default submit type of |
| 3814 | the project, when not overridden at the change level. |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 3815 | |`submit_type` || |
Dave Borowitz | c8f8d2e | 2017-10-23 11:18:23 -0400 | [diff] [blame] | 3816 | Deprecated; equivalent to link:#submit-type-info[`value`] in |
| 3817 | `default_submit_type`. |
Patrick Hiesel | 5a31635 | 2017-06-22 15:38:06 +0200 | [diff] [blame] | 3818 | |`match_author_to_committer_date` |optional| |
| 3819 | link:#inherited-boolean-info[InheritedBooleanInfo] that indicates whether |
| 3820 | 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] | 3821 | |`state` |optional| |
| 3822 | The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. + |
| 3823 | Not set if the project state is `ACTIVE`. |
Edwin Kempin | 3660c13 | 2013-07-16 08:03:11 +0200 | [diff] [blame] | 3824 | |`commentlinks` || |
Edwin Kempin | 8aa53af | 2013-07-15 10:43:15 +0200 | [diff] [blame] | 3825 | Map with the comment link configurations of the project. The name of |
Edwin Kempin | 043436d | 2018-10-17 12:23:22 +0200 | [diff] [blame] | 3826 | the comment link configuration is mapped to a link:#commentlink-info[ |
| 3827 | CommentlinkInfo] entity. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3828 | |`plugin_config` |optional| |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 3829 | Plugin configuration as map which maps the plugin name to a map of |
| 3830 | parameter names to link:#config-parameter-info[ConfigParameterInfo] |
Alice Kober-Sotzek | 77bc186 | 2020-06-25 20:05:47 +0200 | [diff] [blame] | 3831 | entities. Only filled for users who have read access to `refs/meta/config`. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3832 | |`actions` |optional| |
David Ostrovsky | 9e8b2fb | 2013-08-30 08:09:53 +0200 | [diff] [blame] | 3833 | Actions the caller might be able to perform on this project. The |
| 3834 | information is a map of view names to |
Patrick Hiesel | dc285c7 | 2018-01-08 17:20:15 +0100 | [diff] [blame] | 3835 | |`reject_empty_commit` |optional| |
| 3836 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 3837 | empty commits should be rejected when a change is merged. |
David Ostrovsky | 9e8b2fb | 2013-08-30 08:09:53 +0200 | [diff] [blame] | 3838 | link:rest-api-changes.html#action-info[ActionInfo] entities. |
David Pursehouse | 510b87d | 2014-11-25 16:46:28 +0900 | [diff] [blame] | 3839 | |======================================================= |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 3840 | |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3841 | [[config-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3842 | === ConfigInput |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3843 | The `ConfigInput` entity describes a new project configuration. |
| 3844 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3845 | [options="header",cols="1,^2,4"] |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3846 | |====================================================== |
| 3847 | |Field Name ||Description |
| 3848 | |`description` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3849 | The new description of the project. + |
| 3850 | If not set, the description is removed. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3851 | |`use_contributor_agreements` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3852 | Whether authors must complete a contributor agreement on the site |
| 3853 | before pushing any commits or changes to this project. + |
| 3854 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 3855 | If not set, this setting is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3856 | |`use_content_merge` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3857 | Whether Gerrit will try to perform a 3-way merge of text file content |
| 3858 | when a file has been modified by both the destination branch and the |
| 3859 | change being submitted. This option only takes effect if submit type is |
| 3860 | not FAST_FORWARD_ONLY. + |
| 3861 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 3862 | If not set, this setting is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3863 | |`use_signed_off_by` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3864 | Whether each change must contain a Signed-off-by line from either the |
| 3865 | author or the uploader in the commit message. + |
| 3866 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 3867 | If not set, this setting is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3868 | |`create_new_change_for_all_not_in_target` |optional| |
| 3869 | Whether a new change will be created for every commit not in target |
| 3870 | branch. + |
| 3871 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 3872 | If not set, this setting is not updated. |
Han-Wen Nienhuys | cdde7a30 | 2019-07-24 12:19:16 +0200 | [diff] [blame] | 3873 | |`require_change_id` |optional| |
| 3874 | Whether a valid link:user-changeid.html[Change-Id] footer in any commit |
| 3875 | uploaded for review is required. This does not apply to commits pushed |
| 3876 | directly to a branch or tag. + |
| 3877 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 3878 | If not set, this setting is not updated. |
| 3879 | This property is deprecated and will be removed in |
| 3880 | a future release. |
Saša Živkov | 225b7a7 | 2015-11-17 17:37:43 +0100 | [diff] [blame] | 3881 | |`reject_implicit_merges` |optional| |
| 3882 | Whether a check for implicit merges will be performed when changes |
| 3883 | are pushed for review. + |
| 3884 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 3885 | If not set, this setting is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3886 | |`max_object_size_limit` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3887 | The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size |
| 3888 | limit] of this project as a link:#max-object-size-limit-info[ |
| 3889 | MaxObjectSizeLimitInfo] entity. + |
| 3890 | If set to `0`, the max object size limit is removed. + |
| 3891 | If not set, this setting is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3892 | |`submit_type` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3893 | 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] | 3894 | `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `REBASE_ALWAYS`, `MERGE_ALWAYS` or |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3895 | `CHERRY_PICK`. + |
| 3896 | If not set, the submit type is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3897 | |`state` |optional| |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3898 | The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. + |
| 3899 | Not set if the project state is `ACTIVE`. + |
| 3900 | If not set, the project state is not updated. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 3901 | |`plugin_config_values` |optional| |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 3902 | Plugin configuration values as map which maps the plugin name to a map |
| 3903 | of parameter names to values. |
Patrick Hiesel | dc285c7 | 2018-01-08 17:20:15 +0100 | [diff] [blame] | 3904 | |`reject_empty_commit` |optional| |
| 3905 | Whether empty commits should be rejected when a change is merged. |
| 3906 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 3907 | If not set, this setting is not updated. |
David Pursehouse | 67c8f14 | 2018-10-14 14:01:29 +0900 | [diff] [blame] | 3908 | |commentlinks |optional| |
| 3909 | Map of commentlink names to link:#commentlink-input[CommentLinkInput] |
| 3910 | entities to add or update on the project. If the given commentlink |
| 3911 | already exists, it will be updated with the given values, otherwise |
| 3912 | 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] | 3913 | |====================================================== |
Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 3914 | |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 3915 | [[config-parameter-info]] |
David Pursehouse | b10c266 | 2016-12-06 08:41:33 +0900 | [diff] [blame] | 3916 | === ConfigParameterInfo |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 3917 | The `ConfigParameterInfo` entity describes a project configuration |
| 3918 | parameter. |
| 3919 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3920 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 3921 | |=============================== |
| 3922 | |Field Name ||Description |
| 3923 | |`display_name` |optional| |
| 3924 | The display name of the configuration parameter. |
Edwin Kempin | d92196d | 2014-01-27 21:55:46 +0100 | [diff] [blame] | 3925 | |`description` |optional| |
| 3926 | The description of the configuration parameter. |
Edwin Kempin | aec6132 | 2014-01-28 12:59:22 +0100 | [diff] [blame] | 3927 | |`warning` |optional| |
| 3928 | Warning message for the configuration parameter. |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 3929 | |`type` || |
David Ostrovsky | c6dd217 | 2014-02-01 19:13:27 +0100 | [diff] [blame] | 3930 | The type of the configuration parameter. Can be `STRING`, `INT`, |
| 3931 | `LONG`, `BOOLEAN`, `LIST` or `ARRAY`. |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 3932 | |`value` |optional| |
Edwin Kempin | d32beef | 2013-11-28 20:36:33 +0100 | [diff] [blame] | 3933 | The value of the configuration parameter as string. If the parameter |
| 3934 | is inheritable this is the effective value which is deduced from |
| 3935 | `configured_value` and `inherited_value`. |
David Ostrovsky | c6dd217 | 2014-02-01 19:13:27 +0100 | [diff] [blame] | 3936 | |`values` |optional| |
| 3937 | The list of values. Only set if the `type` is `ARRAY`. |
Doug Claar | 1b0f7625 | 2016-03-23 13:34:55 -0700 | [diff] [blame] | 3938 | |`editable` |`false` if not set| |
Edwin Kempin | 0d48523 | 2013-11-17 18:55:48 +0100 | [diff] [blame] | 3939 | Whether the value is editable. |
Edwin Kempin | 20f256fb | 2013-11-28 19:56:15 +0100 | [diff] [blame] | 3940 | |`permitted_values`|optional| |
David Ostrovsky | c6dd217 | 2014-02-01 19:13:27 +0100 | [diff] [blame] | 3941 | The list of permitted values. Only set if the `type` is `LIST`. |
Edwin Kempin | d32beef | 2013-11-28 20:36:33 +0100 | [diff] [blame] | 3942 | |`inheritable` |`false` if not set| |
| 3943 | Whether the configuration parameter can be inherited. |
| 3944 | |`configured_value`|optional| |
| 3945 | The value of the configuration parameter that is configured on this |
| 3946 | project, only set if `inheritable` is true. |
| 3947 | |`inherited_value` |optional| |
| 3948 | The inherited value of the configuration parameter, only set if |
| 3949 | `inheritable` is true. |
Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 3950 | |=============================== |
| 3951 | |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3952 | [[dashboard-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3953 | === DashboardInfo |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3954 | The `DashboardInfo` entity contains information about a project |
| 3955 | dashboard. |
| 3956 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3957 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3958 | |=============================== |
| 3959 | |Field Name ||Description |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3960 | |`id` || |
| 3961 | The ID of the dashboard. The ID has the format '<ref>:<path>', |
| 3962 | where ref and path are URL encoded. |
| 3963 | |`project` || |
| 3964 | The name of the project for which this dashboard is returned. |
| 3965 | |`defining_project`|| |
| 3966 | The name of the project in which this dashboard is defined. |
| 3967 | This is different from `project` if the dashboard is inherited from a |
| 3968 | parent project. |
| 3969 | |`ref` || |
| 3970 | The name of the ref in which the dashboard is defined, without the |
| 3971 | `refs/meta/dashboards/` prefix, which is common for all dashboard refs. |
| 3972 | |`path` || |
| 3973 | The path of the file in which the dashboard is defined. |
| 3974 | |`description` |optional|The description of the dashboard. |
| 3975 | |`foreach` |optional| |
| 3976 | Subquery that applies to all sections in the dashboard. + |
| 3977 | Tokens such as `${project}` are not resolved. |
| 3978 | |`url` || |
David Pursehouse | a1d633b | 2014-05-02 17:21:02 +0900 | [diff] [blame] | 3979 | 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] | 3980 | The URL is relative to the canonical web URL. + |
| 3981 | Tokens in the queries such as `${project}` are resolved. |
David Pursehouse | 8edc199 | 2017-09-15 17:12:09 +0900 | [diff] [blame] | 3982 | |`is_default` |not set if `false`| |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 3983 | Whether this is the default dashboard of the project. |
| 3984 | |`title` |optional|The title of the dashboard. |
| 3985 | |`sections` || |
| 3986 | The list of link:#dashboard-section-info[sections] in the dashboard. |
| 3987 | |=============================== |
| 3988 | |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 3989 | [[dashboard-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3990 | === DashboardInput |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 3991 | The `DashboardInput` entity contains information to create/update a |
| 3992 | project dashboard. |
| 3993 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 3994 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 3995 | |============================= |
| 3996 | |Field Name ||Description |
| 3997 | |`id` |optional| |
Edwin Kempin | c95c508 | 2013-03-12 16:56:25 +0100 | [diff] [blame] | 3998 | 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] | 3999 | |`commit_message`|optional| |
| 4000 | Message that should be used to commit the change of the dashboard. |
| 4001 | |============================= |
| 4002 | |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 4003 | [[dashboard-section-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4004 | === DashboardSectionInfo |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 4005 | The `DashboardSectionInfo` entity contains information about a section |
| 4006 | in a dashboard. |
| 4007 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4008 | [options="header",cols="1,6"] |
Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 4009 | |=========================== |
| 4010 | |Field Name |Description |
| 4011 | |`name` |The title of the section. |
| 4012 | |`query` |The query of the section. + |
| 4013 | Tokens such as `${project}` are not resolved. |
| 4014 | |=========================== |
| 4015 | |
Edwin Kempin | 920f6f8 | 2019-10-28 10:43:13 +0100 | [diff] [blame] | 4016 | [[delete-label-input]] |
| 4017 | === DeleteLabelInput |
| 4018 | The `DeleteLabelInput` entity contains information for deleting a label |
| 4019 | definition in a project. |
| 4020 | |
| 4021 | [options="header",cols="1,^2,4"] |
| 4022 | |============================= |
| 4023 | |Field Name ||Description |
| 4024 | |`commit_message`|optional| |
| 4025 | Message that should be used to commit the deletion of the label in the |
| 4026 | `project.config` file to the `refs/meta/config` branch. |
| 4027 | |============================= |
| 4028 | |
Hugo Arès | ef8e320 | 2015-01-12 15:09:06 -0500 | [diff] [blame] | 4029 | [[delete-branches-input]] |
| 4030 | === DeleteBranchesInput |
| 4031 | The `DeleteBranchesInput` entity contains information about branches that should |
| 4032 | be deleted. |
| 4033 | |
| 4034 | [options="header",width="50%",cols="1,6"] |
| 4035 | |========================== |
| 4036 | |Field Name |Description |
| 4037 | |`branches` |A list of branch names that identify the branches that should be |
| 4038 | deleted. |
| 4039 | |========================== |
| 4040 | |
David Pursehouse | 467aecb | 2016-12-02 14:18:42 +0900 | [diff] [blame] | 4041 | [[delete-tags-input]] |
| 4042 | === DeleteTagsInput |
| 4043 | The `DeleteTagsInput` entity contains information about tags that should |
| 4044 | be deleted. |
| 4045 | |
| 4046 | [options="header",width="50%",cols="1,6"] |
| 4047 | |========================== |
| 4048 | |Field Name |Description |
| 4049 | |`tags` |A list of tag names that identify the tags that should be |
| 4050 | deleted. |
| 4051 | |========================== |
| 4052 | |
Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 4053 | [[gc-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4054 | === GCInput |
Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 4055 | The `GCInput` entity contains information to run the Git garbage |
| 4056 | collection. |
| 4057 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4058 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 4059 | |============================= |
| 4060 | |Field Name ||Description |
| 4061 | |`show_progress` |`false` if not set| |
| 4062 | Whether progress information should be shown. |
Christian Halstrick | 2f94e2e | 2015-03-11 15:13:31 +0100 | [diff] [blame] | 4063 | |`aggressive` |`false` if not set| |
| 4064 | Whether an aggressive garbage collection should be done. |
Adrian Görler | 92410a1 | 2015-11-03 16:20:56 +0100 | [diff] [blame] | 4065 | |`async` |`false` if not set| |
| 4066 | Whether the garbage collection should run asynchronously. |
Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 4067 | |============================= |
| 4068 | |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 4069 | [[head-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4070 | === HeadInput |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 4071 | The `HeadInput` entity contains information for setting `HEAD` for a |
| 4072 | project. |
| 4073 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4074 | [options="header",cols="1,6"] |
Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 4075 | |============================ |
| 4076 | |Field Name |Description |
| 4077 | |`ref` | |
| 4078 | The ref to which `HEAD` should be set, the `refs/heads` prefix can be |
| 4079 | omitted. |
| 4080 | |============================ |
| 4081 | |
Patrick Hiesel | 20d981e | 2018-07-04 09:48:21 +0200 | [diff] [blame] | 4082 | [[index-project-input]] |
| 4083 | === IndexProjectInput |
| 4084 | The `IndexProjectInput` contains parameters for indexing a project. |
| 4085 | |
| 4086 | [options="header",cols="1,^2,4"] |
| 4087 | |================================ |
| 4088 | |Field Name ||Description |
| 4089 | |`index_children` || |
| 4090 | If children should be indexed recursively. |
Patrick Hiesel | 6b7d9b1 | 2018-07-10 14:11:35 +0200 | [diff] [blame] | 4091 | |`async` || |
| 4092 | If projects should be indexed asynchronously. |
Patrick Hiesel | 20d981e | 2018-07-04 09:48:21 +0200 | [diff] [blame] | 4093 | |================================ |
| 4094 | |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 4095 | [[inherited-boolean-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4096 | === InheritedBooleanInfo |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 4097 | A boolean value that can also be inherited. |
| 4098 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4099 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 4100 | |================================ |
| 4101 | |Field Name ||Description |
| 4102 | |`value` || |
| 4103 | The effective boolean value. |
| 4104 | |`configured_value` || |
| 4105 | The configured value, can be `TRUE`, `FALSE` or `INHERITED`. |
| 4106 | |`inherited_value` |optional| |
| 4107 | The boolean value inherited from the parent. + |
| 4108 | Not set if there is no parent. |
| 4109 | |================================ |
| 4110 | |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 4111 | [[label-definition-info]] |
| 4112 | === LabelDefinitionInfo |
Edwin Kempin | 07bd713 | 2019-11-11 13:11:00 +0100 | [diff] [blame] | 4113 | The `LabelDefinitionInfo` entity describes a link:config-labels.html[ |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 4114 | review label]. |
| 4115 | |
| 4116 | [options="header",cols="1,^2,4"] |
| 4117 | |============================= |
| 4118 | |Field Name ||Description |
| 4119 | |`name` || |
| 4120 | The link:config-labels.html#label_name[name] of the label. |
Youssef Elghareeb | 261691a | 2021-11-17 13:01:08 +0100 | [diff] [blame] | 4121 | |`description` |optional| |
| 4122 | The description of the label. |
Edwin Kempin | b527526 | 2019-10-24 16:03:27 +0200 | [diff] [blame] | 4123 | |`project_name` || |
| 4124 | The name of the project in which this label is defined. |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 4125 | |`function` || |
| 4126 | The link:config-labels.html#label_function[function] of the label (can be |
| 4127 | `MaxWithBlock`, `AnyWithBlock`, `MaxNoBlock`, `NoBlock`, `NoOp` and `PatchSetLock`. |
| 4128 | |`values` || |
| 4129 | The link:config-labels.html#label_value[values] of the label as a map of label |
| 4130 | value to value description. The label values are formatted strings, e.g. "+1" |
| 4131 | instead of "1", " 0" instead of "0". |
| 4132 | |`default_value` || |
| 4133 | The link:config-labels.html#label_defaultValue[default value] of the label (as |
| 4134 | integer). |
| 4135 | |`branches` |optional| |
| 4136 | A list of link:config-labels.html#label_branch[branches] for which the label |
| 4137 | applies. A branch can be a ref, a ref pattern or a regular expression. If not |
| 4138 | set, the label applies for all branches. |
| 4139 | |`can_override` |`false` if not set| |
| 4140 | Whether this label can be link:config-labels.html#label_canOverride[overridden] |
| 4141 | by child projects. |
| 4142 | |`copy_any_score`|`false` if not set| |
Sven Selberg | 3dba2fd | 2022-01-05 12:11:40 +0100 | [diff] [blame] | 4143 | *DEPRECATED* Whether link:config-labels.html#label_copyAnyScore[copyAnyScore] |
| 4144 | is set on the label. |
Patrick Hiesel | c429ff3 | 2021-06-01 15:56:30 +0200 | [diff] [blame] | 4145 | |`copy_condition`|optional| |
| 4146 | See link:config-labels.html#label_copyCondition[copyCondition]. |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 4147 | |`copy_min_score`|`false` if not set| |
Sven Selberg | 3dba2fd | 2022-01-05 12:11:40 +0100 | [diff] [blame] | 4148 | *DEPRECATED* Whether link:config-labels.html#label_copyMinScore[copyMinScore] |
| 4149 | is set on the label. |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 4150 | |`copy_max_score`|`false` if not set| |
Sven Selberg | 3dba2fd | 2022-01-05 12:11:40 +0100 | [diff] [blame] | 4151 | *DEPRECATED* Whether link:config-labels.html#label_copyMaxScore[copyMaxScore] |
| 4152 | is set on the label. |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 4153 | |`copy_all_scores_if_no_change`|`false` if not set| |
Sven Selberg | 3dba2fd | 2022-01-05 12:11:40 +0100 | [diff] [blame] | 4154 | *DEPRECATED* Whether link:config-labels.html#label_copyAllScoresIfNoChange[ |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 4155 | copyAllScoresIfNoChange] is set on the label. |
| 4156 | |`copy_all_scores_if_no_code_change`|`false` if not set| |
Sven Selberg | 3dba2fd | 2022-01-05 12:11:40 +0100 | [diff] [blame] | 4157 | *DEPRECATED* Whether link:config-labels.html#label_copyAllScoresIfNoCodeChange[ |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 4158 | copyAllScoresIfNoCodeChange] is set on the label. |
| 4159 | |`copy_all_scores_on_trivial_rebase`|`false` if not set| |
Sven Selberg | 3dba2fd | 2022-01-05 12:11:40 +0100 | [diff] [blame] | 4160 | *DEPRECATED* Whether link:config-labels.html#label_copyAllScoresOnTrivialRebase[ |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 4161 | copyAllScoresOnTrivialRebase] is set on the label. |
Gal Paikin | bef260ec | 2021-01-19 11:55:19 +0100 | [diff] [blame] | 4162 | |`copy_all_scores_if_list_of_files_did_not_change`|`false` if not set| |
Sven Selberg | 3dba2fd | 2022-01-05 12:11:40 +0100 | [diff] [blame] | 4163 | *DEPRECATED* Whether |
| 4164 | link:config-labels.html#label_copyAllScoresIfListOfFilesDidNotChange[ |
Gal Paikin | bef260ec | 2021-01-19 11:55:19 +0100 | [diff] [blame] | 4165 | copyAllScoresIfListOfFilesDidNotChange] is set on the label. |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 4166 | |`copy_all_scores_on_merge_first_parent_update`|`false` if not set| |
Sven Selberg | 3dba2fd | 2022-01-05 12:11:40 +0100 | [diff] [blame] | 4167 | *DEPRECATED* Whether |
| 4168 | link:config-labels.html#label_copyAllScoresOnMergeFirstParentUpdate[ |
Edwin Kempin | 44098d0 | 2019-10-24 09:22:34 +0200 | [diff] [blame] | 4169 | copyAllScoresOnMergeFirstParentUpdate] is set on the label. |
Edwin Kempin | 33c13a4 | 2020-01-10 11:38:06 +0100 | [diff] [blame] | 4170 | |`copy_values` |optional| |
| 4171 | 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] | 4172 | |`allow_post_submit`|`false` if not set| |
| 4173 | Whether link:config-labels.html#label_allowPostSubmit[allowPostSubmit] is set |
| 4174 | on the label. |
| 4175 | |`ignore_self_approval`|`false` if not set| |
| 4176 | Whether link:config-labels.html#label_ignoreSelfApproval[ignoreSelfApproval] is |
| 4177 | set on the label. |
| 4178 | |============================= |
Han-Wen Nienhuys | 22f2774 | 2017-06-27 18:01:07 +0200 | [diff] [blame] | 4179 | |
Edwin Kempin | b5e8745 | 2019-10-25 13:28:46 +0200 | [diff] [blame] | 4180 | [[label-definition-input]] |
| 4181 | === LabelDefinitionInput |
Edwin Kempin | 07bd713 | 2019-11-11 13:11:00 +0100 | [diff] [blame] | 4182 | The `LabelDefinitionInput` entity describes a link:config-labels.html[ |
Edwin Kempin | b5e8745 | 2019-10-25 13:28:46 +0200 | [diff] [blame] | 4183 | review label]. |
| 4184 | |
| 4185 | [options="header",cols="1,^2,4"] |
| 4186 | |============================= |
| 4187 | |Field Name ||Description |
| 4188 | |`commit_message`|optional| |
| 4189 | 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] | 4190 | `project.config` file to the `refs/meta/config` branch.+ |
| 4191 | Must not be set if this `LabelDefinitionInput` entity is contained in a |
| 4192 | link:#batch-label-input[BatchLabelInput] entity. |
Edwin Kempin | b5e8745 | 2019-10-25 13:28:46 +0200 | [diff] [blame] | 4193 | |`name` |optional| |
Edwin Kempin | 83d6d22 | 2019-10-28 13:45:52 +0100 | [diff] [blame] | 4194 | The new link:config-labels.html#label_name[name] of the label.+ |
| 4195 | For label creation the name is required if this `LabelDefinitionInput` entity |
| 4196 | is contained in a link:#batch-label-input[BatchLabelInput] |
| 4197 | entity. |
Youssef Elghareeb | 261691a | 2021-11-17 13:01:08 +0100 | [diff] [blame] | 4198 | |`description` |optional| |
| 4199 | The new description for the label. |
Edwin Kempin | b5e8745 | 2019-10-25 13:28:46 +0200 | [diff] [blame] | 4200 | |`function` |optional| |
| 4201 | The new link:config-labels.html#label_function[function] of the label (can be |
| 4202 | `MaxWithBlock`, `AnyWithBlock`, `MaxNoBlock`, `NoBlock`, `NoOp` and `PatchSetLock`. |
| 4203 | |`values` |optional| |
| 4204 | The new link:config-labels.html#label_value[values] of the label as a map of |
| 4205 | label value to value description. The label values are formatted strings, e.g. |
| 4206 | "+1" instead of "1", " 0" instead of "0". |
| 4207 | |`default_value` |optional| |
| 4208 | The new link:config-labels.html#label_defaultValue[default value] of the label |
| 4209 | (as integer). |
| 4210 | |`branches` |optional| |
| 4211 | The new branches for which the label applies as a list of |
| 4212 | link:config-labels.html#label_branch[branches]. A branch can be a ref, a ref |
| 4213 | pattern or a regular expression. If not set, the label applies for all |
| 4214 | branches. |
| 4215 | |`can_override` |optional| |
| 4216 | Whether this label can be link:config-labels.html#label_canOverride[overridden] |
| 4217 | by child projects. |
| 4218 | |`copy_any_score`|optional| |
| 4219 | Whether link:config-labels.html#label_copyAnyScore[copyAnyScore] is set on the |
| 4220 | label. |
Patrick Hiesel | c429ff3 | 2021-06-01 15:56:30 +0200 | [diff] [blame] | 4221 | |`copy_condition`|optional| |
| 4222 | See link:config-labels.html#label_copyCondition[copyCondition]. |
| 4223 | |`unset_copy_condition`|optional| |
| 4224 | If true, clears the value stored in `copy_condition`. |
Edwin Kempin | b5e8745 | 2019-10-25 13:28:46 +0200 | [diff] [blame] | 4225 | |`copy_min_score`|optional| |
| 4226 | Whether link:config-labels.html#label_copyMinScore[copyMinScore] is set on the |
| 4227 | label. |
| 4228 | |`copy_max_score`|optional| |
| 4229 | Whether link:config-labels.html#label_copyMaxScore[copyMaxScore] is set on the |
| 4230 | label. |
| 4231 | |`copy_all_scores_if_no_change`|optional| |
| 4232 | Whether link:config-labels.html#label_copyAllScoresIfNoChange[ |
| 4233 | copyAllScoresIfNoChange] is set on the label. |
| 4234 | |`copy_all_scores_if_no_code_change`|optional| |
| 4235 | Whether link:config-labels.html#label_copyAllScoresIfNoCodeChange[ |
| 4236 | copyAllScoresIfNoCodeChange] is set on the label. |
| 4237 | |`copy_all_scores_on_trivial_rebase`|optional| |
| 4238 | Whether link:config-labels.html#label_copyAllScoresOnTrivialRebase[ |
| 4239 | copyAllScoresOnTrivialRebase] is set on the label. |
Gal Paikin | bef260ec | 2021-01-19 11:55:19 +0100 | [diff] [blame] | 4240 | |`copy_all_scores_if_list_of_files_did_not_change`|optional| |
| 4241 | Whether link:config-labels.html#label_copyAllScoresIfListOfFilesDidNotChange[ |
| 4242 | copyAllScoresIfListOfFilesDidNotChange] is set on the label. |
Edwin Kempin | b5e8745 | 2019-10-25 13:28:46 +0200 | [diff] [blame] | 4243 | |`copy_all_scores_on_merge_first_parent_update`|optional| |
| 4244 | Whether link:config-labels.html#label_copyAllScoresOnMergeFirstParentUpdate[ |
| 4245 | copyAllScoresOnMergeFirstParentUpdate] is set on the label. |
Edwin Kempin | 33c13a4 | 2020-01-10 11:38:06 +0100 | [diff] [blame] | 4246 | |`copy_values` |optional| |
| 4247 | 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] | 4248 | |`allow_post_submit`|optional| |
| 4249 | Whether link:config-labels.html#label_allowPostSubmit[allowPostSubmit] is set |
| 4250 | on the label. |
| 4251 | |`ignore_self_approval`|optional| |
| 4252 | Whether link:config-labels.html#label_ignoreSelfApproval[ignoreSelfApproval] is |
| 4253 | set on the label. |
| 4254 | |============================= |
| 4255 | |
Han-Wen Nienhuys | 22f2774 | 2017-06-27 18:01:07 +0200 | [diff] [blame] | 4256 | [[label-type-info]] |
| 4257 | === LabelTypeInfo |
| 4258 | The `LabelTypeInfo` entity contains metadata about the labels that a |
| 4259 | project has. |
| 4260 | |
| 4261 | [options="header",cols="1,^2,4"] |
| 4262 | |================================ |
| 4263 | |Field Name ||Description |
| 4264 | |`values` ||Map of the available values to their description. |
| 4265 | |`default_value` ||The default value of this label. |
| 4266 | |================================ |
| 4267 | |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 4268 | [[max-object-size-limit-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4269 | === MaxObjectSizeLimitInfo |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 4270 | The `MaxObjectSizeLimitInfo` entity contains information about the |
| 4271 | link:config-gerrit.html#receive.maxObjectSizeLimit[max object size |
| 4272 | limit] of a project. |
| 4273 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4274 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 4275 | |=============================== |
| 4276 | |Field Name ||Description |
| 4277 | |`value` |optional| |
David Pursehouse | 33f544a | 2018-08-20 12:20:18 +0900 | [diff] [blame] | 4278 | The effective value in bytes of the max object size limit. + |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 4279 | Not set if there is no limit for the object size. |
| 4280 | |`configured_value`|optional| |
| 4281 | The max object size limit that is configured on the project as a |
| 4282 | formatted string. + |
| 4283 | Not set if there is no limit for the object size configured on project |
| 4284 | level. |
David Pursehouse | 81f2b5c | 2018-08-23 14:44:14 +0900 | [diff] [blame] | 4285 | |`summary` |optional| |
| 4286 | A string describing whether the value was inherited or overridden from |
| 4287 | the parent project or global config. + |
| 4288 | Not set if not inherited or overridden. |
Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 4289 | |=============================== |
| 4290 | |
Edwin Kempin | 83d6d22 | 2019-10-28 13:45:52 +0100 | [diff] [blame] | 4291 | [[batch-label-input]] |
| 4292 | === BatchLabelInput |
| 4293 | The `BatchLabelInput` entity contains information for batch updating label |
| 4294 | definitions in a project. |
| 4295 | |
| 4296 | [options="header",cols="1,^2,4"] |
| 4297 | |============================= |
| 4298 | |Field Name ||Description |
| 4299 | |`commit_message`|optional| |
| 4300 | Message that should be used to commit the label updates in the |
| 4301 | `project.config` file to the `refs/meta/config` branch. |
| 4302 | |`delete` |optional| |
| 4303 | List of labels that should be deleted. |
| 4304 | |`create` |optional| |
| 4305 | List of link:#label-definition-input[LabelDefinitionInput] entities that |
| 4306 | describe labels that should be created. |
| 4307 | |`update` |optional| |
| 4308 | Map of label names to link:#label-definition-input[LabelDefinitionInput] |
| 4309 | entities that describe the updates that should be done for the labels. |
| 4310 | |============================= |
| 4311 | |
Patrick Hiesel | 21816f1 | 2016-04-22 08:53:06 +0200 | [diff] [blame] | 4312 | [[project-access-input]] |
| 4313 | === ProjectAccessInput |
| 4314 | The `ProjectAccessInput` describes changes that should be applied to a project |
| 4315 | access config. |
| 4316 | |
| 4317 | [options="header",cols="1,^2,4"] |
| 4318 | |============================= |
| 4319 | |Field Name | |Description |
| 4320 | |`remove` |optional| |
| 4321 | A list of deductions to be applied to the project access as |
| 4322 | link:rest-api-access.html#project-access-info[ProjectAccessInfo] entities. |
| 4323 | |`add` |optional| |
| 4324 | A list of additions to be applied to the project access as |
| 4325 | link:rest-api-access.html#project-access-info[ProjectAccessInfo] entities. |
| 4326 | |`message` |optional| |
| 4327 | A commit message for this change. |
| 4328 | |`parent` |optional| |
| 4329 | A new parent for the project to inherit from. Changing the parent project |
| 4330 | requires administrative privileges. |
| 4331 | |============================= |
| 4332 | |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 4333 | [[project-description-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4334 | === ProjectDescriptionInput |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 4335 | The `ProjectDescriptionInput` entity contains information for setting a |
| 4336 | project description. |
| 4337 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4338 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 4339 | |============================= |
| 4340 | |Field Name ||Description |
| 4341 | |`description` |optional|The project description. + |
| 4342 | The project description will be deleted if not set. |
| 4343 | |`commit_message`|optional| |
| 4344 | Message that should be used to commit the change of the project |
| 4345 | description in the `project.config` file to the `refs/meta/config` |
| 4346 | branch. |
| 4347 | |============================= |
| 4348 | |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 4349 | [[project-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4350 | === ProjectInfo |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 4351 | The `ProjectInfo` entity contains information about a project. |
| 4352 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4353 | [options="header",cols="1,^2,4"] |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 4354 | |=========================== |
| 4355 | |Field Name ||Description |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 4356 | |`id` ||The URL encoded project name. |
| 4357 | |`name` | |
| 4358 | not set if returned in a map where the project name is used as map key| |
| 4359 | The name of the project. |
Edwin Kempin | f361182 | 2013-03-19 08:23:09 +0100 | [diff] [blame] | 4360 | |`parent` |optional| |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 4361 | The name of the parent project. + |
| 4362 | `?-<n>` if the parent project is not visible (`<n>` is a number which |
| 4363 | is increased for each non-visible project). |
| 4364 | |`description` |optional|The description of the project. |
Shawn Pearce | 21a6c21 | 2014-04-23 12:35:10 -0700 | [diff] [blame] | 4365 | |`state` |optional|`ACTIVE`, `READ_ONLY` or `HIDDEN`. |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 4366 | |`branches` |optional|Map of branch names to HEAD revisions. |
Han-Wen Nienhuys | 22f2774 | 2017-06-27 18:01:07 +0200 | [diff] [blame] | 4367 | |`labels` |optional| |
| 4368 | Map of label names to |
| 4369 | link:#label-type-info[LabelTypeInfo] entries. |
| 4370 | This field is filled for link:#create-project[Create Project] and |
| 4371 | link:#get-project[Get Project] calls. |
Edwin Kempin | 26c95a4 | 2014-11-25 16:29:47 +0100 | [diff] [blame] | 4372 | |`web_links` |optional| |
Edwin Kempin | ea00475 | 2014-04-11 15:56:02 +0200 | [diff] [blame] | 4373 | Links to the project in external sites as a list of |
| 4374 | link:rest-api-changes.html#web-link-info[WebLinkInfo] entries. |
Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 4375 | |=========================== |
| 4376 | |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4377 | [[project-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4378 | === ProjectInput |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4379 | The `ProjectInput` entity contains information for the creation of |
| 4380 | a new project. |
| 4381 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4382 | [options="header",cols="1,^2,4"] |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4383 | |========================================= |
| 4384 | |Field Name ||Description |
| 4385 | |`name` |optional| |
| 4386 | The name of the project (not encoded). + |
David Pursehouse | 8c5ad41 | 2015-02-03 14:19:09 +0900 | [diff] [blame] | 4387 | If set, must match the project name in the URL. + |
| 4388 | If name ends with `.git` the suffix will be automatically removed. |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4389 | |`parent` |optional| |
| 4390 | The name of the parent project. + |
| 4391 | If not set, the `All-Projects` project will be the parent project. |
| 4392 | |`description` |optional|The description of the project. |
| 4393 | |`permissions_only` |`false` if not set| |
| 4394 | Whether a permission-only project should be created. |
| 4395 | |`create_empty_commit` |`false` if not set| |
| 4396 | Whether an empty initial commit should be created. |
| 4397 | |`submit_type` |optional| |
| 4398 | The submit type that should be set for the project |
Gert van Dijk | a4e49d0 | 2017-08-27 22:50:40 +0200 | [diff] [blame] | 4399 | (`MERGE_IF_NECESSARY`, `REBASE_IF_NECESSARY`, `REBASE_ALWAYS`, |
| 4400 | `FAST_FORWARD_ONLY`, `MERGE_ALWAYS`, `CHERRY_PICK`). + |
Edwin Kempin | a79ea55 | 2013-11-19 11:24:37 +0100 | [diff] [blame] | 4401 | If not set, `MERGE_IF_NECESSARY` is set as submit type unless |
| 4402 | link:config-gerrit.html#repository.name.defaultSubmitType[ |
| 4403 | repository.<name>.defaultSubmitType] is set to a different value. |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4404 | |`branches` |optional| |
| 4405 | A list of branches that should be initially created. + |
Han-Wen Nienhuys | 5a0f5cb | 2020-11-24 19:13:55 +0100 | [diff] [blame] | 4406 | For the branch names the `refs/heads/` prefix can be omitted. + |
Marija Savtchouk | 714fbff | 2021-03-12 16:02:12 +0000 | [diff] [blame] | 4407 | The first entry of the list will be the |
| 4408 | link:project-configuration.html#default-branch[default branch]. + |
| 4409 | If the list is empty, link:config-gerrit.html#gerrit.defaultBranch[host-level default] |
| 4410 | is used. + |
Youssef Elghareeb | 5b94461 | 2021-02-17 14:50:12 +0100 | [diff] [blame] | 4411 | Branches in the Gerrit internal ref space are not allowed, such as |
| 4412 | refs/groups/, refs/changes/, etc... |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4413 | |`owners` |optional| |
| 4414 | A list of groups that should be assigned as project owner. + |
| 4415 | Each group in the list must be specified as |
| 4416 | link:rest-api-groups.html#group-id[group-id]. + |
| 4417 | If not set, the link:config-gerrit.html#repository.name.ownerGroup[ |
| 4418 | groups that are configured as default owners] are set as project |
| 4419 | owners. |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 4420 | |`use_contributor_agreements` |`INHERIT` if not set| |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4421 | Whether contributor agreements should be used for the project (`TRUE`, |
| 4422 | `FALSE`, `INHERIT`). |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 4423 | |`use_signed_off_by` |`INHERIT` if not set| |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4424 | Whether the usage of 'Signed-Off-By' footers is required for the |
| 4425 | project (`TRUE`, `FALSE`, `INHERIT`). |
Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 4426 | |`create_new_change_for_all_not_in_target` |`INHERIT` if not set| |
| 4427 | Whether a new change is created for every commit not in target branch |
| 4428 | for the project (`TRUE`, `FALSE`, `INHERIT`). |
| 4429 | |`use_content_merge` |`INHERIT` if not set| |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4430 | Whether content merge should be enabled for the project (`TRUE`, |
| 4431 | `FALSE`, `INHERIT`). + |
| 4432 | `FALSE`, if the `submit_type` is `FAST_FORWARD_ONLY`. |
Han-Wen Nienhuys | cdde7a30 | 2019-07-24 12:19:16 +0200 | [diff] [blame] | 4433 | |`require_change_id` |`INHERIT` if not set| |
| 4434 | Whether the usage of Change-Ids is required for the project (`TRUE`, |
| 4435 | `FALSE`, `INHERIT`). |
| 4436 | This property is deprecated and will be removed in |
| 4437 | a future release. |
David Ostrovsky | 1c6ff2e | 2018-09-18 07:52:51 +0200 | [diff] [blame] | 4438 | |`enable_signed_push` |`INHERIT` if not set| |
| 4439 | Whether signed push validation is enabled on the project (`TRUE`, |
| 4440 | `FALSE`, `INHERIT`). |
| 4441 | |`require_signed_push` |`INHERIT` if not set| |
| 4442 | Whether signed push validation is required on the project (`TRUE`, |
| 4443 | `FALSE`, `INHERIT`). |
Sasa Zivkov | 6b40cb4 | 2013-07-01 15:28:22 +0200 | [diff] [blame] | 4444 | |`max_object_size_limit` |optional| |
| 4445 | Max allowed Git object size for this project. |
| 4446 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
Edwin Kempin | fb053c3 | 2013-12-04 20:32:41 +0100 | [diff] [blame] | 4447 | |`plugin_config_values` |optional| |
| 4448 | Plugin configuration values as map which maps the plugin name to a map |
| 4449 | of parameter names to values. |
Patrick Hiesel | dc285c7 | 2018-01-08 17:20:15 +0100 | [diff] [blame] | 4450 | |`reject_empty_commit` |optional| |
| 4451 | Whether empty commits should be rejected when a change is merged |
| 4452 | (`TRUE`, `FALSE`, `INHERIT`). |
Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 4453 | |========================================= |
| 4454 | |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 4455 | [[project-parent-input]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4456 | === ProjectParentInput |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 4457 | The `ProjectParentInput` entity contains information for setting a |
| 4458 | project parent. |
| 4459 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4460 | [options="header",cols="1,^2,4"] |
Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 4461 | |============================= |
| 4462 | |Field Name ||Description |
| 4463 | |`parent` ||The name of the parent project. |
| 4464 | |`commit_message`|optional| |
| 4465 | Message that should be used to commit the change of the project parent |
| 4466 | in the `project.config` file to the `refs/meta/config` branch. |
| 4467 | |============================= |
| 4468 | |
Edwin Kempin | 87504d9 | 2014-07-04 12:59:19 +0200 | [diff] [blame] | 4469 | [[reflog-entry-info]] |
| 4470 | === ReflogEntryInfo |
| 4471 | The `ReflogEntryInfo` entity describes an entry in a reflog. |
| 4472 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4473 | [options="header",cols="1,6"] |
Edwin Kempin | 87504d9 | 2014-07-04 12:59:19 +0200 | [diff] [blame] | 4474 | |============================ |
| 4475 | |Field Name |Description |
| 4476 | |`old_id` |The old commit ID. |
| 4477 | |`new_id` |The new commit ID. |
| 4478 | |`who` | |
| 4479 | The user performing the change as a |
| 4480 | link:rest-api-changes.html#git-person-info[GitPersonInfo] entity. |
| 4481 | |`comment` |Comment of the reflog entry. |
| 4482 | |============================ |
| 4483 | |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 4484 | [[repository-statistics-info]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 4485 | === RepositoryStatisticsInfo |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 4486 | The `RepositoryStatisticsInfo` entity contains information about |
| 4487 | statistics of a Git repository. |
| 4488 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4489 | [options="header",cols="1,6"] |
Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 4490 | |====================================== |
| 4491 | |Field Name |Description |
| 4492 | |`number_of_loose_objects` |Number of loose objects. |
| 4493 | |`number_of_loose_refs` |Number of loose refs. |
| 4494 | |`number_of_pack_files` |Number of pack files. |
| 4495 | |`number_of_packed_objects`|Number of packed objects. |
| 4496 | |`number_of_packed_refs` |Number of packed refs. |
| 4497 | |`size_of_loose_objects` |Size of loose objects in bytes. |
| 4498 | |`size_of_packed_objects` |Size of packed objects in bytes. |
| 4499 | |====================================== |
| 4500 | |
Youssef Elghareeb | 859b052 | 2021-05-21 00:34:59 +0200 | [diff] [blame^] | 4501 | [[submit-requirement-info]] |
| 4502 | === SubmitRequirementInfo |
| 4503 | The `SubmitRequirementInfo` entity describes a submit requirement. |
| 4504 | |
| 4505 | [options="header",cols="1,^1,5"] |
| 4506 | |=========================== |
| 4507 | |Field Name ||Description |
| 4508 | |`name`|| |
| 4509 | The submit requirement name. |
| 4510 | |`description`|optional| |
| 4511 | Description of the submit requirement. |
| 4512 | |`applicability_expression`|optional| |
| 4513 | Query expression that can be evaluated on any change. If evaluated to true on a |
| 4514 | change, the submit requirement is then applicable for this change. |
| 4515 | If not specified, the submit requirement is applicable for all changes. |
| 4516 | |`submittability_expression`|| |
| 4517 | Query expression that can be evaluated on any change. If evaluated to true on a |
| 4518 | change, the submit requirement is fulfilled and not blocking change submission. |
| 4519 | |`override_expression`|optional| |
| 4520 | Query expression that can be evaluated on any change. If evaluated to true on a |
| 4521 | change, the submit requirement is overridden and not blocking change submission. |
| 4522 | |`allow_override_in_child_projects`|| |
| 4523 | Whether this submit requirement can be overridden in child projects. |
| 4524 | |=========================== |
| 4525 | |
| 4526 | [[submit-requirement-input]] |
| 4527 | === SubmitRequirementInput |
| 4528 | The `SubmitRequirementInput` entity describes a submit requirement. |
| 4529 | |
| 4530 | [options="header",cols="1,^1,5"] |
| 4531 | |=========================== |
| 4532 | |Field Name ||Description |
| 4533 | |`name`|| |
| 4534 | The submit requirement name. |
| 4535 | |`description`|optional| |
| 4536 | Description of the submit requirement. |
| 4537 | |`applicability_expression`|optional| |
| 4538 | Query expression that can be evaluated on any change. If evaluated to true on a |
| 4539 | change, the submit requirement is then applicable for this change. |
| 4540 | If not specified, the submit requirement is applicable for all changes. |
| 4541 | |`submittability_expression`|| |
| 4542 | Query expression that can be evaluated on any change. If evaluated to true on a |
| 4543 | change, the submit requirement is fulfilled and not blocking change submission. |
| 4544 | |`override_expression`|optional| |
| 4545 | Query expression that can be evaluated on any change. If evaluated to true on a |
| 4546 | change, the submit requirement is overridden and not blocking change submission. |
| 4547 | |`allow_override_in_child_projects`|optional| |
| 4548 | Whether this submit requirement can be overridden in child projects. Default is |
| 4549 | `false`. |
| 4550 | |=========================== |
| 4551 | |
Dave Borowitz | c8f8d2e | 2017-10-23 11:18:23 -0400 | [diff] [blame] | 4552 | [[submit-type-info]] |
| 4553 | === SubmitTypeInfo |
Changcheng Xiao | 2188598 | 2019-01-15 18:16:51 +0100 | [diff] [blame] | 4554 | Information about the link:config-project-config.html#submit-type[default submit |
Dave Borowitz | c8f8d2e | 2017-10-23 11:18:23 -0400 | [diff] [blame] | 4555 | type of a project], taking into account project inheritance. |
| 4556 | |
| 4557 | Valid values for each field are `MERGE_IF_NECESSARY`, `FAST_FORWARD_ONLY`, |
| 4558 | `REBASE_IF_NECESSARY`, `REBASE_ALWAYS`, `MERGE_ALWAYS` or `CHERRY_PICK`, plus |
| 4559 | `INHERIT` where applicable. |
| 4560 | |
| 4561 | [options="header",cols="1,6"] |
| 4562 | |=============================== |
| 4563 | |Field Name |Description |
| 4564 | |`value` | |
| 4565 | The effective submit type value. Never `INHERIT`. |
| 4566 | |`configured_value` | |
| 4567 | The configured value, can be one of the submit types, or `INHERIT` to inherit |
| 4568 | from the parent project. |
| 4569 | |`inherited_value` | |
| 4570 | The effective value that would be inherited from the parent. Never `INHERIT`. |
| 4571 | |=============================== |
| 4572 | |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 4573 | [[tag-info]] |
| 4574 | === TagInfo |
| 4575 | The `TagInfo` entity contains information about a tag. |
| 4576 | |
David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 4577 | [options="header",cols="1,^2,4"] |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 4578 | |========================= |
| 4579 | |Field Name ||Description |
| 4580 | |`ref` ||The ref of the tag. |
| 4581 | |`revision` ||For lightweight tags, the revision of the commit to which the tag |
| 4582 | points. For annotated tags, the revision of the tag object. |
| 4583 | |`object`|Only set for annotated tags.|The revision of the object to which the |
| 4584 | tag points. |
| 4585 | |`message`|Only set for annotated tags.|The tag message. For signed tags, includes |
| 4586 | the signature. |
David Pursehouse | c9f5a5a | 2015-12-07 19:13:16 +0900 | [diff] [blame] | 4587 | |`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] | 4588 | link:rest-api-changes.html#git-person-info[GitPersonInfo] entity. |
David Pursehouse | c4e4d93 | 2017-11-10 10:17:46 +0900 | [diff] [blame] | 4589 | |`created`|optional|The link:rest-api.html#timestamp[timestamp] of when the tag |
| 4590 | was created. For annotated and signed tags, this is the timestamp of the tag object |
| 4591 | and is the same as the `date` field in the `tagger`. For lightweight tags, it is |
| 4592 | the commit timestamp of the commit to which the tag points, when the object is a |
| 4593 | commit. It is not set when the object is any other type. |
David Pursehouse | d00515e | 2017-11-10 15:57:41 +0900 | [diff] [blame] | 4594 | |`can_delete`|not set if `false`| |
David Pursehouse | 23669da | 2017-02-23 13:43:57 +0900 | [diff] [blame] | 4595 | Whether the calling user can delete this tag. |
Paladox none | 34da15c | 2017-07-01 14:49:10 +0000 | [diff] [blame] | 4596 | |`web_links` |optional| |
| 4597 | Links to the tag in external sites as a list of |
| 4598 | link:rest-api-changes.html#web-link-info[WebLinkInfo] entries. |
David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 4599 | |========================= |
| 4600 | |
David Pursehouse | 6a44619 | 2016-06-03 10:00:34 +0900 | [diff] [blame] | 4601 | [[tag-input]] |
| 4602 | === TagInput |
| 4603 | |
| 4604 | The `TagInput` entity contains information for creating a tag. |
| 4605 | |
| 4606 | [options="header",cols="1,^2,4"] |
| 4607 | |========================= |
| 4608 | |Field Name ||Description |
| 4609 | |`ref` ||The name of the tag. The leading `refs/tags/` is optional. |
| 4610 | |`revision` |optional|The revision to which the tag should point. If not |
| 4611 | specified, the project's `HEAD` will be used. |
| 4612 | |`message` |optional|The tag message. When set, the tag will be created |
| 4613 | as an annotated tag. |
| 4614 | |========================= |
| 4615 | |
| 4616 | |
Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 4617 | GERRIT |
| 4618 | ------ |
| 4619 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 4620 | |
| 4621 | SEARCHBOX |
| 4622 | --------- |