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
2ada4ef0
Commit
2ada4ef0
authored
Aug 15, 2014
by
Ciro Santilli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Md style for API.
parent
45da59da
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
68 additions
and
85 deletions
+68
-85
doc/api/branches.md
doc/api/branches.md
+2
-4
doc/api/groups.md
doc/api/groups.md
+16
-21
doc/api/notes.md
doc/api/notes.md
+24
-30
doc/api/repositories.md
doc/api/repositories.md
+20
-22
doc/api/repository_files.md
doc/api/repository_files.md
+2
-4
doc/api/session.md
doc/api/session.md
+4
-4
No files found.
doc/api/branches.md
View file @
2ada4ef0
...
@@ -41,7 +41,6 @@ Parameters:
...
@@ -41,7 +41,6 @@ Parameters:
]
]
```
```
## Get single repository branch
## Get single repository branch
Get a single project repository branch.
Get a single project repository branch.
...
@@ -199,14 +198,13 @@ Parameters:
...
@@ -199,14 +198,13 @@ Parameters:
## Delete repository branch
## Delete repository branch
```
```
DELETE /projects/:id/repository/branches/:branch
DELETE /projects/:id/repository/branches/:branch
```
```
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
+
`branch`
(required) - The name of the branch
-
`branch`
(required) - The name of the branch
It return 200 if succeed or 405 if failed with error message explaining reason.
It return 200 if succeed or 405 if failed with error message explaining reason.
doc/api/groups.md
View file @
2ada4ef0
...
@@ -19,7 +19,6 @@ GET /groups
...
@@ -19,7 +19,6 @@ GET /groups
]
]
```
```
## Details of a group
## Details of a group
Get all details of a group.
Get all details of a group.
...
@@ -30,8 +29,7 @@ GET /groups/:id
...
@@ -30,8 +29,7 @@ GET /groups/:id
Parameters:
Parameters:
+
`id`
(required) - The ID of a group
-
`id`
(required) - The ID of a group
## New group
## New group
...
@@ -43,8 +41,8 @@ POST /groups
...
@@ -43,8 +41,8 @@ POST /groups
Parameters:
Parameters:
+
`name`
(required) - The name of the group
-
`name`
(required) - The name of the group
+
`path`
(required) - The path of the group
-
`path`
(required) - The path of the group
## Transfer project to group
## Transfer project to group
...
@@ -55,9 +53,9 @@ POST /groups/:id/projects/:project_id
...
@@ -55,9 +53,9 @@ POST /groups/:id/projects/:project_id
```
```
Parameters:
Parameters:
+
`id`
(required) - The ID of a group
+
`project_id`
(required) - The ID of a project
-
`id`
(required) - The ID of a group
-
`project_id`
(required) - The ID of a project
## Remove group
## Remove group
...
@@ -69,22 +67,20 @@ DELETE /groups/:id
...
@@ -69,22 +67,20 @@ DELETE /groups/:id
Parameters:
Parameters:
+
`id`
(required) - The ID of a user group
-
`id`
(required) - The ID of a user group
## Group members
## Group members
**Group access levels**
**Group access levels**
The group access levels are defined in the
`Gitlab::Access`
module. Currently, these levels are recognized:
The group access levels are defined in the
`Gitlab::Access`
module. Currently, these levels are recognized:
```
```
GUEST = 10
GUEST = 10
REPORTER = 20
REPORTER = 20
DEVELOPER = 30
DEVELOPER = 30
MASTER = 40
MASTER = 40
OWNER = 50
OWNER = 50
```
```
### List group members
### List group members
...
@@ -128,10 +124,9 @@ POST /groups/:id/members
...
@@ -128,10 +124,9 @@ POST /groups/:id/members
Parameters:
Parameters:
+
`id`
(required) - The ID of a group
-
`id`
(required) - The ID of a group
+
`user_id`
(required) - The ID of a user to add
-
`user_id`
(required) - The ID of a user to add
+
`access_level`
(required) - Project access level
-
`access_level`
(required) - Project access level
### Remove user team member
### Remove user team member
...
@@ -143,5 +138,5 @@ DELETE /groups/:id/members/:user_id
...
@@ -143,5 +138,5 @@ DELETE /groups/:id/members/:user_id
Parameters:
Parameters:
+
`id`
(required) - The ID of a user group
-
`id`
(required) - The ID of a user group
+
`user_id`
(required) - The ID of a group member
-
`user_id`
(required) - The ID of a group member
doc/api/notes.md
View file @
2ada4ef0
...
@@ -14,8 +14,8 @@ GET /projects/:id/issues/:issue_id/notes
...
@@ -14,8 +14,8 @@ GET /projects/:id/issues/:issue_id/notes
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
+
`issue_id`
(required) - The ID of an issue
-
`issue_id`
(required) - The ID of an issue
```
json
```
json
[
[
...
@@ -60,10 +60,9 @@ GET /projects/:id/issues/:issue_id/notes/:note_id
...
@@ -60,10 +60,9 @@ GET /projects/:id/issues/:issue_id/notes/:note_id
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
+
`issue_id`
(required) - The ID of a project issue
-
`issue_id`
(required) - The ID of a project issue
+
`note_id`
(required) - The ID of an issue note
-
`note_id`
(required) - The ID of an issue note
### Create new issue note
### Create new issue note
...
@@ -75,10 +74,9 @@ POST /projects/:id/issues/:issue_id/notes
...
@@ -75,10 +74,9 @@ POST /projects/:id/issues/:issue_id/notes
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
+
`issue_id`
(required) - The ID of an issue
-
`issue_id`
(required) - The ID of an issue
+
`body`
(required) - The content of a note
-
`body`
(required) - The content of a note
## Snippets
## Snippets
...
@@ -92,9 +90,8 @@ GET /projects/:id/snippets/:snippet_id/notes
...
@@ -92,9 +90,8 @@ GET /projects/:id/snippets/:snippet_id/notes
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
+
`snippet_id`
(required) - The ID of a project snippet
-
`snippet_id`
(required) - The ID of a project snippet
### Get single snippet note
### Get single snippet note
...
@@ -106,9 +103,9 @@ GET /projects/:id/snippets/:snippet_id/notes/:note_id
...
@@ -106,9 +103,9 @@ GET /projects/:id/snippets/:snippet_id/notes/:note_id
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
+
`snippet_id`
(required) - The ID of a project snippet
-
`snippet_id`
(required) - The ID of a project snippet
+
`note_id`
(required) - The ID of an snippet note
-
`note_id`
(required) - The ID of an snippet note
```
json
```
json
{
{
...
@@ -139,10 +136,9 @@ POST /projects/:id/snippets/:snippet_id/notes
...
@@ -139,10 +136,9 @@ POST /projects/:id/snippets/:snippet_id/notes
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
+
`snippet_id`
(required) - The ID of an snippet
-
`snippet_id`
(required) - The ID of an snippet
+
`body`
(required) - The content of a note
-
`body`
(required) - The content of a note
## Merge Requests
## Merge Requests
...
@@ -156,9 +152,8 @@ GET /projects/:id/merge_requests/:merge_request_id/notes
...
@@ -156,9 +152,8 @@ GET /projects/:id/merge_requests/:merge_request_id/notes
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
+
`merge_request_id`
(required) - The ID of a project merge request
-
`merge_request_id`
(required) - The ID of a project merge request
### Get single merge request note
### Get single merge request note
...
@@ -170,9 +165,9 @@ GET /projects/:id/merge_requests/:merge_request_id/notes/:note_id
...
@@ -170,9 +165,9 @@ GET /projects/:id/merge_requests/:merge_request_id/notes/:note_id
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
+
`merge_request_id`
(required) - The ID of a project merge request
-
`merge_request_id`
(required) - The ID of a project merge request
+
`note_id`
(required) - The ID of a merge request note
-
`note_id`
(required) - The ID of a merge request note
```
json
```
json
{
{
...
@@ -201,7 +196,6 @@ POST /projects/:id/merge_requests/:merge_request_id/notes
...
@@ -201,7 +196,6 @@ POST /projects/:id/merge_requests/:merge_request_id/notes
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
+
`merge_request_id`
(required) - The ID of a merge request
-
`merge_request_id`
(required) - The ID of a merge request
+
`body`
(required) - The content of a note
-
`body`
(required) - The content of a note
doc/api/repositories.md
View file @
2ada4ef0
...
@@ -10,7 +10,7 @@ GET /projects/:id/repository/tags
...
@@ -10,7 +10,7 @@ GET /projects/:id/repository/tags
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
```
json
```
json
[
[
...
@@ -47,9 +47,9 @@ POST /projects/:id/repository/tags
...
@@ -47,9 +47,9 @@ POST /projects/:id/repository/tags
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
+
`tag_name`
(required) - The name of a tag
-
`tag_name`
(required) - The name of a tag
+
`ref`
(required) - Create tag using commit SHA, another tag name, or branch name.
-
`ref`
(required) - Create tag using commit SHA, another tag name, or branch name.
```
json
```
json
[
[
...
@@ -81,9 +81,9 @@ GET /projects/:id/repository/tree
...
@@ -81,9 +81,9 @@ GET /projects/:id/repository/tree
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
+
`path`
(optional) - The path inside repository. Used to get contend of subdirectories
-
`path`
(optional) - The path inside repository. Used to get contend of subdirectories
+
`ref_name`
(optional) - The name of a repository branch or tag or if not given the default branch
-
`ref_name`
(optional) - The name of a repository branch or tag or if not given the default branch
```
json
```
json
[
[
...
@@ -126,7 +126,6 @@ Parameters:
...
@@ -126,7 +126,6 @@ Parameters:
]
]
```
```
## Raw file content
## Raw file content
Get the raw file contents for a file by commit SHA and path.
Get the raw file contents for a file by commit SHA and path.
...
@@ -137,10 +136,9 @@ GET /projects/:id/repository/blobs/:sha
...
@@ -137,10 +136,9 @@ GET /projects/:id/repository/blobs/:sha
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
+
`sha`
(required) - The commit or branch name
-
`sha`
(required) - The commit or branch name
+
`filepath`
(required) - The path the file
-
`filepath`
(required) - The path the file
## Raw blob content
## Raw blob content
...
@@ -152,22 +150,21 @@ GET /projects/:id/repository/raw_blobs/:sha
...
@@ -152,22 +150,21 @@ GET /projects/:id/repository/raw_blobs/:sha
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
+
`sha`
(required) - The blob SHA
-
`sha`
(required) - The blob SHA
## Get file archive
## Get file archive
Get a
a
n archive of the repository
Get an archive of the repository
```
```
GET /projects/:id/repository/archive
GET /projects/:id/repository/archive
```
```
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
+
`sha`
(optional) - The commit SHA to download defaults to the tip of the default branch
-
`id`
(required) - The ID of a project
-
`sha`
(optional) - The commit SHA to download defaults to the tip of the default branch
## Compare branches, tags or commits
## Compare branches, tags or commits
...
@@ -176,10 +173,10 @@ GET /projects/:id/repository/compare
...
@@ -176,10 +173,10 @@ GET /projects/:id/repository/compare
```
```
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
+
`from`
(required) - the commit SHA or branch name
+
`to`
(required) - the commit SHA or branch name
-
`id`
(required) - The ID of a project
-
`from`
(required) - the commit SHA or branch name
-
`to`
(required) - the commit SHA or branch name
```
```
GET /projects/:id/repository/compare?from=master&to=feature
GET /projects/:id/repository/compare?from=master&to=feature
...
@@ -230,7 +227,8 @@ GET /projects/:id/repository/contributors
...
@@ -230,7 +227,8 @@ GET /projects/:id/repository/contributors
```
```
Parameters:
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
Response:
Response:
...
...
doc/api/repository_files.md
View file @
2ada4ef0
# Repository files
# Repository files
## CRUD for repository files
**CRUD for repository files**
## Create, read, update and delete repository files using this API
**Create, read, update and delete repository files using this API**
---
## Get file from repository
## Get file from repository
...
...
doc/api/session.md
View file @
2ada4ef0
...
@@ -8,12 +8,12 @@ POST /session
...
@@ -8,12 +8,12 @@ POST /session
Parameters:
Parameters:
+
`login`
(required) - The login of user
-
`login`
(required) - The login of user
+
`email`
(required if login missing) - The email of user
-
`email`
(required if login missing) - The email of user
+
`password`
(required) - Valid password
-
`password`
(required) - Valid password
**You can login with both GitLab and LDAP credentials now**
__You can login with both GitLab and LDAP credentials now__
```
json
```
json
{
{
...
...
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