Merge branch 'master' into fixes/api
This commit is contained in:
commit
8045a81bcf
261 changed files with 1794 additions and 1417 deletions
|
@ -32,6 +32,7 @@ When listing resources you can pass the following parameters:
|
|||
+ [Users](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/users.md)
|
||||
+ [Session](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/session.md)
|
||||
+ [Projects](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/projects.md)
|
||||
+ [Groups](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/groups.md)
|
||||
+ [Snippets](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/snippets.md)
|
||||
+ [Repositories](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/repositories.md)
|
||||
+ [Issues](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/issues.md)
|
||||
|
|
45
doc/api/groups.md
Normal file
45
doc/api/groups.md
Normal file
|
@ -0,0 +1,45 @@
|
|||
## List project groups
|
||||
|
||||
Get a list of groups. (As user: my groups, as admin: all groups)
|
||||
|
||||
```
|
||||
GET /groups
|
||||
```
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Foobar Group",
|
||||
"path": "foo-bar",
|
||||
"owner_id": 18
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Details of group
|
||||
|
||||
Get all details of a group.
|
||||
|
||||
```
|
||||
GET /groups/:id
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `id` (required) - The ID of a group
|
||||
|
||||
## New group
|
||||
|
||||
Create a new project group. Available only for admin
|
||||
|
||||
```
|
||||
POST /groups
|
||||
```
|
||||
|
||||
Parameters:
|
||||
+ `name` (required) - Email
|
||||
+ `path` - Password
|
||||
|
||||
Will return created group with status `201 Created` on success, or `404 Not found` on fail.
|
||||
|
|
@ -30,6 +30,19 @@ Parameters:
|
|||
|
||||
+ `id` (required) - The ID of a project
|
||||
|
||||
### List merge request notes
|
||||
|
||||
Get a list of merge request notes.
|
||||
|
||||
```
|
||||
GET /projects/:id/merge_requests/:merge_request_id/notes
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `id` (required) - The ID of a project
|
||||
+ `merge_request_id` (required) - The ID of an merge request
|
||||
|
||||
### List issue notes
|
||||
|
||||
Get a list of issue notes.
|
||||
|
|
|
@ -22,6 +22,8 @@ GET /projects
|
|||
"created_at": "2012-05-23T08:00:58Z"
|
||||
},
|
||||
"private": true,
|
||||
"path": "rails",
|
||||
"path_with_namespace": "rails/rails",
|
||||
"issues_enabled": false,
|
||||
"merge_requests_enabled": false,
|
||||
"wall_enabled": true,
|
||||
|
@ -42,6 +44,8 @@ GET /projects
|
|||
"created_at": "2012-05-23T08:00:58Z"
|
||||
},
|
||||
"private": true,
|
||||
"path": "gitlab",
|
||||
"path_with_namespace": "randx/gitlab",
|
||||
"issues_enabled": true,
|
||||
"merge_requests_enabled": true,
|
||||
"wall_enabled": true,
|
||||
|
@ -78,6 +82,8 @@ Parameters:
|
|||
"created_at": "2012-05-23T08:00:58Z"
|
||||
},
|
||||
"private": true,
|
||||
"path": "gitlab",
|
||||
"path_with_namespace": "randx/gitlab",
|
||||
"issues_enabled": true,
|
||||
"merge_requests_enabled": true,
|
||||
"wall_enabled": true,
|
||||
|
|
|
@ -33,7 +33,8 @@ Parameters:
|
|||
},
|
||||
"authored_date": "2012-06-27T05:51:39-07:00",
|
||||
"committed_date": "2012-06-28T03:44:20-07:00"
|
||||
}
|
||||
},
|
||||
"protected": true
|
||||
}
|
||||
]
|
||||
```
|
||||
|
@ -73,7 +74,88 @@ Parameters:
|
|||
},
|
||||
"authored_date": "2012-06-27T05:51:39-07:00",
|
||||
"committed_date": "2012-06-28T03:44:20-07:00"
|
||||
}
|
||||
},
|
||||
"protected": true
|
||||
}
|
||||
```
|
||||
|
||||
## Protect a project repository branch
|
||||
|
||||
Protect a single project repository branch.
|
||||
|
||||
```
|
||||
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 a project repository branch
|
||||
|
||||
Unprotect a single project repository branch.
|
||||
|
||||
```
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -110,7 +192,8 @@ Parameters:
|
|||
},
|
||||
"authored_date": "2012-05-28T04:42:42-07:00",
|
||||
"committed_date": "2012-05-28T04:42:42-07:00"
|
||||
}
|
||||
},
|
||||
"protected": null
|
||||
}
|
||||
]
|
||||
```
|
||||
|
|
|
@ -20,6 +20,8 @@ GET /users
|
|||
"linkedin": "",
|
||||
"twitter": "",
|
||||
"dark_scheme": false,
|
||||
"extern_uid": "john.smith",
|
||||
"provider": "provider_name",
|
||||
"theme_id": 1
|
||||
},
|
||||
{
|
||||
|
@ -34,6 +36,8 @@ GET /users
|
|||
"linkedin": "",
|
||||
"twitter": "",
|
||||
"dark_scheme": true,
|
||||
"extern_uid": "jack.smith",
|
||||
"provider": "provider_name",
|
||||
"theme_id": 1
|
||||
}
|
||||
]
|
||||
|
@ -64,6 +68,8 @@ Parameters:
|
|||
"linkedin": "",
|
||||
"twitter": "",
|
||||
"dark_scheme": false,
|
||||
"extern_uid": "john.smith",
|
||||
"provider": "provider_name",
|
||||
"theme_id": 1
|
||||
}
|
||||
```
|
||||
|
@ -84,10 +90,47 @@ Parameters:
|
|||
+ `linkedin` - Linkedin
|
||||
+ `twitter` - Twitter account
|
||||
+ `projects_limit` - Number of projects user can create
|
||||
+ `extern_uid` - External UID
|
||||
+ `provider` - External provider name
|
||||
+ `bio` - User's bio
|
||||
|
||||
Will return created user with status `201 Created` on success, or `404 Not
|
||||
found` on fail.
|
||||
|
||||
## User modification
|
||||
Modify user. Available only for admin
|
||||
|
||||
```
|
||||
PUT /users/:id
|
||||
```
|
||||
|
||||
Parameters:
|
||||
+ `email` - Email
|
||||
+ `username` - Username
|
||||
+ `name` - Name
|
||||
+ `password` - Password
|
||||
+ `skype` - Skype ID
|
||||
+ `linkedin` - Linkedin
|
||||
+ `twitter` - Twitter account
|
||||
+ `projects_limit` - Limit projects wich user can create
|
||||
+ `extern_uid` - External UID
|
||||
+ `provider` - External provider name
|
||||
+ `bio` - User's bio
|
||||
|
||||
|
||||
Will return created user with status `200 OK` on success, or `404 Not
|
||||
found` on fail.
|
||||
|
||||
## User deletion
|
||||
Delete user. Available only for admin
|
||||
|
||||
```
|
||||
DELETE /users/:id
|
||||
```
|
||||
|
||||
Will return deleted user with status `200 OK` on success, or `404 Not
|
||||
found` on fail.
|
||||
|
||||
## Current user
|
||||
|
||||
Get currently authenticated user.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue