summaryrefslogtreecommitdiff
path: root/doc/api/projects.md
diff options
context:
space:
mode:
authorSebastian Ziebell <sebastian.ziebell@asquera.de>2013-02-15 13:54:26 +0100
committerSebastian Ziebell <sebastian.ziebell@asquera.de>2013-02-15 13:54:26 +0100
commit99739a58c397ac619c62b0c19162c4656e55ce24 (patch)
tree0a5f7227ae778d5be4e68ac866d295cc23ed1dd3 /doc/api/projects.md
parent5417fbfecdfded18e89e55e56022b666d1a0e13f (diff)
downloadgitlab-ce-99739a58c397ac619c62b0c19162c4656e55ce24.tar.gz
API documentation extended with infos to project branches
Diffstat (limited to 'doc/api/projects.md')
-rw-r--r--doc/api/projects.md77
1 files changed, 77 insertions, 0 deletions
diff --git a/doc/api/projects.md b/doc/api/projects.md
index a36890a41e3..284aca4fa16 100644
--- a/doc/api/projects.md
+++ b/doc/api/projects.md
@@ -360,3 +360,80 @@ Return values:
Note the JSON response differs if the hook is available or not. If the project hook
is available before it is returned in the JSON response or an empty response is returned.
+
+
+## Branches
+
+### List branches
+
+Lists all branches of a project.
+
+```
+GET /projects/:id/repository/branches
+```
+
+Parameters:
+
++ `id` (required) - The ID of the project
+
+Return values:
+
++ `200 Ok` on success and a list of branches
++ `404 Not Found` if project is not found
+
+
+### List single branch
+
+Lists a specific branch of a project.
+
+```
+GET /projects/:id/repository/branches/:branch
+```
+
+Parameters:
+
++ `id` (required) - The ID of the project.
++ `branch` (required) - The name of the branch.
+
+Return values:
+
++ `200 Ok` on success
++ `404 Not Found` if either project with ID or branch could not be found
+
+
+### Protect single branch
+
+Protects a single branch of a project.
+
+```
+PUT /projects/:id/repository/branches/:branch/protect
+```
+
+Parameters:
+
++ `id` (required) - The ID of the project.
++ `branch` (required) - The name of the branch.
+
+Return values:
+
++ `200 Ok` on success
++ `404 Not Found` if either project or branch could not be found
+
+
+### Unprotect single branch
+
+Unprotects a single branch of a project.
+
+```
+PUT /projects/:id/repository/branches/:branch/unprotect
+```
+
+Parameters:
+
++ `id` (required) - The ID of the project.
++ `branch` (required) - The name of the branch.
+
+Return values:
+
++ `200 Ok` on success
++ `404 Not Found` if either project or branch could not be found