Commit 99739a58c397ac619c62b0c19162c4656e55ce24
1 parent
5417fbfe
Exists in
master
and in
4 other branches
API documentation extended with infos to project branches
Showing
1 changed file
with
77 additions
and
0 deletions
Show diff stats
doc/api/projects.md
| ... | ... | @@ -360,3 +360,80 @@ Return values: |
| 360 | 360 | |
| 361 | 361 | Note the JSON response differs if the hook is available or not. If the project hook |
| 362 | 362 | is available before it is returned in the JSON response or an empty response is returned. |
| 363 | + | |
| 364 | + | |
| 365 | +## Branches | |
| 366 | + | |
| 367 | +### List branches | |
| 368 | + | |
| 369 | +Lists all branches of a project. | |
| 370 | + | |
| 371 | +``` | |
| 372 | +GET /projects/:id/repository/branches | |
| 373 | +``` | |
| 374 | + | |
| 375 | +Parameters: | |
| 376 | + | |
| 377 | ++ `id` (required) - The ID of the project | |
| 378 | + | |
| 379 | +Return values: | |
| 380 | + | |
| 381 | ++ `200 Ok` on success and a list of branches | |
| 382 | ++ `404 Not Found` if project is not found | |
| 383 | + | |
| 384 | + | |
| 385 | +### List single branch | |
| 386 | + | |
| 387 | +Lists a specific branch of a project. | |
| 388 | + | |
| 389 | +``` | |
| 390 | +GET /projects/:id/repository/branches/:branch | |
| 391 | +``` | |
| 392 | + | |
| 393 | +Parameters: | |
| 394 | + | |
| 395 | ++ `id` (required) - The ID of the project. | |
| 396 | ++ `branch` (required) - The name of the branch. | |
| 397 | + | |
| 398 | +Return values: | |
| 399 | + | |
| 400 | ++ `200 Ok` on success | |
| 401 | ++ `404 Not Found` if either project with ID or branch could not be found | |
| 402 | + | |
| 403 | + | |
| 404 | +### Protect single branch | |
| 405 | + | |
| 406 | +Protects a single branch of a project. | |
| 407 | + | |
| 408 | +``` | |
| 409 | +PUT /projects/:id/repository/branches/:branch/protect | |
| 410 | +``` | |
| 411 | + | |
| 412 | +Parameters: | |
| 413 | + | |
| 414 | ++ `id` (required) - The ID of the project. | |
| 415 | ++ `branch` (required) - The name of the branch. | |
| 416 | + | |
| 417 | +Return values: | |
| 418 | + | |
| 419 | ++ `200 Ok` on success | |
| 420 | ++ `404 Not Found` if either project or branch could not be found | |
| 421 | + | |
| 422 | + | |
| 423 | +### Unprotect single branch | |
| 424 | + | |
| 425 | +Unprotects a single branch of a project. | |
| 426 | + | |
| 427 | +``` | |
| 428 | +PUT /projects/:id/repository/branches/:branch/unprotect | |
| 429 | +``` | |
| 430 | + | |
| 431 | +Parameters: | |
| 432 | + | |
| 433 | ++ `id` (required) - The ID of the project. | |
| 434 | ++ `branch` (required) - The name of the branch. | |
| 435 | + | |
| 436 | +Return values: | |
| 437 | + | |
| 438 | ++ `200 Ok` on success | |
| 439 | ++ `404 Not Found` if either project or branch could not be found | ... | ... |