| Edwin Kempin | 2eebd14 | 2013-03-06 15:28:34 +0100 | [diff] [blame] | 1 | Gerrit Code Review - /projects/ REST API |
| 2 | ======================================== |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 3 | |
| 4 | This page describes the project related REST endpoints. |
| 5 | Please also take note of the general information on the |
| 6 | link:rest-api.html[REST API]. |
| 7 | |
| 8 | Endpoints |
| 9 | --------- |
| 10 | |
| Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 11 | [[project-endpoints]] |
| 12 | Project Endpoints |
| 13 | ----------------- |
| 14 | |
| Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 15 | [[list-projects]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 16 | List Projects |
| 17 | ~~~~~~~~~~~~~ |
| 18 | [verse] |
| 19 | 'GET /projects/' |
| 20 | |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 21 | Lists the projects accessible by the caller. This is the same as |
| 22 | using the link:cmd-ls-projects.html[ls-projects] command over SSH, |
| 23 | and accepts the same options as query parameters. |
| 24 | |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 25 | As result a map is returned that maps the project names to |
| 26 | link:#project-info[ProjectInfo] entries. The entries in the map are sorted |
| 27 | by project name. |
| 28 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 29 | .Request |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 30 | ---- |
| 31 | GET /projects/?d HTTP/1.0 |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 32 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 33 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 34 | .Response |
| 35 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 36 | HTTP/1.1 200 OK |
| 37 | Content-Disposition: attachment |
| 38 | Content-Type: application/json;charset=UTF-8 |
| 39 | |
| 40 | )]}' |
| 41 | { |
| 42 | "external/bison": { |
| 43 | "kind": "gerritcodereview#project", |
| 44 | "id": "external%2Fbison", |
| 45 | "description": "GNU parser generator" |
| 46 | }, |
| 47 | "external/gcc": { |
| 48 | "kind": "gerritcodereview#project", |
| 49 | "id": "external%2Fgcc", |
| 50 | }, |
| 51 | "external/openssl": { |
| 52 | "kind": "gerritcodereview#project", |
| 53 | "id": "external%2Fopenssl", |
| 54 | "description": "encryption\ncrypto routines" |
| 55 | }, |
| 56 | "test": { |
| 57 | "kind": "gerritcodereview#project", |
| 58 | "id": "test", |
| 59 | "description": "\u003chtml\u003e is escaped" |
| 60 | } |
| 61 | } |
| 62 | ---- |
| 63 | |
| Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 64 | .Get all projects with their description |
| 65 | **** |
| 66 | get::/projects/?d |
| 67 | **** |
| 68 | |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 69 | [[suggest-projects]] |
| 70 | The `/projects/` URL also accepts a prefix string in the `p` parameter. |
| 71 | This limits the results to those projects that start with the specified |
| 72 | prefix. |
| 73 | List all projects that start with `platform/`: |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 74 | |
| 75 | .Request |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 76 | ---- |
| 77 | GET /projects/?p=platform%2F HTTP/1.0 |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 78 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 79 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 80 | .Response |
| 81 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 82 | HTTP/1.1 200 OK |
| 83 | Content-Disposition: attachment |
| 84 | Content-Type: application/json;charset=UTF-8 |
| 85 | |
| 86 | )]}' |
| 87 | { |
| 88 | "platform/drivers": { |
| 89 | "kind": "gerritcodereview#project", |
| 90 | "id": "platform%2Fdrivers", |
| 91 | }, |
| 92 | "platform/tools": { |
| 93 | "kind": "gerritcodereview#project", |
| 94 | "id": "platform%2Ftools", |
| 95 | } |
| 96 | } |
| 97 | ---- |
| 98 | E.g. this feature can be used by suggestion client UI's to limit results. |
| 99 | |
| Edwin Kempin | 5c544e2 | 2013-03-06 13:35:45 +0100 | [diff] [blame] | 100 | [[get-project]] |
| 101 | Get Project |
| 102 | ~~~~~~~~~~~ |
| 103 | [verse] |
| 104 | 'GET /projects/link:#project-name[\{project-name\}]' |
| 105 | |
| 106 | Retrieves a project. |
| 107 | |
| 108 | .Request |
| 109 | ---- |
| 110 | GET /projects/plugins%2Freplication HTTP/1.0 |
| 111 | ---- |
| 112 | |
| 113 | As response a link:#project-info[ProjectInfo] entity is returned that |
| 114 | describes the project. |
| 115 | |
| 116 | .Response |
| 117 | ---- |
| 118 | HTTP/1.1 200 OK |
| 119 | Content-Disposition: attachment |
| 120 | Content-Type: application/json;charset=UTF-8 |
| 121 | |
| 122 | )]}' |
| 123 | { |
| 124 | "kind": "gerritcodereview#project", |
| 125 | "id": "plugins%2Freplication", |
| 126 | "name": "plugins/replication", |
| 127 | "parent": "Public-Plugins", |
| 128 | "description": "Copies to other servers using the Git protocol" |
| 129 | } |
| 130 | ---- |
| 131 | |
| Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 132 | [[create-project]] |
| 133 | Create Project |
| 134 | ~~~~~~~~~~~~~~ |
| 135 | [verse] |
| 136 | 'PUT /projects/link:#project-name[\{project-name\}]' |
| 137 | |
| 138 | Creates a new project. |
| 139 | |
| 140 | In the request body additional data for the project can be provided as |
| 141 | link:#project-input[ProjectInput]. |
| 142 | |
| 143 | .Request |
| 144 | ---- |
| 145 | PUT /projects/MyProject HTTP/1.0 |
| 146 | Content-Type: application/json;charset=UTF-8 |
| 147 | |
| 148 | { |
| 149 | "description": "This is a demo project.", |
| 150 | "submit_type": "CHERRY_PICK", |
| 151 | "owners": [ |
| 152 | "MyProject-Owners" |
| 153 | ] |
| 154 | } |
| 155 | ---- |
| 156 | |
| 157 | As response the link:#project-info[ProjectInfo] entity is returned that |
| 158 | describes the created project. |
| 159 | |
| 160 | .Response |
| 161 | ---- |
| 162 | HTTP/1.1 201 Created |
| 163 | Content-Disposition: attachment |
| 164 | Content-Type: application/json;charset=UTF-8 |
| 165 | |
| 166 | )]}' |
| 167 | { |
| 168 | "kind": "gerritcodereview#project", |
| 169 | "id": "MyProject", |
| 170 | "name": "MyProject", |
| 171 | "parent": "All-Projects", |
| 172 | "description": "This is a demo project." |
| 173 | } |
| 174 | ---- |
| 175 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 176 | [[get-project-description]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 177 | Get Project Description |
| 178 | ~~~~~~~~~~~~~~~~~~~~~~~ |
| 179 | [verse] |
| 180 | 'GET /projects/link:#project-name[\{project-name\}]/description' |
| 181 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 182 | Retrieves the description of a project. |
| 183 | |
| 184 | .Request |
| 185 | ---- |
| 186 | GET /projects/plugins%2Freplication/description HTTP/1.0 |
| 187 | ---- |
| 188 | |
| 189 | .Response |
| 190 | ---- |
| 191 | HTTP/1.1 200 OK |
| 192 | Content-Disposition: attachment |
| 193 | Content-Type: application/json;charset=UTF-8 |
| 194 | |
| 195 | )]}' |
| 196 | "Copies to other servers using the Git protocol" |
| 197 | ---- |
| 198 | |
| Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 199 | If the project does not have a description an empty string is returned. |
| 200 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 201 | [[set-project-description]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 202 | Set Project Description |
| 203 | ~~~~~~~~~~~~~~~~~~~~~~~ |
| 204 | [verse] |
| 205 | 'PUT /projects/link:#project-name[\{project-name\}]/description' |
| 206 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 207 | Sets the description of a project. |
| 208 | |
| 209 | The new project description must be provided in the request body inside |
| 210 | a link:#project-description-input[ProjectDescriptionInput] entity. |
| 211 | |
| 212 | .Request |
| 213 | ---- |
| 214 | PUT /projects/plugins%2Freplication/description HTTP/1.0 |
| 215 | Content-Type: application/json;charset=UTF-8 |
| 216 | |
| 217 | { |
| 218 | "description": "Plugin for Gerrit that handles the replication.", |
| 219 | "commit_message": "Update the project description" |
| 220 | } |
| 221 | ---- |
| 222 | |
| 223 | As response the new project description is returned. |
| 224 | |
| 225 | .Response |
| 226 | ---- |
| 227 | HTTP/1.1 200 OK |
| 228 | Content-Disposition: attachment |
| 229 | Content-Type: application/json;charset=UTF-8 |
| 230 | |
| 231 | )]}' |
| 232 | "Plugin for Gerrit that handles the replication." |
| 233 | ---- |
| 234 | |
| Edwin Kempin | 114ab16 | 2013-02-28 09:25:37 +0100 | [diff] [blame] | 235 | If the description was deleted the response is "`204 No Content`". |
| 236 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 237 | [[delete-project-description]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 238 | Delete Project Description |
| 239 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 240 | [verse] |
| 241 | 'DELETE /projects/link:#project-name[\{project-name\}]/description' |
| 242 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 243 | Deletes the description of a project. |
| 244 | |
| Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 245 | The request body does not need to include a |
| 246 | link:#project-description-input[ProjectDescriptionInput] entity if no |
| 247 | commit message is specified. |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 248 | |
| Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 249 | Please note that some proxies prohibit request bodies for DELETE |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 250 | requests. In this case, if you want to specify a commit message, use |
| 251 | link:#set-project-description[PUT] to delete the description. |
| 252 | |
| 253 | .Request |
| 254 | ---- |
| 255 | DELETE /projects/plugins%2Freplication/description HTTP/1.0 |
| 256 | ---- |
| 257 | |
| 258 | .Response |
| 259 | ---- |
| 260 | HTTP/1.1 204 No Content |
| 261 | ---- |
| 262 | |
| Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 263 | [[get-project-parent]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 264 | Get Project Parent |
| 265 | ~~~~~~~~~~~~~~~~~~ |
| 266 | [verse] |
| 267 | 'GET /projects/link:#project-name[\{project-name\}]/parent' |
| 268 | |
| Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 269 | Retrieves the name of a project's parent project. For the |
| 270 | `All-Projects` root project an empty string is returned. |
| 271 | |
| 272 | .Request |
| 273 | ---- |
| 274 | GET /projects/plugins%2Freplication/parent HTTP/1.0 |
| 275 | ---- |
| 276 | |
| 277 | .Response |
| 278 | ---- |
| 279 | HTTP/1.1 200 OK |
| 280 | Content-Disposition: attachment |
| 281 | Content-Type: application/json;charset=UTF-8 |
| 282 | |
| 283 | )]}' |
| 284 | "All-Projects" |
| 285 | ---- |
| 286 | |
| 287 | [[set-project-parent]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 288 | Set Project Parent |
| 289 | ~~~~~~~~~~~~~~~~~~ |
| 290 | [verse] |
| 291 | 'PUT /projects/link:#project-name[\{project-name\}]/parent' |
| 292 | |
| Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 293 | Sets the parent project for a project. |
| 294 | |
| 295 | The new name of the parent project must be provided in the request body |
| 296 | inside a link:#project-parent-input[ProjectParentInput] entity. |
| 297 | |
| 298 | .Request |
| 299 | ---- |
| 300 | PUT /projects/plugins%2Freplication/parent HTTP/1.0 |
| 301 | Content-Type: application/json;charset=UTF-8 |
| 302 | |
| 303 | { |
| 304 | "parent": "Public-Plugins", |
| 305 | "commit_message": "Update the project parent" |
| 306 | } |
| 307 | ---- |
| 308 | |
| 309 | As response the new parent project name is returned. |
| 310 | |
| 311 | .Response |
| 312 | ---- |
| 313 | HTTP/1.1 200 OK |
| 314 | Content-Disposition: attachment |
| 315 | Content-Type: application/json;charset=UTF-8 |
| 316 | |
| 317 | )]}' |
| 318 | "Public-Plugins" |
| 319 | ---- |
| 320 | |
| Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 321 | [[get-head]] |
| 322 | Get HEAD |
| 323 | ~~~~~~~~ |
| 324 | [verse] |
| 325 | 'GET /projects/link:#project-name[\{project-name\}]/HEAD' |
| 326 | |
| 327 | Retrieves for a project the name of the branch to which `HEAD` points. |
| 328 | |
| 329 | .Request |
| 330 | ---- |
| 331 | GET /projects/plugins%2Freplication/HEAD HTTP/1.0 |
| 332 | ---- |
| 333 | |
| 334 | .Response |
| 335 | ---- |
| 336 | HTTP/1.1 200 OK |
| 337 | Content-Disposition: attachment |
| 338 | Content-Type: application/json;charset=UTF-8 |
| 339 | |
| 340 | )]}' |
| 341 | "refs/heads/master" |
| 342 | ---- |
| 343 | |
| 344 | [[set-head]] |
| 345 | Set HEAD |
| 346 | ~~~~~~~~ |
| 347 | [verse] |
| 348 | 'PUT /projects/link:#project-name[\{project-name\}]/HEAD' |
| 349 | |
| 350 | Sets `HEAD` for a project. |
| 351 | |
| 352 | The new ref to which `HEAD` should point must be provided in the |
| 353 | request body inside a link:#head-input[HeadInput] entity. |
| 354 | |
| 355 | .Request |
| 356 | ---- |
| 357 | PUT /projects/plugins%2Freplication/HEAD HTTP/1.0 |
| 358 | Content-Type: application/json;charset=UTF-8 |
| 359 | |
| 360 | { |
| 361 | "ref": "refs/heads/stable" |
| 362 | } |
| 363 | ---- |
| 364 | |
| 365 | As response the new ref to which `HEAD` points is returned. |
| 366 | |
| 367 | .Response |
| 368 | ---- |
| 369 | HTTP/1.1 200 OK |
| 370 | Content-Disposition: attachment |
| 371 | Content-Type: application/json;charset=UTF-8 |
| 372 | |
| 373 | )]}' |
| 374 | "refs/heads/stable" |
| 375 | ---- |
| 376 | |
| Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 377 | [[get-repository-statistics]] |
| 378 | Get Repository Statistics |
| 379 | ~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 380 | [verse] |
| 381 | 'GET /projects/link:#project-name[\{project-name\}]/statistics.git' |
| 382 | |
| 383 | Return statistics for the repository of a project. |
| 384 | |
| 385 | .Request |
| 386 | ---- |
| 387 | GET /projects/plugins%2Freplication/statistics.git HTTP/1.0 |
| 388 | ---- |
| 389 | |
| 390 | The repository statistics are returned as a |
| 391 | link:#repository-statistics-info[RepositoryStatisticsInfo] entity. |
| 392 | |
| 393 | .Response |
| 394 | ---- |
| 395 | HTTP/1.1 200 OK |
| 396 | Content-Disposition: attachment |
| 397 | Content-Type: application/json;charset=UTF-8 |
| 398 | |
| 399 | )]}' |
| 400 | { |
| 401 | "number_of_loose_objects": 127, |
| 402 | "number_of_loose_refs": 15, |
| 403 | "number_of_pack_files": 15, |
| 404 | "number_of_packed_objects": 67, |
| 405 | "number_of_packed_refs": 0, |
| 406 | "size_of_loose_objects": 29466, |
| 407 | "size_of_packed_objects": 9646 |
| 408 | } |
| 409 | ---- |
| 410 | |
| Dave Borowitz | 237073a | 2013-04-04 16:52:27 -0700 | [diff] [blame] | 411 | [[get-config]] |
| 412 | Get Config |
| 413 | ~~~~~~~~~~ |
| 414 | [verse] |
| 415 | 'GET /projects/link:#project-name[\{project-name\}]/config' |
| 416 | |
| 417 | Gets some configuration information about a project. Note that this |
| 418 | config info is not simply the contents of `project.config`; it generally |
| 419 | contains fields that may have been inherited from parent projects. |
| 420 | |
| 421 | .Request |
| 422 | ---- |
| 423 | GET /projects/myproject/config |
| 424 | ---- |
| 425 | |
| 426 | A link:#config-info[ConfigInfo] entity is returned that describes the |
| 427 | project configuration. Some fields are only visible to users that have |
| 428 | read access to `refs/meta/config`. |
| 429 | |
| 430 | .Response |
| 431 | ---- |
| 432 | HTTP/1.1 200 OK |
| 433 | Content-Disposition: attachment |
| 434 | Content-Type: application/json;charset=UTF-8 |
| 435 | |
| 436 | )]}' |
| 437 | { |
| 438 | "kind": "gerritcodereview#project_config", |
| 439 | "use_contributor_agreements": false, |
| 440 | "use_content_merge": true, |
| 441 | "use_signed_off_by": false, |
| Dave Borowitz | 2002789 | 2013-04-08 10:42:23 -0700 | [diff] [blame] | 442 | "require_change_id": true, |
| 443 | "commentlinks": {} |
| Dave Borowitz | 237073a | 2013-04-04 16:52:27 -0700 | [diff] [blame] | 444 | } |
| 445 | ---- |
| 446 | |
| Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 447 | [[run-gc]] |
| 448 | Run GC |
| 449 | ~~~~~~ |
| 450 | [verse] |
| 451 | 'POST /projects/link:#project-name[\{project-name\}]/gc' |
| 452 | |
| 453 | Run the Git garbage collection for the repository of a project. |
| 454 | |
| 455 | .Request |
| 456 | ---- |
| 457 | POST /projects/plugins%2Freplication/gc HTTP/1.0 |
| 458 | ---- |
| 459 | |
| 460 | The response is the streamed output of the garbage collection. |
| 461 | |
| 462 | .Response |
| 463 | ---- |
| 464 | HTTP/1.1 200 OK |
| 465 | Content-Disposition: attachment |
| 466 | Content-Type: text/plain;charset=UTF-8 |
| 467 | |
| 468 | collecting garbage for "plugins/replication": |
| 469 | Pack refs: 100% (21/21) |
| 470 | Counting objects: 20 |
| 471 | Finding sources: 100% (20/20) |
| 472 | Getting sizes: 100% (13/13) |
| 473 | Compressing objects: 83% (5/6) |
| 474 | Writing objects: 100% (20/20) |
| 475 | Selecting commits: 100% (7/7) |
| 476 | Building bitmaps: 100% (7/7) |
| 477 | Finding sources: 100% (41/41) |
| 478 | Getting sizes: 100% (25/25) |
| 479 | Compressing objects: 52% (12/23) |
| 480 | Writing objects: 100% (41/41) |
| 481 | Prune loose objects also found in pack files: 100% (36/36) |
| 482 | Prune loose, unreferenced objects: 100% (36/36) |
| 483 | done. |
| 484 | ---- |
| 485 | |
| Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame^] | 486 | [[branch-endpoints]] |
| 487 | Branch Endpoints |
| 488 | ---------------- |
| 489 | |
| 490 | [[list-branches]] |
| 491 | List Branches |
| 492 | ~~~~~~~~~~~~~ |
| 493 | [verse] |
| 494 | 'GET /projects/link:#project-name[\{project-name\}]/branches/' |
| 495 | |
| 496 | List the branches of a project. |
| 497 | |
| 498 | As result a list of link:#branch-info[BranchInfo] entries is |
| 499 | returned. |
| 500 | |
| 501 | .Request |
| 502 | ---- |
| 503 | GET /projects/work%2Fmy-project/branches/ HTTP/1.0 |
| 504 | ---- |
| 505 | |
| 506 | .Response |
| 507 | ---- |
| 508 | HTTP/1.1 200 OK |
| 509 | Content-Disposition: attachment |
| 510 | Content-Type: application/json;charset=UTF-8 |
| 511 | |
| 512 | )]}' |
| 513 | [ |
| 514 | { |
| 515 | "ref": "HEAD", |
| 516 | "revision": "master" |
| 517 | }, |
| 518 | { |
| 519 | "ref": "refs/meta/config", |
| 520 | "revision": "76016386a0d8ecc7b6be212424978bb45959d668" |
| 521 | }, |
| 522 | { |
| 523 | "ref": "refs/heads/master", |
| 524 | "revision": "67ebf73496383c6777035e374d2d664009e2aa5c" |
| 525 | }, |
| 526 | { |
| 527 | "ref": "refs/heads/stable", |
| 528 | "revision": "64ca533bd0eb5252d2fee83f63da67caae9b4674", |
| 529 | "can_delete": true |
| 530 | } |
| 531 | ] |
| 532 | ---- |
| 533 | |
| Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 534 | [[child-project-endpoints]] |
| 535 | Child Project Endpoints |
| 536 | ----------------------- |
| 537 | |
| 538 | [[list-child-projects]] |
| 539 | List Child Projects |
| 540 | ~~~~~~~~~~~~~~~~~~~ |
| 541 | [verse] |
| 542 | 'GET /projects/link:#project-name[\{project-name\}]/children/' |
| 543 | |
| 544 | List the direct child projects of a project. |
| 545 | |
| 546 | .Request |
| 547 | ---- |
| 548 | GET /projects/Public-Plugins/children/ HTTP/1.0 |
| 549 | ---- |
| 550 | |
| 551 | As result a list of link:#project-info[ProjectInfo] entries is |
| 552 | returned that describe the child projects. |
| 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 | [ |
| 562 | { |
| 563 | "kind": "gerritcodereview#project", |
| 564 | "id": "plugins%2Freplication", |
| 565 | "name": "plugins/replication", |
| 566 | "parent": "Public-Plugins", |
| 567 | "description": "Copies to other servers using the Git protocol" |
| 568 | }, |
| 569 | { |
| 570 | "kind": "gerritcodereview#project", |
| 571 | "id": "plugins%2Freviewnotes", |
| 572 | "name": "plugins/reviewnotes", |
| 573 | "parent": "Public-Plugins", |
| 574 | "description": "Annotates merged commits using notes on refs/notes/review." |
| 575 | }, |
| 576 | { |
| 577 | "kind": "gerritcodereview#project", |
| 578 | "id": "plugins%2Fsingleusergroup", |
| 579 | "name": "plugins/singleusergroup", |
| 580 | "parent": "Public-Plugins", |
| 581 | "description": "GroupBackend enabling users to be directly added to access rules" |
| 582 | } |
| 583 | ] |
| 584 | ---- |
| 585 | |
| Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 586 | To resolve the child projects of a project recursively the parameter |
| 587 | `recursive` can be set. |
| 588 | |
| 589 | Child projects that are not visible to the calling user are ignored and |
| 590 | are not resolved further. |
| 591 | |
| 592 | .Request |
| 593 | ---- |
| 594 | GET /projects/Public-Projects/children/?recursive HTTP/1.0 |
| 595 | ---- |
| 596 | |
| 597 | .Response |
| 598 | ---- |
| 599 | HTTP/1.1 200 OK |
| 600 | Content-Disposition: attachment |
| 601 | Content-Type: application/json;charset=UTF-8 |
| 602 | |
| 603 | )]}' |
| 604 | [ |
| 605 | { |
| 606 | "kind": "gerritcodereview#project", |
| 607 | "id": "gerrit", |
| 608 | "name": "gerrit", |
| 609 | "parent": "Public-Projects", |
| 610 | "description": "Gerrit Code Review" |
| 611 | }, |
| 612 | { |
| 613 | "kind": "gerritcodereview#project", |
| 614 | "id": "plugins%2Freplication", |
| 615 | "name": "plugins/replication", |
| 616 | "parent": "Public-Plugins", |
| 617 | "description": "Copies to other servers using the Git protocol" |
| 618 | }, |
| 619 | { |
| 620 | "kind": "gerritcodereview#project", |
| 621 | "id": "plugins%2Freviewnotes", |
| 622 | "name": "plugins/reviewnotes", |
| 623 | "parent": "Public-Plugins", |
| 624 | "description": "Annotates merged commits using notes on refs/notes/review." |
| 625 | }, |
| 626 | { |
| 627 | "kind": "gerritcodereview#project", |
| 628 | "id": "plugins%2Fsingleusergroup", |
| 629 | "name": "plugins/singleusergroup", |
| 630 | "parent": "Public-Plugins", |
| 631 | "description": "GroupBackend enabling users to be directly added to access rules" |
| 632 | }, |
| 633 | { |
| 634 | "kind": "gerritcodereview#project", |
| 635 | "id": "Public-Plugins", |
| 636 | "name": "Public-Plugins", |
| 637 | "parent": "Public-Projects", |
| 638 | "description": "Parent project for plugins/*" |
| 639 | } |
| 640 | ] |
| 641 | ---- |
| 642 | |
| Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 643 | [[get-child-project]] |
| 644 | Get Child Project |
| 645 | ~~~~~~~~~~~~~~~~~ |
| 646 | [verse] |
| 647 | 'GET /projects/link:#project-name[\{project-name\}]/children/link:#project-name[\{project-name\}]' |
| 648 | |
| Edwin Kempin | 8a3fb5b | 2013-03-21 15:02:22 +0100 | [diff] [blame] | 649 | Retrieves a child project. If a non-direct child project should be |
| 650 | retrieved the parameter `recursive` must be set. |
| Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 651 | |
| 652 | .Request |
| 653 | ---- |
| 654 | GET /projects/Public-Plugins/children/plugins%2Freplication HTTP/1.0 |
| 655 | ---- |
| 656 | |
| 657 | As response a link:#project-info[ProjectInfo] entity is returned that |
| 658 | describes the child project. |
| 659 | |
| 660 | .Response |
| 661 | ---- |
| 662 | HTTP/1.1 200 OK |
| 663 | Content-Disposition: attachment |
| 664 | Content-Type: application/json;charset=UTF-8 |
| 665 | |
| 666 | )]}' |
| 667 | { |
| 668 | "kind": "gerritcodereview#project", |
| 669 | "id": "plugins%2Freplication", |
| 670 | "name": "plugins/replication", |
| 671 | "parent": "Public-Plugins", |
| 672 | "description": "Copies to other servers using the Git protocol" |
| 673 | } |
| 674 | ---- |
| 675 | |
| Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 676 | [[dashboard-endpoints]] |
| 677 | Dashboard Endpoints |
| 678 | ------------------- |
| 679 | |
| Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 680 | [[list-dashboards]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 681 | List Dashboards |
| 682 | ~~~~~~~~~~~~~~~ |
| 683 | [verse] |
| 684 | 'GET /projects/link:#project-name[\{project-name\}]/dashboards/' |
| 685 | |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 686 | List custom dashboards for a project. |
| 687 | |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 688 | As result a list of link:#dashboard-info[DashboardInfo] entries is |
| 689 | returned. |
| 690 | |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 691 | List all dashboards for the `work/my-project` project: |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 692 | |
| 693 | .Request |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 694 | ---- |
| 695 | GET /projects/work%2Fmy-project/dashboards/ HTTP/1.0 |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 696 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 697 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 698 | .Response |
| 699 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 700 | HTTP/1.1 200 OK |
| 701 | Content-Disposition: attachment |
| 702 | Content-Type: application/json;charset=UTF-8 |
| 703 | |
| 704 | )]}' |
| 705 | [ |
| 706 | { |
| 707 | "kind": "gerritcodereview#dashboard", |
| 708 | "id": "main:closed", |
| 709 | "ref": "main", |
| 710 | "path": "closed", |
| 711 | "description": "Merged and abandoned changes in last 7 weeks", |
| 712 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 713 | "default": true, |
| 714 | "title": "Closed changes", |
| 715 | "sections": [ |
| 716 | { |
| 717 | "name": "Merged", |
| 718 | "query": "status:merged age:7w" |
| 719 | }, |
| 720 | { |
| 721 | "name": "Abandoned", |
| 722 | "query": "status:abandoned age:7w" |
| 723 | } |
| 724 | ] |
| 725 | } |
| 726 | ] |
| 727 | ---- |
| 728 | |
| Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 729 | .Get all dashboards of the 'All-Projects' project |
| 730 | **** |
| 731 | get::/projects/All-Projects/dashboards/ |
| 732 | **** |
| 733 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 734 | [[get-dashboard]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 735 | Get Dashboard |
| 736 | ~~~~~~~~~~~~~ |
| 737 | [verse] |
| 738 | 'GET /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]' |
| 739 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 740 | Retrieves a project dashboard. The dashboard can be defined on that |
| 741 | project or be inherited from a parent project. |
| 742 | |
| 743 | .Request |
| 744 | ---- |
| 745 | GET /projects/work%2Fmy-project/dashboards/main:closed HTTP/1.0 |
| 746 | ---- |
| 747 | |
| 748 | As response a link:#dashboard-info[DashboardInfo] entity is returned |
| 749 | that describes the dashboard. |
| 750 | |
| 751 | .Response |
| 752 | ---- |
| 753 | HTTP/1.1 200 OK |
| 754 | Content-Disposition: attachment |
| 755 | Content-Type: application/json;charset=UTF-8 |
| 756 | |
| 757 | )]}' |
| 758 | { |
| 759 | "kind": "gerritcodereview#dashboard", |
| 760 | "id": "main:closed", |
| 761 | "ref": "main", |
| 762 | "path": "closed", |
| 763 | "description": "Merged and abandoned changes in last 7 weeks", |
| 764 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 765 | "default": true, |
| 766 | "title": "Closed changes", |
| 767 | "sections": [ |
| 768 | { |
| 769 | "name": "Merged", |
| 770 | "query": "status:merged age:7w" |
| 771 | }, |
| 772 | { |
| 773 | "name": "Abandoned", |
| 774 | "query": "status:abandoned age:7w" |
| 775 | } |
| 776 | ] |
| 777 | } |
| 778 | ---- |
| 779 | |
| 780 | To retrieve the default dashboard of a project use `default` as |
| 781 | dashboard-id. |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 782 | |
| 783 | .Request |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 784 | ---- |
| 785 | GET /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 786 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 787 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 788 | .Response |
| 789 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 790 | HTTP/1.1 200 OK |
| 791 | Content-Disposition: attachment |
| 792 | Content-Type: application/json;charset=UTF-8 |
| 793 | |
| 794 | )]}' |
| 795 | { |
| 796 | "kind": "gerritcodereview#dashboard", |
| 797 | "id": "main:closed", |
| 798 | "ref": "main", |
| 799 | "path": "closed", |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 800 | "description": "Merged and abandoned changes in last 7 weeks", |
| 801 | "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] | 802 | "default": true, |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 803 | "title": "Closed changes", |
| 804 | "sections": [ |
| 805 | { |
| 806 | "name": "Merged", |
| 807 | "query": "status:merged age:7w" |
| 808 | }, |
| 809 | { |
| 810 | "name": "Abandoned", |
| 811 | "query": "status:abandoned age:7w" |
| 812 | } |
| 813 | ] |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 814 | } |
| 815 | ---- |
| 816 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 817 | [[set-dashboard]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 818 | Set Dashboard |
| 819 | ~~~~~~~~~~~~~ |
| 820 | [verse] |
| 821 | 'PUT /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]' |
| 822 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 823 | Updates/Creates a project dashboard. |
| 824 | |
| 825 | Currently only supported for the `default` dashboard. |
| 826 | |
| 827 | The creation/update information for the dashboard must be provided in |
| 828 | the request body as a link:#dashboard-input[DashboardInput] entity. |
| 829 | |
| 830 | .Request |
| 831 | ---- |
| 832 | PUT /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| 833 | Content-Type: application/json;charset=UTF-8 |
| 834 | |
| 835 | { |
| 836 | "id": "main:closed", |
| 837 | "commit_message": "Define the default dashboard" |
| 838 | } |
| 839 | ---- |
| 840 | |
| 841 | As response the new/updated dashboard is returned as a |
| 842 | link:#dashboard-info[DashboardInfo] entity. |
| 843 | |
| 844 | .Response |
| 845 | ---- |
| 846 | HTTP/1.1 200 OK |
| 847 | Content-Disposition: attachment |
| 848 | Content-Type: application/json;charset=UTF-8 |
| 849 | |
| 850 | )]}' |
| 851 | { |
| 852 | "kind": "gerritcodereview#dashboard", |
| 853 | "id": "main:closed", |
| 854 | "ref": "main", |
| 855 | "path": "closed", |
| 856 | "description": "Merged and abandoned changes in last 7 weeks", |
| 857 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 858 | "default": true, |
| 859 | "title": "Closed changes", |
| 860 | "sections": [ |
| 861 | { |
| 862 | "name": "Merged", |
| 863 | "query": "status:merged age:7w" |
| 864 | }, |
| 865 | { |
| 866 | "name": "Abandoned", |
| 867 | "query": "status:abandoned age:7w" |
| 868 | } |
| 869 | ] |
| 870 | } |
| 871 | ---- |
| 872 | |
| 873 | [[delete-dashboard]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 874 | Delete Dashboard |
| 875 | ~~~~~~~~~~~~~~~~ |
| 876 | [verse] |
| 877 | 'DELETE /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]' |
| 878 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 879 | Deletes a project dashboard. |
| 880 | |
| 881 | Currently only supported for the `default` dashboard. |
| 882 | |
| Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 883 | The request body does not need to include a link:#dashboard-input[ |
| John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 884 | DashboardInput] entity if no commit message is specified. |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 885 | |
| 886 | Please note that some proxies prohibit request bodies for DELETE |
| 887 | requests. |
| 888 | |
| 889 | .Request |
| 890 | ---- |
| 891 | DELETE /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| 892 | ---- |
| 893 | |
| 894 | .Response |
| 895 | ---- |
| 896 | HTTP/1.1 204 No Content |
| 897 | ---- |
| 898 | |
| Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 899 | |
| 900 | [[ids]] |
| 901 | IDs |
| 902 | --- |
| 903 | |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 904 | [[dashboard-id]] |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 905 | \{dashboard-id\} |
| 906 | ~~~~~~~~~~~~~~~~ |
| 907 | The ID of a dashboard in the format '<ref>:<path>'. |
| 908 | |
| 909 | A special dashboard ID is `default` which represents the default |
| 910 | dashboard of a project. |
| 911 | |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 912 | [[project-name]] |
| Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 913 | \{project-name\} |
| 914 | ~~~~~~~~~~~~~~~~ |
| 915 | The name of the project. |
| 916 | |
| 917 | |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 918 | [[json-entities]] |
| 919 | JSON Entities |
| 920 | ------------- |
| 921 | |
| Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame^] | 922 | [[branch-info]] |
| 923 | BranchInfo |
| 924 | ~~~~~~~~~~ |
| 925 | The `BranchInfo` entity contains information about a branch. |
| 926 | |
| 927 | [options="header",width="50%",cols="1,^2,4"] |
| 928 | |========================= |
| 929 | |Field Name ||Description |
| 930 | |`ref` ||The ref of the branch. |
| 931 | |`revision` ||The revision to which the branch points. |
| 932 | |`can_delete`|`false` if not set| |
| 933 | Whether the calling user can delete this branch. |
| 934 | |========================= |
| 935 | |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 936 | [[dashboard-info]] |
| 937 | DashboardInfo |
| 938 | ~~~~~~~~~~~~~ |
| 939 | The `DashboardInfo` entity contains information about a project |
| 940 | dashboard. |
| 941 | |
| 942 | [options="header",width="50%",cols="1,^2,4"] |
| 943 | |=============================== |
| 944 | |Field Name ||Description |
| 945 | |`kind` ||`gerritcodereview#dashboard` |
| 946 | |`id` || |
| 947 | The ID of the dashboard. The ID has the format '<ref>:<path>', |
| 948 | where ref and path are URL encoded. |
| 949 | |`project` || |
| 950 | The name of the project for which this dashboard is returned. |
| 951 | |`defining_project`|| |
| 952 | The name of the project in which this dashboard is defined. |
| 953 | This is different from `project` if the dashboard is inherited from a |
| 954 | parent project. |
| 955 | |`ref` || |
| 956 | The name of the ref in which the dashboard is defined, without the |
| 957 | `refs/meta/dashboards/` prefix, which is common for all dashboard refs. |
| 958 | |`path` || |
| 959 | The path of the file in which the dashboard is defined. |
| 960 | |`description` |optional|The description of the dashboard. |
| 961 | |`foreach` |optional| |
| 962 | Subquery that applies to all sections in the dashboard. + |
| 963 | Tokens such as `${project}` are not resolved. |
| 964 | |`url` || |
| 965 | The URL under which the dashboard can be opened in the Gerrit WebUI. + |
| 966 | The URL is relative to the canonical web URL. + |
| 967 | Tokens in the queries such as `${project}` are resolved. |
| 968 | |`default` |not set if `false`| |
| 969 | Whether this is the default dashboard of the project. |
| 970 | |`title` |optional|The title of the dashboard. |
| 971 | |`sections` || |
| 972 | The list of link:#dashboard-section-info[sections] in the dashboard. |
| 973 | |=============================== |
| 974 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 975 | [[dashboard-input]] |
| 976 | DashboardInput |
| 977 | ~~~~~~~~~~~~~~ |
| 978 | The `DashboardInput` entity contains information to create/update a |
| 979 | project dashboard. |
| 980 | |
| 981 | [options="header",width="50%",cols="1,^2,4"] |
| 982 | |============================= |
| 983 | |Field Name ||Description |
| 984 | |`id` |optional| |
| Edwin Kempin | c95c508 | 2013-03-12 16:56:25 +0100 | [diff] [blame] | 985 | 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] | 986 | |`commit_message`|optional| |
| 987 | Message that should be used to commit the change of the dashboard. |
| 988 | |============================= |
| 989 | |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 990 | [[dashboard-section-info]] |
| 991 | DashboardSectionInfo |
| 992 | ~~~~~~~~~~~~~~~~~~~~ |
| 993 | The `DashboardSectionInfo` entity contains information about a section |
| 994 | in a dashboard. |
| 995 | |
| 996 | [options="header",width="50%",cols="1,6"] |
| 997 | |=========================== |
| 998 | |Field Name |Description |
| 999 | |`name` |The title of the section. |
| 1000 | |`query` |The query of the section. + |
| 1001 | Tokens such as `${project}` are not resolved. |
| 1002 | |=========================== |
| 1003 | |
| Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 1004 | [[head-input]] |
| 1005 | HeadInput |
| 1006 | ~~~~~~~~~ |
| 1007 | The `HeadInput` entity contains information for setting `HEAD` for a |
| 1008 | project. |
| 1009 | |
| 1010 | [options="header",width="50%",cols="1,6"] |
| 1011 | |============================ |
| 1012 | |Field Name |Description |
| 1013 | |`ref` | |
| 1014 | The ref to which `HEAD` should be set, the `refs/heads` prefix can be |
| 1015 | omitted. |
| 1016 | |============================ |
| 1017 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 1018 | [[project-description-input]] |
| 1019 | ProjectDescriptionInput |
| 1020 | ~~~~~~~~~~~~~~~~~~~~~~~ |
| 1021 | The `ProjectDescriptionInput` entity contains information for setting a |
| 1022 | project description. |
| 1023 | |
| 1024 | [options="header",width="50%",cols="1,^2,4"] |
| 1025 | |============================= |
| 1026 | |Field Name ||Description |
| 1027 | |`description` |optional|The project description. + |
| 1028 | The project description will be deleted if not set. |
| 1029 | |`commit_message`|optional| |
| 1030 | Message that should be used to commit the change of the project |
| 1031 | description in the `project.config` file to the `refs/meta/config` |
| 1032 | branch. |
| 1033 | |============================= |
| 1034 | |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 1035 | [[project-info]] |
| 1036 | ProjectInfo |
| 1037 | ~~~~~~~~~~~ |
| 1038 | The `ProjectInfo` entity contains information about a project. |
| 1039 | |
| 1040 | [options="header",width="50%",cols="1,^2,4"] |
| 1041 | |=========================== |
| 1042 | |Field Name ||Description |
| 1043 | |`kind` ||`gerritcodereview#project` |
| 1044 | |`id` ||The URL encoded project name. |
| 1045 | |`name` | |
| 1046 | not set if returned in a map where the project name is used as map key| |
| 1047 | The name of the project. |
| Edwin Kempin | f361182 | 2013-03-19 08:23:09 +0100 | [diff] [blame] | 1048 | |`parent` |optional| |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 1049 | The name of the parent project. + |
| 1050 | `?-<n>` if the parent project is not visible (`<n>` is a number which |
| 1051 | is increased for each non-visible project). |
| 1052 | |`description` |optional|The description of the project. |
| 1053 | |`branches` |optional|Map of branch names to HEAD revisions. |
| 1054 | |=========================== |
| 1055 | |
| Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 1056 | [[project-input]] |
| 1057 | ProjectInput |
| 1058 | ~~~~~~~~~~~~ |
| 1059 | The `ProjectInput` entity contains information for the creation of |
| 1060 | a new project. |
| 1061 | |
| 1062 | [options="header",width="50%",cols="1,^2,4"] |
| 1063 | |========================================= |
| 1064 | |Field Name ||Description |
| 1065 | |`name` |optional| |
| 1066 | The name of the project (not encoded). + |
| 1067 | If set, must match the project name in the URL. |
| 1068 | |`parent` |optional| |
| 1069 | The name of the parent project. + |
| 1070 | If not set, the `All-Projects` project will be the parent project. |
| 1071 | |`description` |optional|The description of the project. |
| 1072 | |`permissions_only` |`false` if not set| |
| 1073 | Whether a permission-only project should be created. |
| 1074 | |`create_empty_commit` |`false` if not set| |
| 1075 | Whether an empty initial commit should be created. |
| 1076 | |`submit_type` |optional| |
| 1077 | The submit type that should be set for the project |
| 1078 | (`MERGE_IF_NECESSARY`, `REBASE_IF_NECESSARY`, `FAST_FORWARD_ONLY`, |
| 1079 | `MERGE_ALWAYS`, `CHERRY_PICK`). + |
| 1080 | If not set, `MERGE_IF_NECESSARY` is set as submit type. |
| 1081 | |`branches` |optional| |
| 1082 | A list of branches that should be initially created. + |
| 1083 | For the branch names the `refs/heads/` prefix can be omitted. |
| 1084 | |`owners` |optional| |
| 1085 | A list of groups that should be assigned as project owner. + |
| 1086 | Each group in the list must be specified as |
| 1087 | link:rest-api-groups.html#group-id[group-id]. + |
| 1088 | If not set, the link:config-gerrit.html#repository.name.ownerGroup[ |
| 1089 | groups that are configured as default owners] are set as project |
| 1090 | owners. |
| 1091 | |`use_contributor_agreements`|`INHERIT` if not set| |
| 1092 | Whether contributor agreements should be used for the project (`TRUE`, |
| 1093 | `FALSE`, `INHERIT`). |
| 1094 | |`use_signed_off_by` |`INHERIT` if not set| |
| 1095 | Whether the usage of 'Signed-Off-By' footers is required for the |
| 1096 | project (`TRUE`, `FALSE`, `INHERIT`). |
| 1097 | |`use_content_merge` |`INHERIT` if not set| |
| 1098 | Whether content merge should be enabled for the project (`TRUE`, |
| 1099 | `FALSE`, `INHERIT`). + |
| 1100 | `FALSE`, if the `submit_type` is `FAST_FORWARD_ONLY`. |
| 1101 | |`require_change_id` |`INHERIT` if not set| |
| 1102 | Whether the usage of Change-Ids is required for the project (`TRUE`, |
| 1103 | `FALSE`, `INHERIT`). |
| 1104 | |========================================= |
| 1105 | |
| Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 1106 | [[project-parent-input]] |
| 1107 | ProjectParentInput |
| 1108 | ~~~~~~~~~~~~~~~~~~ |
| 1109 | The `ProjectParentInput` entity contains information for setting a |
| 1110 | project parent. |
| 1111 | |
| 1112 | [options="header",width="50%",cols="1,^2,4"] |
| 1113 | |============================= |
| 1114 | |Field Name ||Description |
| 1115 | |`parent` ||The name of the parent project. |
| 1116 | |`commit_message`|optional| |
| 1117 | Message that should be used to commit the change of the project parent |
| 1118 | in the `project.config` file to the `refs/meta/config` branch. |
| 1119 | |============================= |
| 1120 | |
| Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 1121 | [[repository-statistics-info]] |
| 1122 | RepositoryStatisticsInfo |
| 1123 | ~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1124 | The `RepositoryStatisticsInfo` entity contains information about |
| 1125 | statistics of a Git repository. |
| 1126 | |
| 1127 | [options="header",width="50%",cols="1,6"] |
| 1128 | |====================================== |
| 1129 | |Field Name |Description |
| 1130 | |`number_of_loose_objects` |Number of loose objects. |
| 1131 | |`number_of_loose_refs` |Number of loose refs. |
| 1132 | |`number_of_pack_files` |Number of pack files. |
| 1133 | |`number_of_packed_objects`|Number of packed objects. |
| 1134 | |`number_of_packed_refs` |Number of packed refs. |
| 1135 | |`size_of_loose_objects` |Size of loose objects in bytes. |
| 1136 | |`size_of_packed_objects` |Size of packed objects in bytes. |
| 1137 | |====================================== |
| 1138 | |
| Dave Borowitz | 237073a | 2013-04-04 16:52:27 -0700 | [diff] [blame] | 1139 | [[config-info]] |
| 1140 | ConfigInfo |
| 1141 | ~~~~~~~~~~ |
| 1142 | The `ConfigInfo` entity contains information about the effective project |
| 1143 | configuration. |
| 1144 | |
| 1145 | Fields marked with * are only visible to users who have read access to |
| 1146 | `refs/meta/config`. |
| 1147 | |
| 1148 | [options="header",width="50%",cols="1,6"] |
| 1149 | |====================================== |
| 1150 | |Field Name |Description |
| 1151 | |`use_contributor_agreements*`| |
| 1152 | If set, authors must complete a contributor agreement on the site |
| 1153 | before pushing any commits or changes to this project. |
| 1154 | |`use_content_merge*`| |
| 1155 | If set, Gerrit will try to perform a 3-way merge of text file content |
| 1156 | when a file has been modified by both the destination branch and the |
| 1157 | change being submitted. This option only takes effect if submit type is |
| 1158 | not FAST_FORWARD_ONLY. |
| 1159 | |`use_signed_off_by*`| |
| 1160 | If set, each change must contain a Signed-off-by line from either the |
| 1161 | author or the uploader in the commit message. |
| 1162 | |`require_change_id*`| |
| 1163 | If set, require a valid link:user-changeid.html[Change-Id] footer in any |
| 1164 | commit uploaded for review. This does not apply to commits pushed |
| 1165 | directly to a branch or tag. |
| Dave Borowitz | 2002789 | 2013-04-08 10:42:23 -0700 | [diff] [blame] | 1166 | |`commentlinks`| |
| 1167 | Comment link configuration for the project. Has the same format as the |
| 1168 | link:config-gerrit.html#_a_id_commentlink_a_section_commentlink[commentlink section] |
| 1169 | of `gerrit.config`. |
| Dave Borowitz | 237073a | 2013-04-04 16:52:27 -0700 | [diff] [blame] | 1170 | |====================================== |
| 1171 | |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1172 | |
| 1173 | GERRIT |
| 1174 | ------ |
| 1175 | Part of link:index.html[Gerrit Code Review] |