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