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