Commit f22e6c917d938748366faed71935e602967b8b89
1 parent
1b205cbc
Exists in
master
and in
4 other branches
Update project api docs.
Showing
1 changed file
with
132 additions
and
52 deletions
Show diff stats
doc/api/projects.md
... | ... | @@ -11,51 +11,72 @@ GET /projects |
11 | 11 | ```json |
12 | 12 | [ |
13 | 13 | { |
14 | - "id": 3, | |
15 | - "name": "rails", | |
14 | + "id": 4, | |
16 | 15 | "description": null, |
17 | 16 | "default_branch": "master", |
17 | + "public": false, | |
18 | + "ssh_url_to_repo": "git@example.com:diaspora/diaspora-client.git", | |
19 | + "http_url_to_repo": "http://example.com/diaspora/diaspora-client.git", | |
20 | + "web_url": "http://example.com/diaspora/diaspora-client", | |
18 | 21 | "owner": { |
19 | - "id": 1, | |
20 | - "username": "john_smith", | |
21 | - "email": "john@example.com", | |
22 | - "name": "John Smith", | |
23 | - "blocked": false, | |
24 | - "created_at": "2012-05-23T08:00:58Z" | |
22 | + "id": 3, | |
23 | + "name": "Diaspora", | |
24 | + "created_at": "2013-09-30T13: 46: 02Z" | |
25 | 25 | }, |
26 | - "public": true, | |
27 | - "path": "rails", | |
28 | - "path_with_namespace": "rails/rails", | |
29 | - "issues_enabled": false, | |
30 | - "merge_requests_enabled": false, | |
31 | - "wall_enabled": true, | |
26 | + "name": "Diaspora Client", | |
27 | + "name_with_namespace": "Diaspora / Diaspora Client", | |
28 | + "path": "diaspora-client", | |
29 | + "path_with_namespace": "diaspora/diaspora-client", | |
30 | + "issues_enabled": true, | |
31 | + "merge_requests_enabled": true, | |
32 | + "wall_enabled": false, | |
32 | 33 | "wiki_enabled": true, |
33 | - "created_at": "2012-05-23T08:05:02Z", | |
34 | - "last_activity_at": "2012-05-23T08:05:02Z" | |
34 | + "snippets_enabled": false, | |
35 | + "created_at": "2013-09-30T13: 46: 02Z", | |
36 | + "last_activity_at": "2013-09-30T13: 46: 02Z", | |
37 | + "namespace": { | |
38 | + "created_at": "2013-09-30T13: 46: 02Z", | |
39 | + "description": "", | |
40 | + "id": 3, | |
41 | + "name": "Diaspora", | |
42 | + "owner_id": 1, | |
43 | + "path": "diaspora", | |
44 | + "updated_at": "2013-09-30T13: 46: 02Z" | |
45 | + } | |
35 | 46 | }, |
36 | 47 | { |
37 | - "id": 5, | |
38 | - "name": "gitlab", | |
48 | + "id": 6, | |
39 | 49 | "description": null, |
40 | - "default_branch": "api", | |
41 | - "owner": { | |
42 | - "id": 1, | |
43 | - "username": "john_smith", | |
44 | - "email": "john@example.com", | |
45 | - "name": "John Smith", | |
46 | - "blocked": false, | |
47 | - "created_at": "2012-05-23T08:00:58Z" | |
50 | + "default_branch": "master", | |
51 | + "public": false, | |
52 | + "ssh_url_to_repo": "git@example.com:brightbox/puppet.git", | |
53 | + "http_url_to_repo": "http://example.com/brightbox/puppet.git", | |
54 | + "web_url": "http://example.com/brightbox/puppet", | |
55 | + "owner": { | |
56 | + "id": 4, | |
57 | + "name": "Brightbox", | |
58 | + "created_at": "2013-09-30T13:46:02Z" | |
48 | 59 | }, |
49 | - "public": true, | |
50 | - "path": "gitlab", | |
51 | - "path_with_namespace": "randx/gitlab", | |
60 | + "name": "Puppet", | |
61 | + "name_with_namespace": "Brightbox / Puppet", | |
62 | + "path": "puppet", | |
63 | + "path_with_namespace": "brightbox/puppet", | |
52 | 64 | "issues_enabled": true, |
53 | 65 | "merge_requests_enabled": true, |
54 | - "wall_enabled": true, | |
66 | + "wall_enabled": false, | |
55 | 67 | "wiki_enabled": true, |
56 | - "snippets_enabled": true, | |
57 | - "created_at": "2012-05-30T12:49:20Z", | |
58 | - "last_activity_at": "2012-05-23T08:05:02Z" | |
68 | + "snippets_enabled": false, | |
69 | + "created_at": "2013-09-30T13:46:02Z", | |
70 | + "last_activity_at": "2013-09-30T13:46:02Z", | |
71 | + "namespace": { | |
72 | + "created_at": "2013-09-30T13:46:02Z", | |
73 | + "description": "", | |
74 | + "id": 4, | |
75 | + "name": "Brightbox", | |
76 | + "owner_id": 1, | |
77 | + "path": "brightbox", | |
78 | + "updated_at": "2013-09-30T13:46:02Z" | |
79 | + } | |
59 | 80 | } |
60 | 81 | ] |
61 | 82 | ``` |
... | ... | @@ -76,29 +97,38 @@ Parameters: |
76 | 97 | |
77 | 98 | ```json |
78 | 99 | { |
79 | - "id": 5, | |
80 | - "name": "gitlab", | |
81 | - "name_with_namespace": "GitLab / gitlabhq", | |
100 | + "id": 3, | |
82 | 101 | "description": null, |
83 | - "default_branch": "api", | |
102 | + "default_branch": "master", | |
103 | + "public": false, | |
104 | + "ssh_url_to_repo": "git@example.com:diaspora/diaspora-project-site.git", | |
105 | + "http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git", | |
106 | + "web_url": "http://example.com/diaspora/diaspora-project-site", | |
84 | 107 | "owner": { |
85 | - "id": 1, | |
86 | - "username": "john_smith", | |
87 | - "email": "john@example.com", | |
88 | - "name": "John Smith", | |
89 | - "blocked": false, | |
90 | - "created_at": "2012-05-23T08:00:58Z" | |
108 | + "id": 3, | |
109 | + "name": "Diaspora", | |
110 | + "created_at": "2013-09-30T13: 46: 02Z" | |
91 | 111 | }, |
92 | - "public": true, | |
93 | - "path": "gitlab", | |
94 | - "path_with_namespace": "randx/gitlab", | |
112 | + "name": "Diaspora Project Site", | |
113 | + "name_with_namespace": "Diaspora / Diaspora Project Site", | |
114 | + "path": "diaspora-project-site", | |
115 | + "path_with_namespace": "diaspora/diaspora-project-site", | |
95 | 116 | "issues_enabled": true, |
96 | 117 | "merge_requests_enabled": true, |
97 | - "wall_enabled": true, | |
118 | + "wall_enabled": false, | |
98 | 119 | "wiki_enabled": true, |
99 | - "snippets_enabled": true, | |
100 | - "created_at": "2012-05-30T12:49:20Z", | |
101 | - "last_activity_at": "2012-05-23T08:05:02Z" | |
120 | + "snippets_enabled": false, | |
121 | + "created_at": "2013-09-30T13: 46: 02Z", | |
122 | + "last_activity_at": "2013-09-30T13: 46: 02Z", | |
123 | + "namespace": { | |
124 | + "created_at": "2013-09-30T13: 46: 02Z", | |
125 | + "description": "", | |
126 | + "id": 3, | |
127 | + "name": "Diaspora", | |
128 | + "owner_id": 1, | |
129 | + "path": "diaspora", | |
130 | + "updated_at": "2013-09-30T13: 46: 02Z" | |
131 | + } | |
102 | 132 | } |
103 | 133 | ``` |
104 | 134 | |
... | ... | @@ -193,13 +223,14 @@ Parameters: |
193 | 223 | |
194 | 224 | **Project access levels** |
195 | 225 | |
196 | -The project access levels are defined in the `user_project.rb` class. Currently, these levels are recognized: | |
226 | +The project access levels are defined in the `Gitlab::Access` module. Currently, these levels are recognized: | |
197 | 227 | |
198 | 228 | ``` |
199 | 229 | GUEST = 10 |
200 | 230 | REPORTER = 20 |
201 | 231 | DEVELOPER = 30 |
202 | 232 | MASTER = 40 |
233 | + OWNER = 50 | |
203 | 234 | ``` |
204 | 235 | |
205 | 236 | |
... | ... | @@ -261,7 +292,7 @@ Parameters: |
261 | 292 | "username": "john_smith", |
262 | 293 | "email": "john@example.com", |
263 | 294 | "name": "John Smith", |
264 | - "blocked": false, | |
295 | + "state": "active", | |
265 | 296 | "created_at": "2012-05-23T08:00:58Z", |
266 | 297 | "access_level": 40 |
267 | 298 | } |
... | ... | @@ -417,6 +448,55 @@ Parameters: |
417 | 448 | |
418 | 449 | + `id` (required) - The ID of the project |
419 | 450 | |
451 | +```json | |
452 | +[ | |
453 | + { | |
454 | + "name":"async", | |
455 | + "commit": { | |
456 | + "id":"a2b702edecdf41f07b42653eb1abe30ce98b9fca", | |
457 | + "parents": [{ | |
458 | + "id":"3f94fc7c85061973edc9906ae170cc269b07ca55" | |
459 | + }], | |
460 | + "tree": "c68537c6534a02cc2b176ca1549f4ffa190b58ee", | |
461 | + "message":"give caolan his credit where it's due (up top)", | |
462 | + "author": { | |
463 | + "name":"Jeremy Ashkenas", | |
464 | + "email":"jashkenas@example.com" | |
465 | + }, | |
466 | + "committer": { | |
467 | + "name":"Jeremy Ashkenas", | |
468 | + "email":"jashkenas@example.com" | |
469 | + }, | |
470 | + "authored_date":"2010-12-08T21:28:50+00:00", | |
471 | + "committed_date":"2010-12-08T21:28:50+00:00" | |
472 | + }, | |
473 | + "protected":false | |
474 | + }, | |
475 | + { | |
476 | + "name": "gh-pages", | |
477 | + "commit": { | |
478 | + "id": "101c10a60019fe870d21868835f65c25d64968fc", | |
479 | + "parents": [{ | |
480 | + "id": "9c15d2e26945a665131af5d7b6d30a06ba338aaa" | |
481 | + }], | |
482 | + "tree": "fb5cc9d45da3014b17a876ad539976a0fb9b352a", | |
483 | + "message": "Underscore.js 1.5.2", | |
484 | + "author": { | |
485 | + "name": "Jeremy Ashkenas", | |
486 | + "email": "jashkenas@example.com" | |
487 | + }, | |
488 | + "committer": { | |
489 | + "name": "Jeremy Ashkenas", | |
490 | + "email": "jashkenas@example.com" | |
491 | + }, | |
492 | + "authored_date": "2013-09-07T12: 58: 21+00: 00", | |
493 | + "committed_date": "2013-09-07T12: 58: 21+00: 00" | |
494 | + }, | |
495 | + "protected": false | |
496 | + } | |
497 | +] | |
498 | + | |
499 | +``` | |
420 | 500 | |
421 | 501 | ### List single branch |
422 | 502 | ... | ... |