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