Update project api docs.
This commit is contained in:
parent
1b205cbc39
commit
f22e6c917d
|
@ -11,51 +11,72 @@ GET /projects
|
|||
```json
|
||||
[
|
||||
{
|
||||
"id": 3,
|
||||
"name": "rails",
|
||||
"id": 4,
|
||||
"description": null,
|
||||
"default_branch": "master",
|
||||
"public": false,
|
||||
"ssh_url_to_repo": "git@example.com:diaspora/diaspora-client.git",
|
||||
"http_url_to_repo": "http://example.com/diaspora/diaspora-client.git",
|
||||
"web_url": "http://example.com/diaspora/diaspora-client",
|
||||
"owner": {
|
||||
"id": 1,
|
||||
"username": "john_smith",
|
||||
"email": "john@example.com",
|
||||
"name": "John Smith",
|
||||
"blocked": false,
|
||||
"created_at": "2012-05-23T08:00:58Z"
|
||||
"id": 3,
|
||||
"name": "Diaspora",
|
||||
"created_at": "2013-09-30T13: 46: 02Z"
|
||||
},
|
||||
"public": true,
|
||||
"path": "rails",
|
||||
"path_with_namespace": "rails/rails",
|
||||
"issues_enabled": false,
|
||||
"merge_requests_enabled": false,
|
||||
"wall_enabled": true,
|
||||
"wiki_enabled": true,
|
||||
"created_at": "2012-05-23T08:05:02Z",
|
||||
"last_activity_at": "2012-05-23T08:05:02Z"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "gitlab",
|
||||
"description": null,
|
||||
"default_branch": "api",
|
||||
"owner": {
|
||||
"id": 1,
|
||||
"username": "john_smith",
|
||||
"email": "john@example.com",
|
||||
"name": "John Smith",
|
||||
"blocked": false,
|
||||
"created_at": "2012-05-23T08:00:58Z"
|
||||
},
|
||||
"public": true,
|
||||
"path": "gitlab",
|
||||
"path_with_namespace": "randx/gitlab",
|
||||
"name": "Diaspora Client",
|
||||
"name_with_namespace": "Diaspora / Diaspora Client",
|
||||
"path": "diaspora-client",
|
||||
"path_with_namespace": "diaspora/diaspora-client",
|
||||
"issues_enabled": true,
|
||||
"merge_requests_enabled": true,
|
||||
"wall_enabled": true,
|
||||
"wall_enabled": false,
|
||||
"wiki_enabled": true,
|
||||
"snippets_enabled": true,
|
||||
"created_at": "2012-05-30T12:49:20Z",
|
||||
"last_activity_at": "2012-05-23T08:05:02Z"
|
||||
"snippets_enabled": false,
|
||||
"created_at": "2013-09-30T13: 46: 02Z",
|
||||
"last_activity_at": "2013-09-30T13: 46: 02Z",
|
||||
"namespace": {
|
||||
"created_at": "2013-09-30T13: 46: 02Z",
|
||||
"description": "",
|
||||
"id": 3,
|
||||
"name": "Diaspora",
|
||||
"owner_id": 1,
|
||||
"path": "diaspora",
|
||||
"updated_at": "2013-09-30T13: 46: 02Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"description": null,
|
||||
"default_branch": "master",
|
||||
"public": false,
|
||||
"ssh_url_to_repo": "git@example.com:brightbox/puppet.git",
|
||||
"http_url_to_repo": "http://example.com/brightbox/puppet.git",
|
||||
"web_url": "http://example.com/brightbox/puppet",
|
||||
"owner": {
|
||||
"id": 4,
|
||||
"name": "Brightbox",
|
||||
"created_at": "2013-09-30T13:46:02Z"
|
||||
},
|
||||
"name": "Puppet",
|
||||
"name_with_namespace": "Brightbox / Puppet",
|
||||
"path": "puppet",
|
||||
"path_with_namespace": "brightbox/puppet",
|
||||
"issues_enabled": true,
|
||||
"merge_requests_enabled": true,
|
||||
"wall_enabled": false,
|
||||
"wiki_enabled": true,
|
||||
"snippets_enabled": false,
|
||||
"created_at": "2013-09-30T13:46:02Z",
|
||||
"last_activity_at": "2013-09-30T13:46:02Z",
|
||||
"namespace": {
|
||||
"created_at": "2013-09-30T13:46:02Z",
|
||||
"description": "",
|
||||
"id": 4,
|
||||
"name": "Brightbox",
|
||||
"owner_id": 1,
|
||||
"path": "brightbox",
|
||||
"updated_at": "2013-09-30T13:46:02Z"
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
@ -76,29 +97,38 @@ Parameters:
|
|||
|
||||
```json
|
||||
{
|
||||
"id": 5,
|
||||
"name": "gitlab",
|
||||
"name_with_namespace": "GitLab / gitlabhq",
|
||||
"id": 3,
|
||||
"description": null,
|
||||
"default_branch": "api",
|
||||
"default_branch": "master",
|
||||
"public": false,
|
||||
"ssh_url_to_repo": "git@example.com:diaspora/diaspora-project-site.git",
|
||||
"http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git",
|
||||
"web_url": "http://example.com/diaspora/diaspora-project-site",
|
||||
"owner": {
|
||||
"id": 1,
|
||||
"username": "john_smith",
|
||||
"email": "john@example.com",
|
||||
"name": "John Smith",
|
||||
"blocked": false,
|
||||
"created_at": "2012-05-23T08:00:58Z"
|
||||
"id": 3,
|
||||
"name": "Diaspora",
|
||||
"created_at": "2013-09-30T13: 46: 02Z"
|
||||
},
|
||||
"public": true,
|
||||
"path": "gitlab",
|
||||
"path_with_namespace": "randx/gitlab",
|
||||
"name": "Diaspora Project Site",
|
||||
"name_with_namespace": "Diaspora / Diaspora Project Site",
|
||||
"path": "diaspora-project-site",
|
||||
"path_with_namespace": "diaspora/diaspora-project-site",
|
||||
"issues_enabled": true,
|
||||
"merge_requests_enabled": true,
|
||||
"wall_enabled": true,
|
||||
"wall_enabled": false,
|
||||
"wiki_enabled": true,
|
||||
"snippets_enabled": true,
|
||||
"created_at": "2012-05-30T12:49:20Z",
|
||||
"last_activity_at": "2012-05-23T08:05:02Z"
|
||||
"snippets_enabled": false,
|
||||
"created_at": "2013-09-30T13: 46: 02Z",
|
||||
"last_activity_at": "2013-09-30T13: 46: 02Z",
|
||||
"namespace": {
|
||||
"created_at": "2013-09-30T13: 46: 02Z",
|
||||
"description": "",
|
||||
"id": 3,
|
||||
"name": "Diaspora",
|
||||
"owner_id": 1,
|
||||
"path": "diaspora",
|
||||
"updated_at": "2013-09-30T13: 46: 02Z"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -193,13 +223,14 @@ Parameters:
|
|||
|
||||
**Project access levels**
|
||||
|
||||
The project access levels are defined in the `user_project.rb` class. Currently, these levels are recognized:
|
||||
The project access levels are defined in the `Gitlab::Access` module. Currently, these levels are recognized:
|
||||
|
||||
```
|
||||
GUEST = 10
|
||||
REPORTER = 20
|
||||
DEVELOPER = 30
|
||||
MASTER = 40
|
||||
OWNER = 50
|
||||
```
|
||||
|
||||
|
||||
|
@ -261,7 +292,7 @@ Parameters:
|
|||
"username": "john_smith",
|
||||
"email": "john@example.com",
|
||||
"name": "John Smith",
|
||||
"blocked": false,
|
||||
"state": "active",
|
||||
"created_at": "2012-05-23T08:00:58Z",
|
||||
"access_level": 40
|
||||
}
|
||||
|
@ -417,6 +448,55 @@ Parameters:
|
|||
|
||||
+ `id` (required) - The ID of the project
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"name":"async",
|
||||
"commit": {
|
||||
"id":"a2b702edecdf41f07b42653eb1abe30ce98b9fca",
|
||||
"parents": [{
|
||||
"id":"3f94fc7c85061973edc9906ae170cc269b07ca55"
|
||||
}],
|
||||
"tree": "c68537c6534a02cc2b176ca1549f4ffa190b58ee",
|
||||
"message":"give caolan his credit where it's due (up top)",
|
||||
"author": {
|
||||
"name":"Jeremy Ashkenas",
|
||||
"email":"jashkenas@example.com"
|
||||
},
|
||||
"committer": {
|
||||
"name":"Jeremy Ashkenas",
|
||||
"email":"jashkenas@example.com"
|
||||
},
|
||||
"authored_date":"2010-12-08T21:28:50+00:00",
|
||||
"committed_date":"2010-12-08T21:28:50+00:00"
|
||||
},
|
||||
"protected":false
|
||||
},
|
||||
{
|
||||
"name": "gh-pages",
|
||||
"commit": {
|
||||
"id": "101c10a60019fe870d21868835f65c25d64968fc",
|
||||
"parents": [{
|
||||
"id": "9c15d2e26945a665131af5d7b6d30a06ba338aaa"
|
||||
}],
|
||||
"tree": "fb5cc9d45da3014b17a876ad539976a0fb9b352a",
|
||||
"message": "Underscore.js 1.5.2",
|
||||
"author": {
|
||||
"name": "Jeremy Ashkenas",
|
||||
"email": "jashkenas@example.com"
|
||||
},
|
||||
"committer": {
|
||||
"name": "Jeremy Ashkenas",
|
||||
"email": "jashkenas@example.com"
|
||||
},
|
||||
"authored_date": "2013-09-07T12: 58: 21+00: 00",
|
||||
"committed_date": "2013-09-07T12: 58: 21+00: 00"
|
||||
},
|
||||
"protected": false
|
||||
}
|
||||
]
|
||||
|
||||
```
|
||||
|
||||
### List single branch
|
||||
|
||||
|
|
Loading…
Reference in New Issue