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