Commit 54c20837 authored by Jeroen van Baarsen's avatar Jeroen van Baarsen

Merge pull request #7509 from cirosantilli/fix-md-style-api

Fix Md style for API.
parents f05cec53 2ada4ef0
......@@ -41,7 +41,6 @@ Parameters:
]
```
## Get single repository branch
Get a single project repository branch.
......@@ -199,14 +198,13 @@ Parameters:
## Delete repository branch
```
DELETE /projects/:id/repository/branches/:branch
```
Parameters:
+ `id` (required) - The ID of a project
+ `branch` (required) - The name of the branch
- `id` (required) - The ID of a project
- `branch` (required) - The name of the branch
It return 200 if succeed or 405 if failed with error message explaining reason.
......@@ -19,7 +19,6 @@ GET /groups
]
```
## Details of a group
Get all details of a group.
......@@ -30,8 +29,7 @@ GET /groups/:id
Parameters:
+ `id` (required) - The ID of a group
- `id` (required) - The ID of a group
## New group
......@@ -43,8 +41,8 @@ POST /groups
Parameters:
+ `name` (required) - The name of the group
+ `path` (required) - The path of the group
- `name` (required) - The name of the group
- `path` (required) - The path of the group
## Transfer project to group
......@@ -55,9 +53,9 @@ POST /groups/:id/projects/:project_id
```
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
......@@ -69,22 +67,20 @@ DELETE /groups/:id
Parameters:
+ `id` (required) - The ID of a user group
- `id` (required) - The ID of a user group
## Group members
**Group access levels**
The group access levels are defined in the `Gitlab::Access` module. Currently, these levels are recognized:
```
GUEST = 10
REPORTER = 20
DEVELOPER = 30
MASTER = 40
OWNER = 50
GUEST = 10
REPORTER = 20
DEVELOPER = 30
MASTER = 40
OWNER = 50
```
### List group members
......@@ -128,10 +124,9 @@ POST /groups/:id/members
Parameters:
+ `id` (required) - The ID of a group
+ `user_id` (required) - The ID of a user to add
+ `access_level` (required) - Project access level
- `id` (required) - The ID of a group
- `user_id` (required) - The ID of a user to add
- `access_level` (required) - Project access level
### Remove user team member
......@@ -143,5 +138,5 @@ DELETE /groups/:id/members/:user_id
Parameters:
+ `id` (required) - The ID of a user group
+ `user_id` (required) - The ID of a group member
- `id` (required) - The ID of a user group
- `user_id` (required) - The ID of a group member
......@@ -14,8 +14,8 @@ GET /projects/:id/issues/:issue_id/notes
Parameters:
+ `id` (required) - The ID of a project
+ `issue_id` (required) - The ID of an issue
- `id` (required) - The ID of a project
- `issue_id` (required) - The ID of an issue
```json
[
......@@ -60,10 +60,9 @@ GET /projects/:id/issues/:issue_id/notes/:note_id
Parameters:
+ `id` (required) - The ID of a project
+ `issue_id` (required) - The ID of a project issue
+ `note_id` (required) - The ID of an issue note
- `id` (required) - The ID of a project
- `issue_id` (required) - The ID of a project issue
- `note_id` (required) - The ID of an issue note
### Create new issue note
......@@ -75,10 +74,9 @@ POST /projects/:id/issues/:issue_id/notes
Parameters:
+ `id` (required) - The ID of a project
+ `issue_id` (required) - The ID of an issue
+ `body` (required) - The content of a note
- `id` (required) - The ID of a project
- `issue_id` (required) - The ID of an issue
- `body` (required) - The content of a note
## Snippets
......@@ -92,9 +90,8 @@ GET /projects/:id/snippets/:snippet_id/notes
Parameters:
+ `id` (required) - The ID of a project
+ `snippet_id` (required) - The ID of a project snippet
- `id` (required) - The ID of a project
- `snippet_id` (required) - The ID of a project snippet
### Get single snippet note
......@@ -106,9 +103,9 @@ GET /projects/:id/snippets/:snippet_id/notes/:note_id
Parameters:
+ `id` (required) - The ID of a project
+ `snippet_id` (required) - The ID of a project snippet
+ `note_id` (required) - The ID of an snippet note
- `id` (required) - The ID of a project
- `snippet_id` (required) - The ID of a project snippet
- `note_id` (required) - The ID of an snippet note
```json
{
......@@ -139,10 +136,9 @@ POST /projects/:id/snippets/:snippet_id/notes
Parameters:
+ `id` (required) - The ID of a project
+ `snippet_id` (required) - The ID of an snippet
+ `body` (required) - The content of a note
- `id` (required) - The ID of a project
- `snippet_id` (required) - The ID of an snippet
- `body` (required) - The content of a note
## Merge Requests
......@@ -156,9 +152,8 @@ GET /projects/:id/merge_requests/:merge_request_id/notes
Parameters:
+ `id` (required) - The ID of a project
+ `merge_request_id` (required) - The ID of a project merge request
- `id` (required) - The ID of a project
- `merge_request_id` (required) - The ID of a project merge request
### Get single merge request note
......@@ -170,9 +165,9 @@ GET /projects/:id/merge_requests/:merge_request_id/notes/:note_id
Parameters:
+ `id` (required) - The ID of a project
+ `merge_request_id` (required) - The ID of a project merge request
+ `note_id` (required) - The ID of a merge request note
- `id` (required) - The ID of a project
- `merge_request_id` (required) - The ID of a project merge request
- `note_id` (required) - The ID of a merge request note
```json
{
......@@ -201,7 +196,6 @@ POST /projects/:id/merge_requests/:merge_request_id/notes
Parameters:
+ `id` (required) - The ID of a project
+ `merge_request_id` (required) - The ID of a merge request
+ `body` (required) - The content of a note
- `id` (required) - The ID of a project
- `merge_request_id` (required) - The ID of a merge request
- `body` (required) - The content of a note
......@@ -10,7 +10,7 @@ GET /projects/:id/repository/tags
Parameters:
+ `id` (required) - The ID of a project
- `id` (required) - The ID of a project
```json
[
......@@ -47,9 +47,9 @@ POST /projects/:id/repository/tags
Parameters:
+ `id` (required) - The ID of a project
+ `tag_name` (required) - The name of a tag
+ `ref` (required) - Create tag using commit SHA, another tag name, or branch name.
- `id` (required) - The ID of a project
- `tag_name` (required) - The name of a tag
- `ref` (required) - Create tag using commit SHA, another tag name, or branch name.
```json
[
......@@ -81,9 +81,9 @@ GET /projects/:id/repository/tree
Parameters:
+ `id` (required) - The ID of a project
+ `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
- `id` (required) - The ID of a project
- `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
```json
[
......@@ -126,7 +126,6 @@ Parameters:
]
```
## Raw file content
Get the raw file contents for a file by commit SHA and path.
......@@ -137,10 +136,9 @@ GET /projects/:id/repository/blobs/:sha
Parameters:
+ `id` (required) - The ID of a project
+ `sha` (required) - The commit or branch name
+ `filepath` (required) - The path the file
- `id` (required) - The ID of a project
- `sha` (required) - The commit or branch name
- `filepath` (required) - The path the file
## Raw blob content
......@@ -152,22 +150,21 @@ GET /projects/:id/repository/raw_blobs/:sha
Parameters:
+ `id` (required) - The ID of a project
+ `sha` (required) - The blob SHA
- `id` (required) - The ID of a project
- `sha` (required) - The blob SHA
## Get file archive
Get a an archive of the repository
Get an archive of the repository
```
GET /projects/:id/repository/archive
```
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
......@@ -176,10 +173,10 @@ GET /projects/:id/repository/compare
```
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
......@@ -230,7 +227,8 @@ GET /projects/:id/repository/contributors
```
Parameters:
+ `id` (required) - The ID of a project
- `id` (required) - The ID of a project
Response:
......
# 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
......
......@@ -8,12 +8,12 @@ POST /session
Parameters:
+ `login` (required) - The login of user
+ `email` (required if login missing) - The email of user
+ `password` (required) - Valid password
- `login` (required) - The login of user
- `email` (required if login missing) - The email of user
- `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
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment