| 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", |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 734 | "require_change_id": "TRUE", |
| 735 | "max_object_size_limit": "10m", |
| 736 | "submit_type": "REBASE_IF_NECESSARY", |
| 737 | "state": "ACTIVE" |
| 738 | } |
| 739 | ---- |
| 740 | |
| 741 | As response the new configuration is returned as a link:#config-info[ |
| 742 | ConfigInfo] entity. |
| 743 | |
| 744 | .Response |
| 745 | ---- |
| 746 | HTTP/1.1 200 OK |
| 747 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 748 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 749 | |
| 750 | )]}' |
| 751 | { |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 752 | "use_contributor_agreements": { |
| 753 | "value": false, |
| 754 | "configured_value": "FALSE", |
| 755 | "inherited_value": false |
| 756 | }, |
| 757 | "use_content_merge": { |
| 758 | "value": true, |
| 759 | "configured_value": "INHERIT", |
| 760 | "inherited_value": true |
| 761 | }, |
| 762 | "use_signed_off_by": { |
| 763 | "value": false, |
| 764 | "configured_value": "INHERIT", |
| 765 | "inherited_value": false |
| 766 | }, |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 767 | "create_new_change_for_all_not_in_target": { |
| 768 | "value": true, |
| 769 | "configured_value": "INHERIT", |
| 770 | "inherited_value": false |
| 771 | }, |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 772 | "require_change_id": { |
| 773 | "value": true, |
| 774 | "configured_value": "TRUE", |
| 775 | "inherited_value": true |
| 776 | }, |
| 777 | "max_object_size_limit": { |
| 778 | "value": "10m", |
| 779 | "configured_value": "10m", |
| 780 | "inherited_value": "20m" |
| 781 | }, |
| 782 | "submit_type": "REBASE_IF_NECESSARY", |
| 783 | "state": "ACTIVE", |
| 784 | "commentlinks": {} |
| 785 | } |
| 786 | ---- |
| 787 | |
| Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 788 | [[run-gc]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 789 | === Run GC |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 790 | -- |
| Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 791 | 'POST /projects/link:#project-name[\{project-name\}]/gc' |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 792 | -- |
| Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 793 | |
| 794 | Run the Git garbage collection for the repository of a project. |
| 795 | |
| Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 796 | Options for the Git garbage collection can be specified in the |
| 797 | request body as a link:#gc-input[GCInput] entity. |
| 798 | |
| Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 799 | .Request |
| 800 | ---- |
| 801 | POST /projects/plugins%2Freplication/gc HTTP/1.0 |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 802 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 803 | |
| 804 | { |
| 805 | "show_progress": true |
| 806 | } |
| Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 807 | ---- |
| 808 | |
| 809 | The response is the streamed output of the garbage collection. |
| 810 | |
| 811 | .Response |
| 812 | ---- |
| 813 | HTTP/1.1 200 OK |
| 814 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 815 | Content-Type: text/plain; charset=UTF-8 |
| Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 816 | |
| 817 | collecting garbage for "plugins/replication": |
| 818 | Pack refs: 100% (21/21) |
| 819 | Counting objects: 20 |
| 820 | Finding sources: 100% (20/20) |
| 821 | Getting sizes: 100% (13/13) |
| 822 | Compressing objects: 83% (5/6) |
| 823 | Writing objects: 100% (20/20) |
| 824 | Selecting commits: 100% (7/7) |
| 825 | Building bitmaps: 100% (7/7) |
| 826 | Finding sources: 100% (41/41) |
| 827 | Getting sizes: 100% (25/25) |
| 828 | Compressing objects: 52% (12/23) |
| 829 | Writing objects: 100% (41/41) |
| 830 | Prune loose objects also found in pack files: 100% (36/36) |
| 831 | Prune loose, unreferenced objects: 100% (36/36) |
| 832 | done. |
| 833 | ---- |
| 834 | |
| Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 835 | [[ban-commit]] |
| 836 | === Ban Commit |
| 837 | -- |
| 838 | 'PUT /projects/link:#project-name[\{project-name\}]/ban' |
| 839 | -- |
| 840 | |
| 841 | Marks commits as banned for the project. If a commit is banned Gerrit |
| 842 | rejects every push that includes this commit with |
| 843 | link:error-contains-banned-commit.html[contains banned commit ...]. |
| 844 | |
| 845 | [NOTE] |
| 846 | This REST endpoint only marks the commits as banned, but it does not |
| 847 | remove the commits from the history of any central branch. This needs |
| 848 | to be done manually. |
| 849 | |
| 850 | The commits to be banned must be specified in the request body as a |
| 851 | link:#ban-input[BanInput] entity. |
| 852 | |
| 853 | The caller must be project owner. |
| 854 | |
| 855 | .Request |
| 856 | ---- |
| 857 | PUT /projects/plugins%2Freplication/ban HTTP/1.0 |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 858 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 859 | |
| 860 | { |
| 861 | "commits": [ |
| 862 | "a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96", |
| 863 | "cf5b56541f84b8b57e16810b18daca9c3adc377b" |
| 864 | ], |
| 865 | "reason": "Violates IP" |
| 866 | } |
| 867 | ---- |
| 868 | |
| 869 | As response a link:#ban-result-info[BanResultInfo] entity is returned. |
| 870 | |
| 871 | .Response |
| 872 | ---- |
| 873 | HTTP/1.1 200 OK |
| 874 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 875 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 876 | |
| 877 | )]}' |
| 878 | { |
| 879 | "newly_banned": [ |
| 880 | "a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96", |
| 881 | "cf5b56541f84b8b57e16810b18daca9c3adc377b" |
| 882 | ] |
| 883 | } |
| 884 | ---- |
| 885 | |
| Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 886 | [[branch-endpoints]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 887 | == Branch Endpoints |
| Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 888 | |
| 889 | [[list-branches]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 890 | === List Branches |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 891 | -- |
| Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 892 | 'GET /projects/link:#project-name[\{project-name\}]/branches/' |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 893 | -- |
| Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 894 | |
| 895 | List the branches of a project. |
| 896 | |
| 897 | As result a list of link:#branch-info[BranchInfo] entries is |
| 898 | returned. |
| 899 | |
| 900 | .Request |
| 901 | ---- |
| 902 | GET /projects/work%2Fmy-project/branches/ HTTP/1.0 |
| 903 | ---- |
| 904 | |
| 905 | .Response |
| 906 | ---- |
| 907 | HTTP/1.1 200 OK |
| 908 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 909 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 910 | |
| 911 | )]}' |
| 912 | [ |
| 913 | { |
| 914 | "ref": "HEAD", |
| 915 | "revision": "master" |
| 916 | }, |
| 917 | { |
| 918 | "ref": "refs/meta/config", |
| 919 | "revision": "76016386a0d8ecc7b6be212424978bb45959d668" |
| 920 | }, |
| 921 | { |
| 922 | "ref": "refs/heads/master", |
| 923 | "revision": "67ebf73496383c6777035e374d2d664009e2aa5c" |
| 924 | }, |
| 925 | { |
| 926 | "ref": "refs/heads/stable", |
| 927 | "revision": "64ca533bd0eb5252d2fee83f63da67caae9b4674", |
| 928 | "can_delete": true |
| 929 | } |
| 930 | ] |
| 931 | ---- |
| 932 | |
| Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 933 | [[branch-options]] |
| 934 | ==== Branch Options |
| 935 | |
| Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 936 | Limit(n):: |
| 937 | Limit the number of branches to be included in the results. |
| 938 | + |
| 939 | .Request |
| 940 | ---- |
| 941 | GET /projects/testproject/branches?n=1 HTTP/1.0 |
| 942 | ---- |
| 943 | + |
| 944 | .Response |
| 945 | ---- |
| 946 | HTTP/1.1 200 OK |
| 947 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 948 | Content-Type: application/json; charset=UTF-8 |
| Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 949 | |
| 950 | )]}' |
| 951 | [ |
| 952 | { |
| 953 | "ref": "HEAD", |
| 954 | "revision": "master", |
| 955 | "can_delete": false |
| 956 | } |
| 957 | ] |
| 958 | ---- |
| 959 | |
| 960 | Skip(s):: |
| 961 | Skip the given number of branches from the beginning of the list. |
| 962 | + |
| 963 | .Request |
| 964 | ---- |
| 965 | GET /projects/testproject/branches?n=1&s=0 HTTP/1.0 |
| 966 | ---- |
| 967 | + |
| 968 | .Response |
| 969 | ---- |
| 970 | HTTP/1.1 200 OK |
| 971 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 972 | Content-Type: application/json; charset=UTF-8 |
| Hugo Arès | 1585662 | 2014-10-14 14:19:01 -0400 | [diff] [blame] | 973 | |
| 974 | )]}' |
| 975 | [ |
| 976 | { |
| 977 | "ref": "HEAD", |
| 978 | "revision": "master", |
| 979 | "can_delete": false |
| 980 | } |
| 981 | ] |
| 982 | ---- |
| 983 | |
| Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 984 | Substring(m):: |
| 985 | Limit the results to those projects that match the specified substring. |
| 986 | + |
| 987 | List all projects that match substring `test`: |
| 988 | + |
| 989 | .Request |
| 990 | ---- |
| 991 | GET /projects/testproject/branches?m=test HTTP/1.0 |
| 992 | ---- |
| 993 | + |
| 994 | .Response |
| 995 | ---- |
| 996 | HTTP/1.1 200 OK |
| 997 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 998 | Content-Type: application/json; charset=UTF-8 |
| Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 999 | |
| 1000 | )]}' |
| 1001 | [ |
| 1002 | { |
| 1003 | "ref": "refs/heads/test1", |
| 1004 | "revision": "9c9d08a438e55e52f33b608415e6dddd9b18550d", |
| 1005 | "can_delete": true |
| 1006 | } |
| 1007 | ] |
| 1008 | ---- |
| 1009 | |
| 1010 | Regex(r):: |
| 1011 | Limit the results to those branches that match the specified regex. |
| 1012 | Boundary matchers '^' and '$' are implicit. For example: the regex 't*' will |
| 1013 | match any branches that start with 'test' and regex '*t' will match any |
| 1014 | branches that end with 'test'. |
| 1015 | + |
| 1016 | List all branches that match regex `t.*1`: |
| 1017 | + |
| 1018 | .Request |
| 1019 | ---- |
| 1020 | GET /projects/testproject/branches?r=t.*1 HTTP/1.0 |
| 1021 | ---- |
| 1022 | + |
| 1023 | .Response |
| 1024 | ---- |
| 1025 | HTTP/1.1 200 OK |
| 1026 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1027 | Content-Type: application/json; charset=UTF-8 |
| Hugo Arès | 3133b4b | 2014-10-14 14:05:10 -0400 | [diff] [blame] | 1028 | |
| 1029 | )]}' |
| 1030 | [ |
| 1031 | { |
| 1032 | "ref": "refs/heads/test1", |
| 1033 | "revision": "9c9d08a438e55e52f33b608415e6dddd9b18550d", |
| 1034 | "can_delete": true |
| 1035 | } |
| 1036 | ] |
| 1037 | ---- |
| 1038 | |
| Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1039 | [[get-branch]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1040 | === Get Branch |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1041 | -- |
| Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1042 | '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] | 1043 | -- |
| Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1044 | |
| 1045 | Retrieves a branch of a project. |
| 1046 | |
| 1047 | .Request |
| 1048 | ---- |
| 1049 | GET /projects/work%2Fmy-project/branches/master HTTP/1.0 |
| 1050 | ---- |
| 1051 | |
| 1052 | As response a link:#branch-info[BranchInfo] entity is returned that |
| 1053 | describes the branch. |
| 1054 | |
| 1055 | .Response |
| 1056 | ---- |
| 1057 | HTTP/1.1 200 OK |
| 1058 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1059 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1060 | |
| 1061 | )]}' |
| 1062 | { |
| 1063 | "ref": "refs/heads/master", |
| 1064 | "revision": "67ebf73496383c6777035e374d2d664009e2aa5c" |
| 1065 | } |
| 1066 | ---- |
| 1067 | |
| Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1068 | [[create-branch]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1069 | === Create Branch |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1070 | -- |
| Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1071 | '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] | 1072 | -- |
| Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1073 | |
| 1074 | Creates a new branch. |
| 1075 | |
| 1076 | In the request body additional data for the branch can be provided as |
| 1077 | link:#branch-input[BranchInput]. |
| 1078 | |
| 1079 | .Request |
| 1080 | ---- |
| 1081 | PUT /projects/MyProject/branches/stable HTTP/1.0 |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1082 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1083 | |
| 1084 | { |
| 1085 | "revision": "76016386a0d8ecc7b6be212424978bb45959d668" |
| 1086 | } |
| 1087 | ---- |
| 1088 | |
| 1089 | As response a link:#branch-info[BranchInfo] entity is returned that |
| 1090 | describes the created branch. |
| 1091 | |
| 1092 | .Response |
| 1093 | ---- |
| 1094 | HTTP/1.1 201 Created |
| 1095 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1096 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1097 | |
| 1098 | )]}' |
| 1099 | { |
| 1100 | "ref": "refs/heads/stable", |
| 1101 | "revision": "76016386a0d8ecc7b6be212424978bb45959d668", |
| 1102 | "can_delete": true |
| 1103 | } |
| 1104 | ---- |
| 1105 | |
| Edwin Kempin | 6ce96a1 | 2013-06-06 13:20:01 +0200 | [diff] [blame] | 1106 | [[delete-branch]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1107 | === Delete Branch |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1108 | -- |
| Edwin Kempin | 6ce96a1 | 2013-06-06 13:20:01 +0200 | [diff] [blame] | 1109 | '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] | 1110 | -- |
| Edwin Kempin | 6ce96a1 | 2013-06-06 13:20:01 +0200 | [diff] [blame] | 1111 | |
| 1112 | Deletes a branch. |
| 1113 | |
| 1114 | .Request |
| 1115 | ---- |
| 1116 | DELETE /projects/MyProject/branches/stable HTTP/1.0 |
| 1117 | ---- |
| 1118 | |
| 1119 | .Response |
| 1120 | ---- |
| 1121 | HTTP/1.1 204 No Content |
| 1122 | ---- |
| 1123 | |
| Hugo Arès | ef8e320 | 2015-01-12 15:09:06 -0500 | [diff] [blame] | 1124 | [[delete-branches]] |
| 1125 | === Delete Branches |
| 1126 | -- |
| 1127 | 'POST /projects/link:#project-name[\{project-name\}]/branches:delete' |
| 1128 | -- |
| 1129 | |
| 1130 | Delete one or more branches. |
| 1131 | |
| 1132 | The branches to be deleted must be provided in the request body as a |
| 1133 | link:#delete-branches-input[DeleteBranchesInput] entity. |
| 1134 | |
| 1135 | .Request |
| 1136 | ---- |
| 1137 | POST /projects/MyProject/branches:delete HTTP/1.0 |
| 1138 | Content-Type: application/json;charset=UTF-8 |
| 1139 | |
| 1140 | { |
| 1141 | "branches": [ |
| 1142 | "stable-1.0", |
| 1143 | "stable-2.0" |
| 1144 | ] |
| 1145 | } |
| 1146 | ---- |
| 1147 | |
| 1148 | .Response |
| 1149 | ---- |
| 1150 | HTTP/1.1 204 No Content |
| 1151 | ---- |
| 1152 | |
| 1153 | If some branches could not be deleted, the response is "`409 Conflict`" and the |
| 1154 | error message is contained in the response body. |
| 1155 | |
| Edwin Kempin | d31e558 | 2013-11-30 12:07:08 +0100 | [diff] [blame] | 1156 | [[get-content]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1157 | === Get Content |
| Edwin Kempin | d31e558 | 2013-11-30 12:07:08 +0100 | [diff] [blame] | 1158 | -- |
| 1159 | 'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]/files/link:rest-api-changes.html#file-id[\{file-id\}]/content' |
| 1160 | -- |
| 1161 | |
| 1162 | Gets the content of a file from the HEAD revision of a certain branch. |
| 1163 | |
| 1164 | .Request |
| 1165 | ---- |
| 1166 | GET /projects/gerrit/branches/master/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/content HTTP/1.0 |
| 1167 | ---- |
| 1168 | |
| 1169 | The content is returned as base64 encoded string. |
| 1170 | |
| 1171 | .Response |
| 1172 | ---- |
| 1173 | HTTP/1.1 200 OK |
| 1174 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1175 | Content-Type: text/plain; charset=UTF-8 |
| Edwin Kempin | d31e558 | 2013-11-30 12:07:08 +0100 | [diff] [blame] | 1176 | |
| 1177 | Ly8gQ29weXJpZ2h0IChDKSAyMDEwIFRoZSBBbmRyb2lkIE9wZW4gU291cmNlIFByb2plY... |
| 1178 | ---- |
| 1179 | |
| Edwin Kempin | 87504d9 | 2014-07-04 12:59:19 +0200 | [diff] [blame] | 1180 | [[get-reflog]] |
| 1181 | === Get Reflog |
| 1182 | -- |
| 1183 | 'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]/reflog' |
| 1184 | -- |
| 1185 | |
| 1186 | Gets the reflog of a certain branch. |
| 1187 | |
| 1188 | The caller must be project owner. |
| 1189 | |
| 1190 | .Request |
| 1191 | ---- |
| 1192 | GET /projects/gerrit/branches/master/reflog HTTP/1.0 |
| 1193 | ---- |
| 1194 | |
| 1195 | As response a list of link:#reflog-entry-info[ReflogEntryInfo] entities |
| 1196 | is returned that describe the reflog entries. The reflog entries are |
| 1197 | returned in reverse order. |
| 1198 | |
| 1199 | .Response |
| 1200 | ---- |
| 1201 | HTTP/1.1 200 OK |
| 1202 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1203 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | 87504d9 | 2014-07-04 12:59:19 +0200 | [diff] [blame] | 1204 | |
| 1205 | )]}' |
| 1206 | [ |
| 1207 | { |
| 1208 | "old_id": "976ced8f4fc0909d7e1584d18455299545881d60", |
| 1209 | "new_id": "2eaa94bac536654eb592c941e33b91f925698d16", |
| 1210 | "who": { |
| 1211 | "name": "Jane Roe", |
| 1212 | "email": "jane.roe@example.com", |
| 1213 | "date": "2014-06-30 11:53:43.000000000", |
| 1214 | "tz": 120 |
| 1215 | }, |
| 1216 | "comment": "merged: fast forward" |
| 1217 | }, |
| 1218 | { |
| 1219 | "old_id": "c271c6a7161b74f85560c5899c8c73ee89ca5e29", |
| 1220 | "new_id": "976ced8f4fc0909d7e1584d18455299545881d60", |
| 1221 | "who": { |
| 1222 | "name": "John Doe", |
| 1223 | "email": "john.doe@example.com", |
| 1224 | "date": "2013-10-02 10:45:26.000000000", |
| 1225 | "tz": 120 |
| 1226 | }, |
| 1227 | "comment": "merged: fast forward" |
| 1228 | }, |
| 1229 | { |
| 1230 | "old_id": "0000000000000000000000000000000000000000", |
| 1231 | "new_id": "c271c6a7161b74f85560c5899c8c73ee89ca5e29", |
| 1232 | "who": { |
| 1233 | "name": "John Doe", |
| 1234 | "email": "john.doe@example.com", |
| 1235 | "date": "2013-09-30 19:08:44.000000000", |
| 1236 | "tz": 120 |
| 1237 | }, |
| 1238 | "comment": "" |
| 1239 | } |
| 1240 | ] |
| 1241 | ---- |
| 1242 | |
| 1243 | The get reflog endpoint also accepts a limit integer in the `n` |
| 1244 | parameter. This limits the results to show the last `n` reflog entries. |
| 1245 | |
| 1246 | Query the last 25 reflog entries. |
| 1247 | ---- |
| 1248 | GET /projects/gerrit/branches/master/reflog?n=25 HTTP/1.0 |
| 1249 | ---- |
| 1250 | |
| Edwin Kempin | 2a581fd | 2014-07-04 14:04:54 +0200 | [diff] [blame] | 1251 | The reflog can also be filtered by timestamp by specifying the `from` |
| 1252 | and `to` parameters. The timestamp for `from` and `to` must be given as |
| 1253 | UTC in the following format: `yyyyMMdd_HHmm`. |
| 1254 | |
| 1255 | ---- |
| 1256 | GET /projects/gerrit/branches/master/reflog?from=20130101_0000&to=20140101_0000=25 HTTP/1.0 |
| 1257 | ---- |
| 1258 | |
| Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1259 | [[child-project-endpoints]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1260 | == Child Project Endpoints |
| Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1261 | |
| 1262 | [[list-child-projects]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1263 | === List Child Projects |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1264 | -- |
| Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1265 | 'GET /projects/link:#project-name[\{project-name\}]/children/' |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1266 | -- |
| Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1267 | |
| 1268 | List the direct child projects of a project. |
| 1269 | |
| 1270 | .Request |
| 1271 | ---- |
| 1272 | GET /projects/Public-Plugins/children/ HTTP/1.0 |
| 1273 | ---- |
| 1274 | |
| 1275 | As result a list of link:#project-info[ProjectInfo] entries is |
| 1276 | returned that describe the child projects. |
| 1277 | |
| 1278 | .Response |
| 1279 | ---- |
| 1280 | HTTP/1.1 200 OK |
| 1281 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1282 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1283 | |
| 1284 | )]}' |
| 1285 | [ |
| 1286 | { |
| Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1287 | "id": "plugins%2Freplication", |
| 1288 | "name": "plugins/replication", |
| 1289 | "parent": "Public-Plugins", |
| 1290 | "description": "Copies to other servers using the Git protocol" |
| 1291 | }, |
| 1292 | { |
| Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1293 | "id": "plugins%2Freviewnotes", |
| 1294 | "name": "plugins/reviewnotes", |
| 1295 | "parent": "Public-Plugins", |
| 1296 | "description": "Annotates merged commits using notes on refs/notes/review." |
| 1297 | }, |
| 1298 | { |
| Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 1299 | "id": "plugins%2Fsingleusergroup", |
| 1300 | "name": "plugins/singleusergroup", |
| 1301 | "parent": "Public-Plugins", |
| 1302 | "description": "GroupBackend enabling users to be directly added to access rules" |
| 1303 | } |
| 1304 | ] |
| 1305 | ---- |
| 1306 | |
| Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 1307 | To resolve the child projects of a project recursively the parameter |
| 1308 | `recursive` can be set. |
| 1309 | |
| 1310 | Child projects that are not visible to the calling user are ignored and |
| 1311 | are not resolved further. |
| 1312 | |
| 1313 | .Request |
| 1314 | ---- |
| 1315 | GET /projects/Public-Projects/children/?recursive HTTP/1.0 |
| 1316 | ---- |
| 1317 | |
| 1318 | .Response |
| 1319 | ---- |
| 1320 | HTTP/1.1 200 OK |
| 1321 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1322 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 1323 | |
| 1324 | )]}' |
| 1325 | [ |
| 1326 | { |
| Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 1327 | "id": "gerrit", |
| 1328 | "name": "gerrit", |
| 1329 | "parent": "Public-Projects", |
| 1330 | "description": "Gerrit Code Review" |
| 1331 | }, |
| 1332 | { |
| Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 1333 | "id": "plugins%2Freplication", |
| 1334 | "name": "plugins/replication", |
| 1335 | "parent": "Public-Plugins", |
| 1336 | "description": "Copies to other servers using the Git protocol" |
| 1337 | }, |
| 1338 | { |
| Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 1339 | "id": "plugins%2Freviewnotes", |
| 1340 | "name": "plugins/reviewnotes", |
| 1341 | "parent": "Public-Plugins", |
| 1342 | "description": "Annotates merged commits using notes on refs/notes/review." |
| 1343 | }, |
| 1344 | { |
| Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 1345 | "id": "plugins%2Fsingleusergroup", |
| 1346 | "name": "plugins/singleusergroup", |
| 1347 | "parent": "Public-Plugins", |
| 1348 | "description": "GroupBackend enabling users to be directly added to access rules" |
| 1349 | }, |
| 1350 | { |
| Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 1351 | "id": "Public-Plugins", |
| 1352 | "name": "Public-Plugins", |
| 1353 | "parent": "Public-Projects", |
| 1354 | "description": "Parent project for plugins/*" |
| 1355 | } |
| 1356 | ] |
| 1357 | ---- |
| 1358 | |
| Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 1359 | [[get-child-project]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1360 | === Get Child Project |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1361 | -- |
| Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 1362 | '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] | 1363 | -- |
| Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 1364 | |
| Edwin Kempin | 8a3fb5b | 2013-03-21 15:02:22 +0100 | [diff] [blame] | 1365 | Retrieves a child project. If a non-direct child project should be |
| 1366 | retrieved the parameter `recursive` must be set. |
| Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 1367 | |
| 1368 | .Request |
| 1369 | ---- |
| 1370 | GET /projects/Public-Plugins/children/plugins%2Freplication HTTP/1.0 |
| 1371 | ---- |
| 1372 | |
| 1373 | As response a link:#project-info[ProjectInfo] entity is returned that |
| 1374 | describes the child project. |
| 1375 | |
| 1376 | .Response |
| 1377 | ---- |
| 1378 | HTTP/1.1 200 OK |
| 1379 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1380 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 1381 | |
| 1382 | )]}' |
| 1383 | { |
| Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 1384 | "id": "plugins%2Freplication", |
| 1385 | "name": "plugins/replication", |
| 1386 | "parent": "Public-Plugins", |
| 1387 | "description": "Copies to other servers using the Git protocol" |
| 1388 | } |
| 1389 | ---- |
| 1390 | |
| David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 1391 | [[tag-endpoints]] |
| 1392 | == Tag Endpoints |
| 1393 | |
| 1394 | [[list-tags]] |
| 1395 | === List Tags |
| 1396 | -- |
| 1397 | 'GET /projects/link:#project-name[\{project-name\}]/tags/' |
| 1398 | -- |
| 1399 | |
| 1400 | List the tags of a project. |
| 1401 | |
| 1402 | As result a list of link:#tag-info[TagInfo] entries is returned. |
| 1403 | |
| 1404 | Only includes tags under the `refs/tags/` namespace. |
| 1405 | |
| 1406 | .Request |
| 1407 | ---- |
| 1408 | GET /projects/work%2Fmy-project/tags/ HTTP/1.0 |
| 1409 | ---- |
| 1410 | |
| 1411 | .Response |
| 1412 | ---- |
| 1413 | HTTP/1.1 200 OK |
| 1414 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1415 | Content-Type: application/json; charset=UTF-8 |
| David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 1416 | |
| 1417 | )]}' |
| 1418 | [ |
| 1419 | { |
| 1420 | "ref": "refs/tags/v1.0", |
| 1421 | "revision": "49ce77fdcfd3398dc0dedbe016d1a425fd52d666", |
| 1422 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 1423 | "message": "Annotated tag", |
| 1424 | "tagger": { |
| 1425 | "name": "David Pursehouse", |
| 1426 | "email": "david.pursehouse@sonymobile.com", |
| 1427 | "date": "2014-10-06 07:35:03.000000000", |
| 1428 | "tz": 540 |
| 1429 | } |
| 1430 | }, |
| 1431 | { |
| 1432 | "ref": "refs/tags/v2.0", |
| 1433 | "revision": "1624f5af8ae89148d1a3730df8c290413e3dcf30" |
| 1434 | }, |
| 1435 | { |
| 1436 | "ref": "refs/tags/v3.0", |
| 1437 | "revision": "c628685b3c5a3614571ecb5c8fceb85db9112313", |
| 1438 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 1439 | "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-----", |
| 1440 | "tagger": { |
| 1441 | "name": "David Pursehouse", |
| 1442 | "email": "david.pursehouse@sonymobile.com", |
| 1443 | "date": "2014-10-06 09:02:16.000000000", |
| 1444 | "tz": 540 |
| 1445 | } |
| 1446 | } |
| 1447 | ] |
| 1448 | ---- |
| 1449 | |
| 1450 | [[get-tag]] |
| 1451 | === Get Tag |
| 1452 | -- |
| 1453 | 'GET /projects/link:#project-name[\{project-name\}]/tags/link:#tag-id[\{tag-id\}]' |
| 1454 | -- |
| 1455 | |
| 1456 | Retrieves a tag of a project. |
| 1457 | |
| 1458 | .Request |
| 1459 | ---- |
| 1460 | GET /projects/work%2Fmy-project/tags/v1.0 HTTP/1.0 |
| 1461 | ---- |
| 1462 | |
| 1463 | As response a link:#tag-info[TagInfo] entity is returned that describes the tag. |
| 1464 | |
| 1465 | .Response |
| 1466 | ---- |
| 1467 | HTTP/1.1 200 OK |
| 1468 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1469 | Content-Type: application/json; charset=UTF-8 |
| David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 1470 | |
| 1471 | )]}' |
| 1472 | { |
| 1473 | "ref": "refs/tags/v1.0", |
| 1474 | "revision": "49ce77fdcfd3398dc0dedbe016d1a425fd52d666", |
| 1475 | "object": "1624f5af8ae89148d1a3730df8c290413e3dcf30", |
| 1476 | "message": "Annotated tag", |
| 1477 | "tagger": { |
| 1478 | "name": "David Pursehouse", |
| 1479 | "email": "david.pursehouse@sonymobile.com", |
| 1480 | "date": "2014-10-06 07:35:03.000000000", |
| 1481 | "tz": 540 |
| 1482 | } |
| 1483 | } |
| 1484 | ---- |
| 1485 | |
| 1486 | |
| Edwin Kempin | 1b99360 | 2014-07-08 16:18:45 +0200 | [diff] [blame] | 1487 | [[commit-endpoints]] |
| 1488 | == Commit Endpoints |
| 1489 | |
| 1490 | [[get-commit]] |
| 1491 | === Get Commit |
| 1492 | -- |
| 1493 | 'GET /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]' |
| 1494 | -- |
| 1495 | |
| 1496 | Retrieves a commit of a project. |
| 1497 | |
| 1498 | The commit must be visible to the caller. |
| 1499 | |
| 1500 | .Request |
| 1501 | ---- |
| 1502 | GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96 HTTP/1.0 |
| 1503 | ---- |
| 1504 | |
| 1505 | As response a link:rest-api-changes.html#commit-info[CommitInfo] entity |
| 1506 | is returned that describes the commit. |
| 1507 | |
| 1508 | .Response |
| 1509 | ---- |
| 1510 | HTTP/1.1 200 OK |
| 1511 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1512 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | 1b99360 | 2014-07-08 16:18:45 +0200 | [diff] [blame] | 1513 | |
| 1514 | )]}' |
| 1515 | { |
| 1516 | "commit": "184ebe53805e102605d11f6b143486d15c23a09c", |
| 1517 | "parents": [ |
| 1518 | { |
| 1519 | "commit": "1eee2c9d8f352483781e772f35dc586a69ff5646", |
| 1520 | "subject": "Migrate contributor agreements to All-Projects." |
| 1521 | } |
| 1522 | ], |
| 1523 | "author": { |
| 1524 | "name": "Shawn O. Pearce", |
| 1525 | "email": "sop@google.com", |
| 1526 | "date": "2012-04-24 18:08:08.000000000", |
| 1527 | "tz": -420 |
| 1528 | }, |
| 1529 | "committer": { |
| 1530 | "name": "Shawn O. Pearce", |
| 1531 | "email": "sop@google.com", |
| 1532 | "date": "2012-04-24 18:08:08.000000000", |
| 1533 | "tz": -420 |
| 1534 | }, |
| 1535 | "subject": "Use an EventBus to manage star icons", |
| 1536 | "message": "Use an EventBus to manage star icons\n\nImage widgets that need to ..." |
| 1537 | } |
| 1538 | ---- |
| 1539 | |
| Zhen Chen | d1462d8 | 2016-05-12 13:55:37 -0700 | [diff] [blame^] | 1540 | [[get-content-from-commit]] |
| Edwin Kempin | 6f7410a | 2014-07-09 15:46:22 +0200 | [diff] [blame] | 1541 | === Get Content |
| 1542 | -- |
| 1543 | 'GET /projects/link:#project-name[\{project-name\}]/commits/link:#commit-id[\{commit-id\}]/files/link:rest-api-changes.html#file-id[\{file-id\}]/content' |
| 1544 | -- |
| 1545 | |
| 1546 | Gets the content of a file from a certain commit. |
| 1547 | |
| 1548 | .Request |
| 1549 | ---- |
| 1550 | GET /projects/work%2Fmy-project/commits/a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96/files/gerrit-server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fgoogle%2Fgerrit%2Fserver%2Fproject%2FRefControl.java/content HTTP/1.0 |
| 1551 | ---- |
| 1552 | |
| 1553 | The content is returned as base64 encoded string. |
| 1554 | |
| 1555 | .Response |
| 1556 | ---- |
| 1557 | HTTP/1.1 200 OK |
| 1558 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1559 | Content-Type: text/plain; charset=UTF-8 |
| Edwin Kempin | 6f7410a | 2014-07-09 15:46:22 +0200 | [diff] [blame] | 1560 | |
| 1561 | Ly8gQ29weXJpZ2h0IChDKSAyMDEwIFRoZSBBbmRyb2lkIE9wZW4gU291cmNlIFByb2plY... |
| 1562 | ---- |
| 1563 | |
| Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 1564 | [[dashboard-endpoints]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1565 | == Dashboard Endpoints |
| Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 1566 | |
| Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 1567 | [[list-dashboards]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1568 | === List Dashboards |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1569 | -- |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1570 | 'GET /projects/link:#project-name[\{project-name\}]/dashboards/' |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1571 | -- |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1572 | |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1573 | List custom dashboards for a project. |
| 1574 | |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 1575 | As result a list of link:#dashboard-info[DashboardInfo] entries is |
| 1576 | returned. |
| 1577 | |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1578 | List all dashboards for the `work/my-project` project: |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 1579 | |
| 1580 | .Request |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1581 | ---- |
| 1582 | GET /projects/work%2Fmy-project/dashboards/ HTTP/1.0 |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 1583 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1584 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 1585 | .Response |
| 1586 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1587 | HTTP/1.1 200 OK |
| 1588 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1589 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1590 | |
| 1591 | )]}' |
| 1592 | [ |
| 1593 | { |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1594 | "id": "main:closed", |
| 1595 | "ref": "main", |
| 1596 | "path": "closed", |
| 1597 | "description": "Merged and abandoned changes in last 7 weeks", |
| 1598 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 1599 | "default": true, |
| 1600 | "title": "Closed changes", |
| 1601 | "sections": [ |
| 1602 | { |
| 1603 | "name": "Merged", |
| 1604 | "query": "status:merged age:7w" |
| 1605 | }, |
| 1606 | { |
| 1607 | "name": "Abandoned", |
| 1608 | "query": "status:abandoned age:7w" |
| 1609 | } |
| 1610 | ] |
| 1611 | } |
| 1612 | ] |
| 1613 | ---- |
| 1614 | |
| Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 1615 | .Get all dashboards of the 'All-Projects' project |
| 1616 | **** |
| 1617 | get::/projects/All-Projects/dashboards/ |
| 1618 | **** |
| 1619 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1620 | [[get-dashboard]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1621 | === Get Dashboard |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1622 | -- |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1623 | '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] | 1624 | -- |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1625 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1626 | Retrieves a project dashboard. The dashboard can be defined on that |
| 1627 | project or be inherited from a parent project. |
| 1628 | |
| 1629 | .Request |
| 1630 | ---- |
| 1631 | GET /projects/work%2Fmy-project/dashboards/main:closed HTTP/1.0 |
| 1632 | ---- |
| 1633 | |
| 1634 | As response a link:#dashboard-info[DashboardInfo] entity is returned |
| 1635 | that describes the dashboard. |
| 1636 | |
| 1637 | .Response |
| 1638 | ---- |
| 1639 | HTTP/1.1 200 OK |
| 1640 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1641 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1642 | |
| 1643 | )]}' |
| 1644 | { |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1645 | "id": "main:closed", |
| 1646 | "ref": "main", |
| 1647 | "path": "closed", |
| 1648 | "description": "Merged and abandoned changes in last 7 weeks", |
| 1649 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 1650 | "default": true, |
| 1651 | "title": "Closed changes", |
| 1652 | "sections": [ |
| 1653 | { |
| 1654 | "name": "Merged", |
| 1655 | "query": "status:merged age:7w" |
| 1656 | }, |
| 1657 | { |
| 1658 | "name": "Abandoned", |
| 1659 | "query": "status:abandoned age:7w" |
| 1660 | } |
| 1661 | ] |
| 1662 | } |
| 1663 | ---- |
| 1664 | |
| 1665 | To retrieve the default dashboard of a project use `default` as |
| 1666 | dashboard-id. |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 1667 | |
| 1668 | .Request |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1669 | ---- |
| 1670 | GET /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 1671 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1672 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 1673 | .Response |
| 1674 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1675 | HTTP/1.1 200 OK |
| 1676 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1677 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1678 | |
| 1679 | )]}' |
| 1680 | { |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1681 | "id": "main:closed", |
| 1682 | "ref": "main", |
| 1683 | "path": "closed", |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1684 | "description": "Merged and abandoned changes in last 7 weeks", |
| 1685 | "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] | 1686 | "default": true, |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1687 | "title": "Closed changes", |
| 1688 | "sections": [ |
| 1689 | { |
| 1690 | "name": "Merged", |
| 1691 | "query": "status:merged age:7w" |
| 1692 | }, |
| 1693 | { |
| 1694 | "name": "Abandoned", |
| 1695 | "query": "status:abandoned age:7w" |
| 1696 | } |
| 1697 | ] |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1698 | } |
| 1699 | ---- |
| 1700 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1701 | [[set-dashboard]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1702 | === Set Dashboard |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1703 | -- |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1704 | '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] | 1705 | -- |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1706 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1707 | Updates/Creates a project dashboard. |
| 1708 | |
| 1709 | Currently only supported for the `default` dashboard. |
| 1710 | |
| 1711 | The creation/update information for the dashboard must be provided in |
| 1712 | the request body as a link:#dashboard-input[DashboardInput] entity. |
| 1713 | |
| 1714 | .Request |
| 1715 | ---- |
| 1716 | PUT /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1717 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1718 | |
| 1719 | { |
| 1720 | "id": "main:closed", |
| 1721 | "commit_message": "Define the default dashboard" |
| 1722 | } |
| 1723 | ---- |
| 1724 | |
| 1725 | As response the new/updated dashboard is returned as a |
| 1726 | link:#dashboard-info[DashboardInfo] entity. |
| 1727 | |
| 1728 | .Response |
| 1729 | ---- |
| 1730 | HTTP/1.1 200 OK |
| 1731 | Content-Disposition: attachment |
| David Pursehouse | 56bf1cb | 2015-01-06 15:44:00 +0900 | [diff] [blame] | 1732 | Content-Type: application/json; charset=UTF-8 |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1733 | |
| 1734 | )]}' |
| 1735 | { |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1736 | "id": "main:closed", |
| 1737 | "ref": "main", |
| 1738 | "path": "closed", |
| 1739 | "description": "Merged and abandoned changes in last 7 weeks", |
| 1740 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 1741 | "default": true, |
| 1742 | "title": "Closed changes", |
| 1743 | "sections": [ |
| 1744 | { |
| 1745 | "name": "Merged", |
| 1746 | "query": "status:merged age:7w" |
| 1747 | }, |
| 1748 | { |
| 1749 | "name": "Abandoned", |
| 1750 | "query": "status:abandoned age:7w" |
| 1751 | } |
| 1752 | ] |
| 1753 | } |
| 1754 | ---- |
| 1755 | |
| 1756 | [[delete-dashboard]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1757 | === Delete Dashboard |
| Yuxuan 'fishy' Wang | d85b687 | 2013-11-15 11:47:46 -0800 | [diff] [blame] | 1758 | -- |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1759 | '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] | 1760 | -- |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1761 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1762 | Deletes a project dashboard. |
| 1763 | |
| 1764 | Currently only supported for the `default` dashboard. |
| 1765 | |
| Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 1766 | The request body does not need to include a link:#dashboard-input[ |
| John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 1767 | DashboardInput] entity if no commit message is specified. |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1768 | |
| 1769 | Please note that some proxies prohibit request bodies for DELETE |
| 1770 | requests. |
| 1771 | |
| 1772 | .Request |
| 1773 | ---- |
| 1774 | DELETE /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| 1775 | ---- |
| 1776 | |
| 1777 | .Response |
| 1778 | ---- |
| 1779 | HTTP/1.1 204 No Content |
| 1780 | ---- |
| 1781 | |
| Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 1782 | |
| 1783 | [[ids]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1784 | == IDs |
| Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 1785 | |
| Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1786 | [[branch-id]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1787 | === \{branch-id\} |
| Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1788 | The name of a branch or `HEAD`. The prefix `refs/heads/` can be |
| 1789 | omitted. |
| 1790 | |
| Edwin Kempin | 1b99360 | 2014-07-08 16:18:45 +0200 | [diff] [blame] | 1791 | [[commit-id]] |
| 1792 | === \{commit-id\} |
| 1793 | Commit ID. |
| 1794 | |
| David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 1795 | [[tag-id]] |
| 1796 | === \{tag-id\} |
| 1797 | The name of a tag. The prefix `refs/tags/` can be omitted. |
| 1798 | |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1799 | [[dashboard-id]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1800 | === \{dashboard-id\} |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1801 | The ID of a dashboard in the format '<ref>:<path>'. |
| 1802 | |
| 1803 | A special dashboard ID is `default` which represents the default |
| 1804 | dashboard of a project. |
| 1805 | |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1806 | [[project-name]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1807 | === \{project-name\} |
| Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 1808 | The name of the project. |
| 1809 | |
| Edwin Kempin | a9e94ab | 2015-03-06 10:35:39 +0100 | [diff] [blame] | 1810 | If the name ends with `.git`, the suffix will be automatically removed. |
| 1811 | |
| Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 1812 | |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 1813 | [[json-entities]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1814 | == JSON Entities |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 1815 | |
| Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 1816 | [[ban-input]] |
| 1817 | === BanInput |
| 1818 | The `BanInput` entity contains information for banning commits in a |
| 1819 | project. |
| 1820 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 1821 | [options="header",cols="1,^2,4"] |
| Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 1822 | |======================= |
| 1823 | |Field Name||Description |
| 1824 | |`commits` ||List of commits to be banned. |
| 1825 | |`reason` |optional|Reason for banning the commits. |
| 1826 | |======================= |
| 1827 | |
| 1828 | [[ban-result-info]] |
| 1829 | === BanResultInfo |
| 1830 | The `BanResultInfo` entity describes the result of banning commits. |
| 1831 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 1832 | [options="header",cols="1,^2,4"] |
| Edwin Kempin | 6294674 | 2014-07-09 11:17:58 +0200 | [diff] [blame] | 1833 | |============================= |
| 1834 | |Field Name ||Description |
| 1835 | |`newly_banned` |optional|List of newly banned commits. |
| 1836 | |`already_banned`|optional|List of commits that were already banned. |
| 1837 | |`ignored` |optional|List of object IDs that were ignored. |
| 1838 | |============================= |
| 1839 | |
| Edwin Kempin | 521c124 | 2015-01-23 12:44:44 +0100 | [diff] [blame] | 1840 | [[branch-info]] |
| 1841 | === BranchInfo |
| 1842 | The `BranchInfo` entity contains information about a branch. |
| 1843 | |
| 1844 | [options="header",cols="1,^2,4"] |
| 1845 | |========================= |
| 1846 | |Field Name ||Description |
| 1847 | |`ref` ||The ref of the branch. |
| 1848 | |`revision` ||The revision to which the branch points. |
| 1849 | |`can_delete`|`false` if not set| |
| 1850 | Whether the calling user can delete this branch. |
| 1851 | |`web_links` |optional| |
| 1852 | Links to the branch in external sites as a list of |
| 1853 | link:rest-api-changes.html#web-link-info[WebLinkInfo] entries. |
| 1854 | |========================= |
| 1855 | |
| Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1856 | [[branch-input]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1857 | === BranchInput |
| Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1858 | The `BranchInput` entity contains information for the creation of |
| 1859 | a new branch. |
| 1860 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 1861 | [options="header",cols="1,^2,4"] |
| Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1862 | |======================= |
| 1863 | |Field Name||Description |
| 1864 | |`ref` |optional| |
| 1865 | The name of the branch. The prefix `refs/heads/` can be |
| 1866 | omitted. + |
| 1867 | If set, must match the branch ID in the URL. |
| 1868 | |`revision`|optional| |
| 1869 | The base revision of the new branch. + |
| 1870 | If not set, `HEAD` will be used as base revision. |
| 1871 | |======================= |
| 1872 | |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 1873 | [[config-info]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1874 | === ConfigInfo |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 1875 | The `ConfigInfo` entity contains information about the effective project |
| 1876 | configuration. |
| 1877 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 1878 | [options="header",cols="1,^2,4"] |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1879 | |======================================================= |
| 1880 | |Field Name ||Description |
| 1881 | |`description` |optional| |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 1882 | The description of the project. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1883 | |`use_contributor_agreements` |optional| |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 1884 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 1885 | authors must complete a contributor agreement on the site before |
| 1886 | pushing any commits or changes to this project. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1887 | |`use_content_merge` |optional| |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 1888 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 1889 | Gerrit will try to perform a 3-way merge of text file content when a |
| 1890 | file has been modified by both the destination branch and the change |
| 1891 | being submitted. This option only takes effect if submit type is not |
| 1892 | FAST_FORWARD_ONLY. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1893 | |`use_signed_off_by` |optional| |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 1894 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 1895 | each change must contain a Signed-off-by line from either the author or |
| 1896 | the uploader in the commit message. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1897 | |`create_new_change_for_all_not_in_target` |optional| |
| 1898 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 1899 | a new change is created for every commit not in target branch. |
| 1900 | |`require_change_id` |optional| |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 1901 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether a |
| 1902 | valid link:user-changeid.html[Change-Id] footer in any commit uploaded |
| 1903 | for review is required. This does not apply to commits pushed directly |
| 1904 | to a branch or tag. |
| Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 1905 | |`max_object_size_limit` || |
| 1906 | The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size |
| 1907 | limit] of this project as a link:#max-object-size-limit-info[ |
| 1908 | MaxObjectSizeLimitInfo] entity. |
| 1909 | |`submit_type` || |
| 1910 | The default submit type of the project, can be `MERGE_IF_NECESSARY`, |
| 1911 | `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `MERGE_ALWAYS` or |
| 1912 | `CHERRY_PICK`. |
| 1913 | |`state` |optional| |
| 1914 | The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. + |
| 1915 | Not set if the project state is `ACTIVE`. |
| Edwin Kempin | 3660c13 | 2013-07-16 08:03:11 +0200 | [diff] [blame] | 1916 | |`commentlinks` || |
| Edwin Kempin | 8aa53af | 2013-07-15 10:43:15 +0200 | [diff] [blame] | 1917 | Map with the comment link configurations of the project. The name of |
| 1918 | the comment link configuration is mapped to the comment link |
| 1919 | configuration, which has the same format as the |
| 1920 | link:config-gerrit.html#_a_id_commentlink_a_section_commentlink[ |
| 1921 | commentlink section] of `gerrit.config`. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1922 | |`theme` |optional| |
| Edwin Kempin | 272402e | 2013-07-15 11:17:36 +0200 | [diff] [blame] | 1923 | The theme that is configured for the project as a link:#theme-info[ |
| 1924 | ThemeInfo] entity. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1925 | |`plugin_config` |optional| |
| Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 1926 | Plugin configuration as map which maps the plugin name to a map of |
| 1927 | parameter names to link:#config-parameter-info[ConfigParameterInfo] |
| 1928 | entities. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1929 | |`actions` |optional| |
| David Ostrovsky | 9e8b2fb | 2013-08-30 08:09:53 +0200 | [diff] [blame] | 1930 | Actions the caller might be able to perform on this project. The |
| 1931 | information is a map of view names to |
| 1932 | link:rest-api-changes.html#action-info[ActionInfo] entities. |
| David Pursehouse | 510b87d | 2014-11-25 16:46:28 +0900 | [diff] [blame] | 1933 | |======================================================= |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 1934 | |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 1935 | [[config-input]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1936 | === ConfigInput |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 1937 | The `ConfigInput` entity describes a new project configuration. |
| 1938 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 1939 | [options="header",cols="1,^2,4"] |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1940 | |====================================================== |
| 1941 | |Field Name ||Description |
| 1942 | |`description` |optional| |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 1943 | The new description of the project. + |
| 1944 | If not set, the description is removed. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1945 | |`use_contributor_agreements` |optional| |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 1946 | Whether authors must complete a contributor agreement on the site |
| 1947 | before pushing any commits or changes to this project. + |
| 1948 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 1949 | If not set, this setting is not updated. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1950 | |`use_content_merge` |optional| |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 1951 | Whether Gerrit will try to perform a 3-way merge of text file content |
| 1952 | when a file has been modified by both the destination branch and the |
| 1953 | change being submitted. This option only takes effect if submit type is |
| 1954 | not FAST_FORWARD_ONLY. + |
| 1955 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 1956 | If not set, this setting is not updated. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1957 | |`use_signed_off_by` |optional| |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 1958 | Whether each change must contain a Signed-off-by line from either the |
| 1959 | author or the uploader in the commit message. + |
| 1960 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 1961 | If not set, this setting is not updated. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1962 | |`create_new_change_for_all_not_in_target` |optional| |
| 1963 | Whether a new change will be created for every commit not in target |
| 1964 | branch. + |
| 1965 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 1966 | If not set, this setting is not updated. |
| 1967 | |`require_change_id` |optional| |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 1968 | Whether a valid link:user-changeid.html[Change-Id] footer in any commit |
| 1969 | uploaded for review is required. This does not apply to commits pushed |
| 1970 | directly to a branch or tag. + |
| 1971 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 1972 | If not set, this setting is not updated. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1973 | |`max_object_size_limit` |optional| |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 1974 | The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size |
| 1975 | limit] of this project as a link:#max-object-size-limit-info[ |
| 1976 | MaxObjectSizeLimitInfo] entity. + |
| 1977 | If set to `0`, the max object size limit is removed. + |
| 1978 | If not set, this setting is not updated. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1979 | |`submit_type` |optional| |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 1980 | The default submit type of the project, can be `MERGE_IF_NECESSARY`, |
| 1981 | `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `MERGE_ALWAYS` or |
| 1982 | `CHERRY_PICK`. + |
| 1983 | If not set, the submit type is not updated. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1984 | |`state` |optional| |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 1985 | The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. + |
| 1986 | Not set if the project state is `ACTIVE`. + |
| 1987 | If not set, the project state is not updated. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 1988 | |`plugin_config_values` |optional| |
| Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 1989 | Plugin configuration values as map which maps the plugin name to a map |
| 1990 | of parameter names to values. |
| David Pursehouse | 510b87d | 2014-11-25 16:46:28 +0900 | [diff] [blame] | 1991 | |====================================================== |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 1992 | |
| Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 1993 | [[config-parameter-info]] |
| 1994 | ConfigParameterInfo |
| 1995 | ~~~~~~~~~~~~~~~~~~~ |
| 1996 | The `ConfigParameterInfo` entity describes a project configuration |
| 1997 | parameter. |
| 1998 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 1999 | [options="header",cols="1,^2,4"] |
| Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 2000 | |=============================== |
| 2001 | |Field Name ||Description |
| 2002 | |`display_name` |optional| |
| 2003 | The display name of the configuration parameter. |
| Edwin Kempin | d92196d | 2014-01-27 21:55:46 +0100 | [diff] [blame] | 2004 | |`description` |optional| |
| 2005 | The description of the configuration parameter. |
| Edwin Kempin | aec6132 | 2014-01-28 12:59:22 +0100 | [diff] [blame] | 2006 | |`warning` |optional| |
| 2007 | Warning message for the configuration parameter. |
| Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 2008 | |`type` || |
| David Ostrovsky | c6dd217 | 2014-02-01 19:13:27 +0100 | [diff] [blame] | 2009 | The type of the configuration parameter. Can be `STRING`, `INT`, |
| 2010 | `LONG`, `BOOLEAN`, `LIST` or `ARRAY`. |
| Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 2011 | |`value` |optional| |
| Edwin Kempin | d32beef | 2013-11-28 20:36:33 +0100 | [diff] [blame] | 2012 | The value of the configuration parameter as string. If the parameter |
| 2013 | is inheritable this is the effective value which is deduced from |
| 2014 | `configured_value` and `inherited_value`. |
| David Ostrovsky | c6dd217 | 2014-02-01 19:13:27 +0100 | [diff] [blame] | 2015 | |`values` |optional| |
| 2016 | The list of values. Only set if the `type` is `ARRAY`. |
| Edwin Kempin | 0d48523 | 2013-11-17 18:55:48 +0100 | [diff] [blame] | 2017 | `editable` |`false` if not set| |
| 2018 | Whether the value is editable. |
| Edwin Kempin | 20f256fb | 2013-11-28 19:56:15 +0100 | [diff] [blame] | 2019 | |`permitted_values`|optional| |
| David Ostrovsky | c6dd217 | 2014-02-01 19:13:27 +0100 | [diff] [blame] | 2020 | The list of permitted values. Only set if the `type` is `LIST`. |
| Edwin Kempin | d32beef | 2013-11-28 20:36:33 +0100 | [diff] [blame] | 2021 | |`inheritable` |`false` if not set| |
| 2022 | Whether the configuration parameter can be inherited. |
| 2023 | |`configured_value`|optional| |
| 2024 | The value of the configuration parameter that is configured on this |
| 2025 | project, only set if `inheritable` is true. |
| 2026 | |`inherited_value` |optional| |
| 2027 | The inherited value of the configuration parameter, only set if |
| 2028 | `inheritable` is true. |
| 2029 | |`permitted_values` |optional| |
| 2030 | The list of permitted values, only set if the `type` is `LIST`. |
| Edwin Kempin | 9ce4f55 | 2013-11-15 16:00:00 +0100 | [diff] [blame] | 2031 | |=============================== |
| 2032 | |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 2033 | [[dashboard-info]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2034 | === DashboardInfo |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 2035 | The `DashboardInfo` entity contains information about a project |
| 2036 | dashboard. |
| 2037 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2038 | [options="header",cols="1,^2,4"] |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 2039 | |=============================== |
| 2040 | |Field Name ||Description |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 2041 | |`id` || |
| 2042 | The ID of the dashboard. The ID has the format '<ref>:<path>', |
| 2043 | where ref and path are URL encoded. |
| 2044 | |`project` || |
| 2045 | The name of the project for which this dashboard is returned. |
| 2046 | |`defining_project`|| |
| 2047 | The name of the project in which this dashboard is defined. |
| 2048 | This is different from `project` if the dashboard is inherited from a |
| 2049 | parent project. |
| 2050 | |`ref` || |
| 2051 | The name of the ref in which the dashboard is defined, without the |
| 2052 | `refs/meta/dashboards/` prefix, which is common for all dashboard refs. |
| 2053 | |`path` || |
| 2054 | The path of the file in which the dashboard is defined. |
| 2055 | |`description` |optional|The description of the dashboard. |
| 2056 | |`foreach` |optional| |
| 2057 | Subquery that applies to all sections in the dashboard. + |
| 2058 | Tokens such as `${project}` are not resolved. |
| 2059 | |`url` || |
| David Pursehouse | a1d633b | 2014-05-02 17:21:02 +0900 | [diff] [blame] | 2060 | 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] | 2061 | The URL is relative to the canonical web URL. + |
| 2062 | Tokens in the queries such as `${project}` are resolved. |
| 2063 | |`default` |not set if `false`| |
| 2064 | Whether this is the default dashboard of the project. |
| 2065 | |`title` |optional|The title of the dashboard. |
| 2066 | |`sections` || |
| 2067 | The list of link:#dashboard-section-info[sections] in the dashboard. |
| 2068 | |=============================== |
| 2069 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2070 | [[dashboard-input]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2071 | === DashboardInput |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2072 | The `DashboardInput` entity contains information to create/update a |
| 2073 | project dashboard. |
| 2074 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2075 | [options="header",cols="1,^2,4"] |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 2076 | |============================= |
| 2077 | |Field Name ||Description |
| 2078 | |`id` |optional| |
| Edwin Kempin | c95c508 | 2013-03-12 16:56:25 +0100 | [diff] [blame] | 2079 | 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] | 2080 | |`commit_message`|optional| |
| 2081 | Message that should be used to commit the change of the dashboard. |
| 2082 | |============================= |
| 2083 | |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 2084 | [[dashboard-section-info]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2085 | === DashboardSectionInfo |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 2086 | The `DashboardSectionInfo` entity contains information about a section |
| 2087 | in a dashboard. |
| 2088 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2089 | [options="header",cols="1,6"] |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 2090 | |=========================== |
| 2091 | |Field Name |Description |
| 2092 | |`name` |The title of the section. |
| 2093 | |`query` |The query of the section. + |
| 2094 | Tokens such as `${project}` are not resolved. |
| 2095 | |=========================== |
| 2096 | |
| Hugo Arès | ef8e320 | 2015-01-12 15:09:06 -0500 | [diff] [blame] | 2097 | [[delete-branches-input]] |
| 2098 | === DeleteBranchesInput |
| 2099 | The `DeleteBranchesInput` entity contains information about branches that should |
| 2100 | be deleted. |
| 2101 | |
| 2102 | [options="header",width="50%",cols="1,6"] |
| 2103 | |========================== |
| 2104 | |Field Name |Description |
| 2105 | |`branches` |A list of branch names that identify the branches that should be |
| 2106 | deleted. |
| 2107 | |========================== |
| 2108 | |
| Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 2109 | [[gc-input]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2110 | === GCInput |
| Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 2111 | The `GCInput` entity contains information to run the Git garbage |
| 2112 | collection. |
| 2113 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2114 | [options="header",cols="1,^2,4"] |
| Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 2115 | |============================= |
| 2116 | |Field Name ||Description |
| 2117 | |`show_progress` |`false` if not set| |
| 2118 | Whether progress information should be shown. |
| 2119 | |============================= |
| 2120 | |
| Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 2121 | [[head-input]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2122 | === HeadInput |
| Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 2123 | The `HeadInput` entity contains information for setting `HEAD` for a |
| 2124 | project. |
| 2125 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2126 | [options="header",cols="1,6"] |
| Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 2127 | |============================ |
| 2128 | |Field Name |Description |
| 2129 | |`ref` | |
| 2130 | The ref to which `HEAD` should be set, the `refs/heads` prefix can be |
| 2131 | omitted. |
| 2132 | |============================ |
| 2133 | |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 2134 | [[inherited-boolean-info]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2135 | === InheritedBooleanInfo |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 2136 | A boolean value that can also be inherited. |
| 2137 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2138 | [options="header",cols="1,^2,4"] |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 2139 | |================================ |
| 2140 | |Field Name ||Description |
| 2141 | |`value` || |
| 2142 | The effective boolean value. |
| 2143 | |`configured_value` || |
| 2144 | The configured value, can be `TRUE`, `FALSE` or `INHERITED`. |
| 2145 | |`inherited_value` |optional| |
| 2146 | The boolean value inherited from the parent. + |
| 2147 | Not set if there is no parent. |
| 2148 | |================================ |
| 2149 | |
| Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 2150 | [[max-object-size-limit-info]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2151 | === MaxObjectSizeLimitInfo |
| Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 2152 | The `MaxObjectSizeLimitInfo` entity contains information about the |
| 2153 | link:config-gerrit.html#receive.maxObjectSizeLimit[max object size |
| 2154 | limit] of a project. |
| 2155 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2156 | [options="header",cols="1,^2,4"] |
| Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 2157 | |=============================== |
| 2158 | |Field Name ||Description |
| 2159 | |`value` |optional| |
| 2160 | The effective value of the max object size limit as a formatted string. + |
| 2161 | Not set if there is no limit for the object size. |
| 2162 | |`configured_value`|optional| |
| 2163 | The max object size limit that is configured on the project as a |
| 2164 | formatted string. + |
| 2165 | Not set if there is no limit for the object size configured on project |
| 2166 | level. |
| 2167 | |`inherited_value` |optional| |
| 2168 | The max object size limit that is inherited as a formatted string. + |
| 2169 | Not set if there is no global limit for the object size. |
| 2170 | |=============================== |
| 2171 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 2172 | [[project-description-input]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2173 | === ProjectDescriptionInput |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 2174 | The `ProjectDescriptionInput` entity contains information for setting a |
| 2175 | project description. |
| 2176 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2177 | [options="header",cols="1,^2,4"] |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 2178 | |============================= |
| 2179 | |Field Name ||Description |
| 2180 | |`description` |optional|The project description. + |
| 2181 | The project description will be deleted if not set. |
| 2182 | |`commit_message`|optional| |
| 2183 | Message that should be used to commit the change of the project |
| 2184 | description in the `project.config` file to the `refs/meta/config` |
| 2185 | branch. |
| 2186 | |============================= |
| 2187 | |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 2188 | [[project-info]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2189 | === ProjectInfo |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 2190 | The `ProjectInfo` entity contains information about a project. |
| 2191 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2192 | [options="header",cols="1,^2,4"] |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 2193 | |=========================== |
| 2194 | |Field Name ||Description |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 2195 | |`id` ||The URL encoded project name. |
| 2196 | |`name` | |
| 2197 | not set if returned in a map where the project name is used as map key| |
| 2198 | The name of the project. |
| Edwin Kempin | f361182 | 2013-03-19 08:23:09 +0100 | [diff] [blame] | 2199 | |`parent` |optional| |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 2200 | The name of the parent project. + |
| 2201 | `?-<n>` if the parent project is not visible (`<n>` is a number which |
| 2202 | is increased for each non-visible project). |
| 2203 | |`description` |optional|The description of the project. |
| Shawn Pearce | 21a6c21 | 2014-04-23 12:35:10 -0700 | [diff] [blame] | 2204 | |`state` |optional|`ACTIVE`, `READ_ONLY` or `HIDDEN`. |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 2205 | |`branches` |optional|Map of branch names to HEAD revisions. |
| Edwin Kempin | 26c95a4 | 2014-11-25 16:29:47 +0100 | [diff] [blame] | 2206 | |`web_links` |optional| |
| Edwin Kempin | ea00475 | 2014-04-11 15:56:02 +0200 | [diff] [blame] | 2207 | Links to the project in external sites as a list of |
| 2208 | link:rest-api-changes.html#web-link-info[WebLinkInfo] entries. |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 2209 | |=========================== |
| 2210 | |
| Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 2211 | [[project-input]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2212 | === ProjectInput |
| Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 2213 | The `ProjectInput` entity contains information for the creation of |
| 2214 | a new project. |
| 2215 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2216 | [options="header",cols="1,^2,4"] |
| Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 2217 | |========================================= |
| 2218 | |Field Name ||Description |
| 2219 | |`name` |optional| |
| 2220 | The name of the project (not encoded). + |
| David Pursehouse | 8c5ad41 | 2015-02-03 14:19:09 +0900 | [diff] [blame] | 2221 | If set, must match the project name in the URL. + |
| 2222 | If name ends with `.git` the suffix will be automatically removed. |
| Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 2223 | |`parent` |optional| |
| 2224 | The name of the parent project. + |
| 2225 | If not set, the `All-Projects` project will be the parent project. |
| 2226 | |`description` |optional|The description of the project. |
| 2227 | |`permissions_only` |`false` if not set| |
| 2228 | Whether a permission-only project should be created. |
| 2229 | |`create_empty_commit` |`false` if not set| |
| 2230 | Whether an empty initial commit should be created. |
| 2231 | |`submit_type` |optional| |
| 2232 | The submit type that should be set for the project |
| 2233 | (`MERGE_IF_NECESSARY`, `REBASE_IF_NECESSARY`, `FAST_FORWARD_ONLY`, |
| 2234 | `MERGE_ALWAYS`, `CHERRY_PICK`). + |
| Edwin Kempin | a79ea55 | 2013-11-19 11:24:37 +0100 | [diff] [blame] | 2235 | If not set, `MERGE_IF_NECESSARY` is set as submit type unless |
| 2236 | link:config-gerrit.html#repository.name.defaultSubmitType[ |
| 2237 | repository.<name>.defaultSubmitType] is set to a different value. |
| Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 2238 | |`branches` |optional| |
| 2239 | A list of branches that should be initially created. + |
| 2240 | For the branch names the `refs/heads/` prefix can be omitted. |
| 2241 | |`owners` |optional| |
| 2242 | A list of groups that should be assigned as project owner. + |
| 2243 | Each group in the list must be specified as |
| 2244 | link:rest-api-groups.html#group-id[group-id]. + |
| 2245 | If not set, the link:config-gerrit.html#repository.name.ownerGroup[ |
| 2246 | groups that are configured as default owners] are set as project |
| 2247 | owners. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2248 | |`use_contributor_agreements` |`INHERIT` if not set| |
| Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 2249 | Whether contributor agreements should be used for the project (`TRUE`, |
| 2250 | `FALSE`, `INHERIT`). |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2251 | |`use_signed_off_by` |`INHERIT` if not set| |
| Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 2252 | Whether the usage of 'Signed-Off-By' footers is required for the |
| 2253 | project (`TRUE`, `FALSE`, `INHERIT`). |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2254 | |`create_new_change_for_all_not_in_target` |`INHERIT` if not set| |
| 2255 | Whether a new change is created for every commit not in target branch |
| 2256 | for the project (`TRUE`, `FALSE`, `INHERIT`). |
| 2257 | |`use_content_merge` |`INHERIT` if not set| |
| Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 2258 | Whether content merge should be enabled for the project (`TRUE`, |
| 2259 | `FALSE`, `INHERIT`). + |
| 2260 | `FALSE`, if the `submit_type` is `FAST_FORWARD_ONLY`. |
| Deniz Türkoglu | 5277727 | 2014-09-08 17:02:48 +0200 | [diff] [blame] | 2261 | |`require_change_id` |`INHERIT` if not set| |
| Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 2262 | Whether the usage of Change-Ids is required for the project (`TRUE`, |
| 2263 | `FALSE`, `INHERIT`). |
| Sasa Zivkov | 6b40cb4 | 2013-07-01 15:28:22 +0200 | [diff] [blame] | 2264 | |`max_object_size_limit` |optional| |
| 2265 | Max allowed Git object size for this project. |
| 2266 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| Edwin Kempin | fb053c3 | 2013-12-04 20:32:41 +0100 | [diff] [blame] | 2267 | |`plugin_config_values` |optional| |
| 2268 | Plugin configuration values as map which maps the plugin name to a map |
| 2269 | of parameter names to values. |
| Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 2270 | |========================================= |
| 2271 | |
| Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 2272 | [[project-parent-input]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2273 | === ProjectParentInput |
| Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 2274 | The `ProjectParentInput` entity contains information for setting a |
| 2275 | project parent. |
| 2276 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2277 | [options="header",cols="1,^2,4"] |
| Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 2278 | |============================= |
| 2279 | |Field Name ||Description |
| 2280 | |`parent` ||The name of the parent project. |
| 2281 | |`commit_message`|optional| |
| 2282 | Message that should be used to commit the change of the project parent |
| 2283 | in the `project.config` file to the `refs/meta/config` branch. |
| 2284 | |============================= |
| 2285 | |
| Edwin Kempin | 87504d9 | 2014-07-04 12:59:19 +0200 | [diff] [blame] | 2286 | [[reflog-entry-info]] |
| 2287 | === ReflogEntryInfo |
| 2288 | The `ReflogEntryInfo` entity describes an entry in a reflog. |
| 2289 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2290 | [options="header",cols="1,6"] |
| Edwin Kempin | 87504d9 | 2014-07-04 12:59:19 +0200 | [diff] [blame] | 2291 | |============================ |
| 2292 | |Field Name |Description |
| 2293 | |`old_id` |The old commit ID. |
| 2294 | |`new_id` |The new commit ID. |
| 2295 | |`who` | |
| 2296 | The user performing the change as a |
| 2297 | link:rest-api-changes.html#git-person-info[GitPersonInfo] entity. |
| 2298 | |`comment` |Comment of the reflog entry. |
| 2299 | |============================ |
| 2300 | |
| Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 2301 | [[repository-statistics-info]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2302 | === RepositoryStatisticsInfo |
| Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 2303 | The `RepositoryStatisticsInfo` entity contains information about |
| 2304 | statistics of a Git repository. |
| 2305 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2306 | [options="header",cols="1,6"] |
| Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 2307 | |====================================== |
| 2308 | |Field Name |Description |
| 2309 | |`number_of_loose_objects` |Number of loose objects. |
| 2310 | |`number_of_loose_refs` |Number of loose refs. |
| 2311 | |`number_of_pack_files` |Number of pack files. |
| 2312 | |`number_of_packed_objects`|Number of packed objects. |
| 2313 | |`number_of_packed_refs` |Number of packed refs. |
| 2314 | |`size_of_loose_objects` |Size of loose objects in bytes. |
| 2315 | |`size_of_packed_objects` |Size of packed objects in bytes. |
| 2316 | |====================================== |
| 2317 | |
| David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2318 | [[tag-info]] |
| 2319 | === TagInfo |
| 2320 | The `TagInfo` entity contains information about a tag. |
| 2321 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2322 | [options="header",cols="1,^2,4"] |
| David Pursehouse | 8cc6890 | 2014-10-06 18:17:16 +0900 | [diff] [blame] | 2323 | |========================= |
| 2324 | |Field Name ||Description |
| 2325 | |`ref` ||The ref of the tag. |
| 2326 | |`revision` ||For lightweight tags, the revision of the commit to which the tag |
| 2327 | points. For annotated tags, the revision of the tag object. |
| 2328 | |`object`|Only set for annotated tags.|The revision of the object to which the |
| 2329 | tag points. |
| 2330 | |`message`|Only set for annotated tags.|The tag message. For signed tags, includes |
| 2331 | the signature. |
| David Pursehouse | c9f5a5a | 2015-12-07 19:13:16 +0900 | [diff] [blame] | 2332 | |`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] | 2333 | link:rest-api-changes.html#git-person-info[GitPersonInfo] entity. |
| 2334 | |========================= |
| 2335 | |
| Edwin Kempin | 272402e | 2013-07-15 11:17:36 +0200 | [diff] [blame] | 2336 | [[theme-info]] |
| Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2337 | === ThemeInfo |
| Edwin Kempin | 272402e | 2013-07-15 11:17:36 +0200 | [diff] [blame] | 2338 | The `ThemeInfo` entity describes a theme. |
| 2339 | |
| David Pursehouse | ae36719 | 2014-11-25 17:24:47 +0900 | [diff] [blame] | 2340 | [options="header",cols="1,^2,4"] |
| Edwin Kempin | 272402e | 2013-07-15 11:17:36 +0200 | [diff] [blame] | 2341 | |============================= |
| 2342 | |Field Name ||Description |
| 2343 | |`css` |optional| |
| 2344 | The path to the `GerritSite.css` file. |
| 2345 | |`header` |optional| |
| 2346 | The path to the `GerritSiteHeader.html` file. |
| 2347 | |`footer` |optional| |
| 2348 | The path to the `GerritSiteFooter.html` file. |
| 2349 | |============================= |
| 2350 | |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 2351 | |
| 2352 | GERRIT |
| 2353 | ------ |
| 2354 | Part of link:index.html[Gerrit Code Review] |
| Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 2355 | |
| 2356 | SEARCHBOX |
| 2357 | --------- |