Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
99739a58
Commit
99739a58
authored
Feb 15, 2013
by
Sebastian Ziebell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API documentation extended with infos to project branches
parent
5417fbfe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
0 deletions
+77
-0
doc/api/projects.md
doc/api/projects.md
+77
-0
No files found.
doc/api/projects.md
View file @
99739a58
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment