BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
8f3701ef
Unverified
Commit
8f3701ef
authored
Mar 31, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move branches API docs to separate file
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
9b276f00
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
168 additions
and
167 deletions
+168
-167
README.md
doc/api/README.md
+1
-0
branches.md
doc/api/branches.md
+167
-0
repositories.md
doc/api/repositories.md
+0
-167
No files found.
doc/api/README.md
View file @
8f3701ef
...
...
@@ -9,6 +9,7 @@
+
[
Repositories
](
repositories.md
)
+
[
Repository Files
](
repository_files.md
)
+
[
Commits
](
commits.md
)
+
[
Branches
](
branches.md
)
+
[
Merge Requests
](
merge_requests.md
)
+
[
Issues
](
issues.md
)
+
[
Milestones
](
milestones.md
)
...
...
doc/api/branches.md
0 → 100644
View file @
8f3701ef
# Branches
## List repository branches
Get a list of repository branches from a project, sorted by name alphabetically.
```
GET /projects/:id/repository/branches
```
Parameters:
+
`id`
(required) - The ID of a project
```
json
[
{
"name"
:
"master"
,
"commit"
:
{
"id"
:
"7b5c3cc8be40ee161ae89a06bba6229da1032a0c"
,
"parents"
:
[
{
"id"
:
"4ad91d3c1144c406e50c7b33bae684bd6837faf8"
}
],
"tree"
:
"46e82de44b1061621357f24c05515327f2795a95"
,
"message"
:
"add projects API"
,
"author"
:
{
"name"
:
"John Smith"
,
"email"
:
"john@example.com"
},
"committer"
:
{
"name"
:
"John Smith"
,
"email"
:
"john@example.com"
},
"authored_date"
:
"2012-06-27T05:51:39-07:00"
,
"committed_date"
:
"2012-06-28T03:44:20-07:00"
},
"protected"
:
true
}
]
```
## Get single repository branch
Get a single project repository branch.
```
GET /projects/:id/repository/branches/:branch
```
Parameters:
+
`id`
(required) - The ID of a project
+
`branch`
(required) - The name of the branch
```
json
{
"name"
:
"master"
,
"commit"
:
{
"id"
:
"7b5c3cc8be40ee161ae89a06bba6229da1032a0c"
,
"parents"
:
[
{
"id"
:
"4ad91d3c1144c406e50c7b33bae684bd6837faf8"
}
],
"tree"
:
"46e82de44b1061621357f24c05515327f2795a95"
,
"message"
:
"add projects API"
,
"author"
:
{
"name"
:
"John Smith"
,
"email"
:
"john@example.com"
},
"committer"
:
{
"name"
:
"John Smith"
,
"email"
:
"john@example.com"
},
"authored_date"
:
"2012-06-27T05:51:39-07:00"
,
"committed_date"
:
"2012-06-28T03:44:20-07:00"
},
"protected"
:
true
}
```
## Protect repository branch
Protects a single project repository branch. This is an idempotent function, protecting an already
protected repository branch still returns a
`200 Ok`
status code.
```
PUT /projects/:id/repository/branches/:branch/protect
```
Parameters:
+
`id`
(required) - The ID of a project
+
`branch`
(required) - The name of the branch
```
json
{
"name"
:
"master"
,
"commit"
:
{
"id"
:
"7b5c3cc8be40ee161ae89a06bba6229da1032a0c"
,
"parents"
:
[
{
"id"
:
"4ad91d3c1144c406e50c7b33bae684bd6837faf8"
}
],
"tree"
:
"46e82de44b1061621357f24c05515327f2795a95"
,
"message"
:
"add projects API"
,
"author"
:
{
"name"
:
"John Smith"
,
"email"
:
"john@example.com"
},
"committer"
:
{
"name"
:
"John Smith"
,
"email"
:
"john@example.com"
},
"authored_date"
:
"2012-06-27T05:51:39-07:00"
,
"committed_date"
:
"2012-06-28T03:44:20-07:00"
},
"protected"
:
true
}
```
## Unprotect repository branch
Unprotects a single project repository branch. This is an idempotent function, unprotecting an already
unprotected repository branch still returns a
`200 Ok`
status code.
```
PUT /projects/:id/repository/branches/:branch/unprotect
```
Parameters:
+
`id`
(required) - The ID of a project
+
`branch`
(required) - The name of the branch
```
json
{
"name"
:
"master"
,
"commit"
:
{
"id"
:
"7b5c3cc8be40ee161ae89a06bba6229da1032a0c"
,
"parents"
:
[
{
"id"
:
"4ad91d3c1144c406e50c7b33bae684bd6837faf8"
}
],
"tree"
:
"46e82de44b1061621357f24c05515327f2795a95"
,
"message"
:
"add projects API"
,
"author"
:
{
"name"
:
"John Smith"
,
"email"
:
"john@example.com"
},
"committer"
:
{
"name"
:
"John Smith"
,
"email"
:
"john@example.com"
},
"authored_date"
:
"2012-06-27T05:51:39-07:00"
,
"committed_date"
:
"2012-06-28T03:44:20-07:00"
},
"protected"
:
false
}
```
doc/api/repositories.md
View file @
8f3701ef
## List repository branches
Get a list of repository branches from a project, sorted by name alphabetically.
```
GET /projects/:id/repository/branches
```
Parameters:
+
`id`
(required) - The ID of a project
```
json
[
{
"name"
:
"master"
,
"commit"
:
{
"id"
:
"7b5c3cc8be40ee161ae89a06bba6229da1032a0c"
,
"parents"
:
[
{
"id"
:
"4ad91d3c1144c406e50c7b33bae684bd6837faf8"
}
],
"tree"
:
"46e82de44b1061621357f24c05515327f2795a95"
,
"message"
:
"add projects API"
,
"author"
:
{
"name"
:
"John Smith"
,
"email"
:
"john@example.com"
},
"committer"
:
{
"name"
:
"John Smith"
,
"email"
:
"john@example.com"
},
"authored_date"
:
"2012-06-27T05:51:39-07:00"
,
"committed_date"
:
"2012-06-28T03:44:20-07:00"
},
"protected"
:
true
}
]
```
## Get single repository branch
Get a single project repository branch.
```
GET /projects/:id/repository/branches/:branch
```
Parameters:
+
`id`
(required) - The ID of a project
+
`branch`
(required) - The name of the branch
```
json
{
"name"
:
"master"
,
"commit"
:
{
"id"
:
"7b5c3cc8be40ee161ae89a06bba6229da1032a0c"
,
"parents"
:
[
{
"id"
:
"4ad91d3c1144c406e50c7b33bae684bd6837faf8"
}
],
"tree"
:
"46e82de44b1061621357f24c05515327f2795a95"
,
"message"
:
"add projects API"
,
"author"
:
{
"name"
:
"John Smith"
,
"email"
:
"john@example.com"
},
"committer"
:
{
"name"
:
"John Smith"
,
"email"
:
"john@example.com"
},
"authored_date"
:
"2012-06-27T05:51:39-07:00"
,
"committed_date"
:
"2012-06-28T03:44:20-07:00"
},
"protected"
:
true
}
```
## Protect repository branch
Protects a single project repository branch. This is an idempotent function, protecting an already
protected repository branch still returns a
`200 Ok`
status code.
```
PUT /projects/:id/repository/branches/:branch/protect
```
Parameters:
+
`id`
(required) - The ID of a project
+
`branch`
(required) - The name of the branch
```
json
{
"name"
:
"master"
,
"commit"
:
{
"id"
:
"7b5c3cc8be40ee161ae89a06bba6229da1032a0c"
,
"parents"
:
[
{
"id"
:
"4ad91d3c1144c406e50c7b33bae684bd6837faf8"
}
],
"tree"
:
"46e82de44b1061621357f24c05515327f2795a95"
,
"message"
:
"add projects API"
,
"author"
:
{
"name"
:
"John Smith"
,
"email"
:
"john@example.com"
},
"committer"
:
{
"name"
:
"John Smith"
,
"email"
:
"john@example.com"
},
"authored_date"
:
"2012-06-27T05:51:39-07:00"
,
"committed_date"
:
"2012-06-28T03:44:20-07:00"
},
"protected"
:
true
}
```
## Unprotect repository branch
Unprotects a single project repository branch. This is an idempotent function, unprotecting an already
unprotected repository branch still returns a
`200 Ok`
status code.
```
PUT /projects/:id/repository/branches/:branch/unprotect
```
Parameters:
+
`id`
(required) - The ID of a project
+
`branch`
(required) - The name of the branch
```
json
{
"name"
:
"master"
,
"commit"
:
{
"id"
:
"7b5c3cc8be40ee161ae89a06bba6229da1032a0c"
,
"parents"
:
[
{
"id"
:
"4ad91d3c1144c406e50c7b33bae684bd6837faf8"
}
],
"tree"
:
"46e82de44b1061621357f24c05515327f2795a95"
,
"message"
:
"add projects API"
,
"author"
:
{
"name"
:
"John Smith"
,
"email"
:
"john@example.com"
},
"committer"
:
{
"name"
:
"John Smith"
,
"email"
:
"john@example.com"
},
"authored_date"
:
"2012-06-27T05:51:39-07:00"
,
"committed_date"
:
"2012-06-28T03:44:20-07:00"
},
"protected"
:
false
}
```
## List project repository tags
Get a list of repository tags from a project, sorted by name in reverse alphabetical order.
...
...
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