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
f05cec53
Commit
f05cec53
authored
Aug 15, 2014
by
Jeroen van Baarsen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7508 from cirosantilli/md-style-projects
Fix Md style for projects API doc.
parents
0965b188
a1d09978
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
89 deletions
+70
-89
doc/api/projects.md
doc/api/projects.md
+70
-89
No files found.
doc/api/projects.md
View file @
f05cec53
# Projects
##
#
List projects
## List projects
Get a list of projects accessible by the authenticated user.
...
...
@@ -10,7 +10,7 @@ GET /projects
Parameters:
+
`archived`
(optional) - if passed, limit by archived status
-
`archived`
(optional) - if passed, limit by archived status
```
json
[
...
...
@@ -87,8 +87,7 @@ Parameters:
]
```
#### List owned projects
### List owned projects
Get a list of projects which are owned by the authenticated user.
...
...
@@ -96,7 +95,7 @@ Get a list of projects which are owned by the authenticated user.
GET /projects/owned
```
###
#
List ALL projects
### List ALL projects
Get a list of all GitLab projects (admin only).
...
...
@@ -115,7 +114,7 @@ GET /projects/:id
Parameters:
+
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
-
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
```
json
{
...
...
@@ -176,7 +175,7 @@ GET /projects/:id/events
Parameters:
+
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
-
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
```
json
[
...
...
@@ -238,7 +237,6 @@ Parameters:
]
```
### Create project
Creates a new project owned by the authenticated user.
...
...
@@ -249,17 +247,16 @@ POST /projects
Parameters:
+
`name`
(required) - new project name
+
`namespace_id`
(optional) - namespace for the new project (defaults to user)
+
`description`
(optional) - short project description
+
`issues_enabled`
(optional)
+
`merge_requests_enabled`
(optional)
+
`wiki_enabled`
(optional)
+
`snippets_enabled`
(optional)
+
`public`
(optional) - if
`true`
same as setting visibility_level = 20
+
`visibility_level`
(optional)
*
`import_url`
(optional)
-
`name`
(required) - new project name
-
`namespace_id`
(optional) - namespace for the new project (defaults to user)
-
`description`
(optional) - short project description
-
`issues_enabled`
(optional)
-
`merge_requests_enabled`
(optional)
-
`wiki_enabled`
(optional)
-
`snippets_enabled`
(optional)
-
`public`
(optional) - if
`true`
same as setting visibility_level = 20
-
`visibility_level`
(optional)
-
`import_url`
(optional)
### Create project for user
...
...
@@ -271,20 +268,19 @@ POST /projects/user/:user_id
Parameters:
+
`user_id`
(required) - user_id of owner
+
`name`
(required) - new project name
+
`description`
(optional) - short project description
+
`default_branch`
(optional) - 'master' by default
+
`issues_enabled`
(optional)
+
`merge_requests_enabled`
(optional)
+
`wiki_enabled`
(optional)
+
`snippets_enabled`
(optional)
+
`public`
(optional) - if
`true`
same as setting visibility_level = 20
+
`visibility_level`
(optional)
*
`import_url`
(optional)
-
`user_id`
(required) - user_id of owner
-
`name`
(required) - new project name
-
`description`
(optional) - short project description
-
`default_branch`
(optional) - 'master' by default
-
`issues_enabled`
(optional)
-
`merge_requests_enabled`
(optional)
-
`wiki_enabled`
(optional)
-
`snippets_enabled`
(optional)
-
`public`
(optional) - if
`true`
same as setting visibility_level = 20
-
`visibility_level`
(optional)
-
`import_url`
(optional)
## Remove project
### Remove project
Removes a project including all associated resources (issues, merge requests etc.)
...
...
@@ -294,8 +290,7 @@ DELETE /projects/:id
Parameters:
+
`id`
(required) - The ID of a project
-
`id`
(required) - The ID of a project
## Team members
...
...
@@ -309,9 +304,8 @@ GET /projects/:id/members
Parameters:
+
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
+
`query`
(optional) - Query string to search for members
-
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
-
`query`
(optional) - Query string to search for members
### Get project team member
...
...
@@ -323,8 +317,8 @@ GET /projects/:id/members/:user_id
Parameters:
+
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
+
`user_id`
(required) - The ID of a user
-
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
-
`user_id`
(required) - The ID of a user
```
json
{
...
...
@@ -338,7 +332,6 @@ Parameters:
}
```
### Add project team member
Adds a user to a project team. This is an idempotent method and can be called multiple times
...
...
@@ -351,10 +344,9 @@ POST /projects/:id/members
Parameters:
+
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
+
`user_id`
(required) - The ID of a user to add
+
`access_level`
(required) - Project access level
-
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
-
`user_id`
(required) - The ID of a user to add
-
`access_level`
(required) - Project access level
### Edit project team member
...
...
@@ -366,10 +358,9 @@ PUT /projects/:id/members/:user_id
Parameters:
+
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
+
`user_id`
(required) - The ID of a team member
+
`access_level`
(required) - Project access level
-
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
-
`user_id`
(required) - The ID of a team member
-
`access_level`
(required) - Project access level
### Remove project team member
...
...
@@ -381,15 +372,14 @@ DELETE /projects/:id/members/:user_id
Parameters:
+
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
+
`user_id`
(required) - The ID of a team member
-
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
-
`user_id`
(required) - The ID of a team member
This method is idempotent and can be called multiple times with the same parameters.
Revoking team membership for a user who is not currently a team member is considered success.
Please note that the returned JSON currently differs slightly. Thus you should not
rely on the returned JSON structure.
## Hooks
### List project hooks
...
...
@@ -402,8 +392,7 @@ GET /projects/:id/hooks
Parameters:
+
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
-
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
### Get project hook
...
...
@@ -415,8 +404,8 @@ GET /projects/:id/hooks/:hook_id
Parameters:
+
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
+
`hook_id`
(required) - The ID of a project hook
-
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
-
`hook_id`
(required) - The ID of a project hook
```
json
{
...
...
@@ -430,7 +419,6 @@ Parameters:
}
```
### Add project hook
Adds a hook to a specified project.
...
...
@@ -441,12 +429,11 @@ POST /projects/:id/hooks
Parameters:
+
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
+
`url`
(required) - The hook URL
+
`push_events`
- Trigger hook on push events
+
`issues_events`
- Trigger hook on issues events
+
`merge_requests_events`
- Trigger hook on merge_requests events
-
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
-
`url`
(required) - The hook URL
-
`push_events`
- Trigger hook on push events
-
`issues_events`
- Trigger hook on issues events
-
`merge_requests_events`
- Trigger hook on merge_requests events
### Edit project hook
...
...
@@ -458,13 +445,12 @@ PUT /projects/:id/hooks/:hook_id
Parameters:
+
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
+
`hook_id`
(required) - The ID of a project hook
+
`url`
(required) - The hook URL
+
`push_events`
- Trigger hook on push events
+
`issues_events`
- Trigger hook on issues events
+
`merge_requests_events`
- Trigger hook on merge_requests events
-
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
-
`hook_id`
(required) - The ID of a project hook
-
`url`
(required) - The hook URL
-
`push_events`
- Trigger hook on push events
-
`issues_events`
- Trigger hook on issues events
-
`merge_requests_events`
- Trigger hook on merge_requests events
### Delete project hook
...
...
@@ -477,13 +463,12 @@ DELETE /projects/:id/hooks/:hook_id
Parameters:
+
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
+
`hook_id`
(required) - The ID of hook to delete
-
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
-
`hook_id`
(required) - The ID of hook to delete
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
...
...
@@ -496,7 +481,7 @@ GET /projects/:id/repository/branches
Parameters:
+
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
-
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
```
json
[
...
...
@@ -561,9 +546,8 @@ GET /projects/:id/repository/branches/:branch
Parameters:
+
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
+
`branch`
(required) - The name of the branch.
-
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
-
`branch`
(required) - The name of the branch.
### Protect single branch
...
...
@@ -575,9 +559,8 @@ PUT /projects/:id/repository/branches/:branch/protect
Parameters:
+
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
+
`branch`
(required) - The name of the branch.
-
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
-
`branch`
(required) - The name of the branch.
### Unprotect single branch
...
...
@@ -589,9 +572,8 @@ PUT /projects/:id/repository/branches/:branch/unprotect
Parameters:
+
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
+
`branch`
(required) - The name of the branch.
-
`id`
(required) - The ID or NAMESPACE/PROJECT_NAME of a project
-
`branch`
(required) - The name of the branch.
## Admin fork relation
...
...
@@ -605,8 +587,8 @@ POST /projects/:id/fork/:forked_from_id
Parameters:
+
`id`
(required) - The ID of the project
+
`forked_from_id:`
(required) - The ID of the project that was forked from
-
`id`
(required) - The ID of the project
-
`forked_from_id:`
(required) - The ID of the project that was forked from
### Delete an existing forked from relationship
...
...
@@ -616,8 +598,7 @@ DELETE /projects/:id/fork
Parameter:
+
`id`
(required) - The ID of the project
-
`id`
(required) - The ID of the project
## Search for projects by name
...
...
@@ -629,6 +610,6 @@ GET /projects/search/:query
Parameters:
+
query (required) - A string contained in the project name
+
per_page (optional) - number of projects to return per page
+
page (optional) - the page to retrieve
-
query (required) - A string contained in the project name
-
per_page (optional) - number of projects to return per page
-
page (optional) - the page to retrieve
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