Commit 8fe58ed541e04f81de8e401c17d021aa4092a526
Exists in
master
and in
4 other branches
Merge pull request #2330 from gitlabhq/v4.0-api-fixes
V4.0 API fixes
Showing
16 changed files
with
90 additions
and
95 deletions
Show diff stats
app/views/layouts/_init_auto_complete.html.haml
| 1 | 1 | :javascript |
| 2 | 2 | $(function() { |
| 3 | - GitLab.GfmAutoComplete.Members.url = "#{ "/api/v2/projects/#{@project.id}/members" if @project }"; | |
| 3 | + GitLab.GfmAutoComplete.Members.url = "#{ "/api/v3/projects/#{@project.id}/members" if @project }"; | |
| 4 | 4 | GitLab.GfmAutoComplete.Members.params.private_token = "#{current_user.private_token}"; |
| 5 | 5 | |
| 6 | 6 | GitLab.GfmAutoComplete.Emoji.data = #{raw emoji_autocomplete_source}; | ... | ... |
doc/api/README.md
| ... | ... | @@ -15,7 +15,7 @@ API requests should be prefixed with `api` and the API version. The API version |
| 15 | 15 | Example of a valid API request: |
| 16 | 16 | |
| 17 | 17 | ``` |
| 18 | -GET http://example.com/api/v2/projects?private_token=QVy1PB7sTxfy4pqfZM1U | |
| 18 | +GET http://example.com/api/v3/projects?private_token=QVy1PB7sTxfy4pqfZM1U | |
| 19 | 19 | ``` |
| 20 | 20 | |
| 21 | 21 | The API uses JSON to serialize data. You don't need to specify `.json` at the end of API URL. | ... | ... |
doc/api/issues.md
| ... | ... | @@ -78,7 +78,7 @@ GET /projects/:id/issues |
| 78 | 78 | |
| 79 | 79 | Parameters: |
| 80 | 80 | |
| 81 | -+ `id` (required) - The ID or code name of a project | |
| 81 | ++ `id` (required) - The ID of a project | |
| 82 | 82 | |
| 83 | 83 | ## Single issue |
| 84 | 84 | |
| ... | ... | @@ -90,7 +90,7 @@ GET /projects/:id/issues/:issue_id |
| 90 | 90 | |
| 91 | 91 | Parameters: |
| 92 | 92 | |
| 93 | -+ `id` (required) - The ID or code name of a project | |
| 93 | ++ `id` (required) - The ID of a project | |
| 94 | 94 | + `issue_id` (required) - The ID of a project issue |
| 95 | 95 | |
| 96 | 96 | ```json |
| ... | ... | @@ -143,7 +143,7 @@ POST /projects/:id/issues |
| 143 | 143 | |
| 144 | 144 | Parameters: |
| 145 | 145 | |
| 146 | -+ `id` (required) - The ID or code name of a project | |
| 146 | ++ `id` (required) - The ID of a project | |
| 147 | 147 | + `title` (required) - The title of an issue |
| 148 | 148 | + `description` (optional) - The description of an issue |
| 149 | 149 | + `assignee_id` (optional) - The ID of a user to assign issue |
| ... | ... | @@ -162,7 +162,7 @@ PUT /projects/:id/issues/:issue_id |
| 162 | 162 | |
| 163 | 163 | Parameters: |
| 164 | 164 | |
| 165 | -+ `id` (required) - The ID or code name of a project | |
| 165 | ++ `id` (required) - The ID of a project | |
| 166 | 166 | + `issue_id` (required) - The ID of a project's issue |
| 167 | 167 | + `title` (optional) - The title of an issue |
| 168 | 168 | + `description` (optional) - The description of an issue | ... | ... |
doc/api/merge_requests.md
| ... | ... | @@ -8,7 +8,7 @@ GET /projects/:id/merge_requests |
| 8 | 8 | |
| 9 | 9 | Parameters: |
| 10 | 10 | |
| 11 | -+ `id` (required) - The ID or code name of a project | |
| 11 | ++ `id` (required) - The ID of a project | |
| 12 | 12 | |
| 13 | 13 | ```json |
| 14 | 14 | [ |
| ... | ... | @@ -50,7 +50,7 @@ GET /projects/:id/merge_request/:merge_request_id |
| 50 | 50 | |
| 51 | 51 | Parameters: |
| 52 | 52 | |
| 53 | -+ `id` (required) - The ID or code name of a project | |
| 53 | ++ `id` (required) - The ID of a project | |
| 54 | 54 | + `merge_request_id` (required) - The ID of MR |
| 55 | 55 | |
| 56 | 56 | ```json |
| ... | ... | @@ -92,7 +92,7 @@ POST /projects/:id/merge_requests |
| 92 | 92 | |
| 93 | 93 | Parameters: |
| 94 | 94 | |
| 95 | -+ `id` (required) - The ID or code name of a project | |
| 95 | ++ `id` (required) - The ID of a project | |
| 96 | 96 | + `source_branch` (required) - The source branch |
| 97 | 97 | + `target_branch` (required) - The target branch |
| 98 | 98 | + `assignee_id` - Assignee user ID |
| ... | ... | @@ -136,7 +136,7 @@ PUT /projects/:id/merge_request/:merge_request_id |
| 136 | 136 | |
| 137 | 137 | Parameters: |
| 138 | 138 | |
| 139 | -+ `id` (required) - The ID or code name of a project | |
| 139 | ++ `id` (required) - The ID of a project | |
| 140 | 140 | + `merge_request_id` (required) - ID of MR |
| 141 | 141 | + `source_branch` - The source branch |
| 142 | 142 | + `target_branch` - The target branch |
| ... | ... | @@ -182,7 +182,7 @@ POST /projects/:id/merge_request/:merge_request_id/comments |
| 182 | 182 | |
| 183 | 183 | Parameters: |
| 184 | 184 | |
| 185 | -+ `id` (required) - The ID or code name of a project | |
| 185 | ++ `id` (required) - The ID of a project | |
| 186 | 186 | + `merge_request_id` (required) - ID of MR |
| 187 | 187 | + `note` (required) - Text of comment |
| 188 | 188 | ... | ... |
doc/api/milestones.md
| ... | ... | @@ -8,7 +8,7 @@ GET /projects/:id/milestones |
| 8 | 8 | |
| 9 | 9 | Parameters: |
| 10 | 10 | |
| 11 | -+ `id` (required) - The ID or code name of a project | |
| 11 | ++ `id` (required) - The ID of a project | |
| 12 | 12 | |
| 13 | 13 | ## Single milestone |
| 14 | 14 | |
| ... | ... | @@ -20,7 +20,7 @@ GET /projects/:id/milestones/:milestone_id |
| 20 | 20 | |
| 21 | 21 | Parameters: |
| 22 | 22 | |
| 23 | -+ `id` (required) - The ID or code name of a project | |
| 23 | ++ `id` (required) - The ID of a project | |
| 24 | 24 | + `milestone_id` (required) - The ID of a project milestone |
| 25 | 25 | |
| 26 | 26 | ## New milestone |
| ... | ... | @@ -33,7 +33,7 @@ POST /projects/:id/milestones |
| 33 | 33 | |
| 34 | 34 | Parameters: |
| 35 | 35 | |
| 36 | -+ `id` (required) - The ID or code name of a project | |
| 36 | ++ `id` (required) - The ID of a project | |
| 37 | 37 | + `milestone_id` (required) - The ID of a project milestone |
| 38 | 38 | + `title` (required) - The title of an milestone |
| 39 | 39 | + `description` (optional) - The description of the milestone |
| ... | ... | @@ -49,7 +49,7 @@ PUT /projects/:id/milestones/:milestone_id |
| 49 | 49 | |
| 50 | 50 | Parameters: |
| 51 | 51 | |
| 52 | -+ `id` (required) - The ID or code name of a project | |
| 52 | ++ `id` (required) - The ID of a project | |
| 53 | 53 | + `milestone_id` (required) - The ID of a project milestone |
| 54 | 54 | + `title` (optional) - The title of a milestone |
| 55 | 55 | + `description` (optional) - The description of a milestone | ... | ... |
doc/api/notes.md
| ... | ... | @@ -28,7 +28,7 @@ GET /projects/:id/notes |
| 28 | 28 | |
| 29 | 29 | Parameters: |
| 30 | 30 | |
| 31 | -+ `id` (required) - The ID or code name of a project | |
| 31 | ++ `id` (required) - The ID of a project | |
| 32 | 32 | |
| 33 | 33 | ### List issue notes |
| 34 | 34 | |
| ... | ... | @@ -40,7 +40,7 @@ GET /projects/:id/issues/:issue_id/notes |
| 40 | 40 | |
| 41 | 41 | Parameters: |
| 42 | 42 | |
| 43 | -+ `id` (required) - The ID or code name of a project | |
| 43 | ++ `id` (required) - The ID of a project | |
| 44 | 44 | + `issue_id` (required) - The ID of an issue |
| 45 | 45 | |
| 46 | 46 | ### List snippet notes |
| ... | ... | @@ -53,7 +53,7 @@ GET /projects/:id/snippets/:snippet_id/notes |
| 53 | 53 | |
| 54 | 54 | Parameters: |
| 55 | 55 | |
| 56 | -+ `id` (required) - The ID or code name of a project | |
| 56 | ++ `id` (required) - The ID of a project | |
| 57 | 57 | + `snippet_id` (required) - The ID of a snippet |
| 58 | 58 | |
| 59 | 59 | ## Single note |
| ... | ... | @@ -68,7 +68,7 @@ GET /projects/:id/notes/:note_id |
| 68 | 68 | |
| 69 | 69 | Parameters: |
| 70 | 70 | |
| 71 | -+ `id` (required) - The ID or code name of a project | |
| 71 | ++ `id` (required) - The ID of a project | |
| 72 | 72 | + `note_id` (required) - The ID of a wall note |
| 73 | 73 | |
| 74 | 74 | ### Single issue note |
| ... | ... | @@ -81,7 +81,7 @@ GET /projects/:id/issues/:issue_id/:notes/:note_id |
| 81 | 81 | |
| 82 | 82 | Parameters: |
| 83 | 83 | |
| 84 | -+ `id` (required) - The ID or code name of a project | |
| 84 | ++ `id` (required) - The ID of a project | |
| 85 | 85 | + `issue_id` (required) - The ID of a project issue |
| 86 | 86 | + `note_id` (required) - The ID of an issue note |
| 87 | 87 | |
| ... | ... | @@ -95,7 +95,7 @@ GET /projects/:id/issues/:snippet_id/:notes/:note_id |
| 95 | 95 | |
| 96 | 96 | Parameters: |
| 97 | 97 | |
| 98 | -+ `id` (required) - The ID or code name of a project | |
| 98 | ++ `id` (required) - The ID of a project | |
| 99 | 99 | + `snippet_id` (required) - The ID of a project snippet |
| 100 | 100 | + `note_id` (required) - The ID of an snippet note |
| 101 | 101 | |
| ... | ... | @@ -111,7 +111,7 @@ POST /projects/:id/notes |
| 111 | 111 | |
| 112 | 112 | Parameters: |
| 113 | 113 | |
| 114 | -+ `id` (required) - The ID or code name of a project | |
| 114 | ++ `id` (required) - The ID of a project | |
| 115 | 115 | + `body` (required) - The content of a note |
| 116 | 116 | |
| 117 | 117 | Will return created note with status `201 Created` on success, or `404 Not found` on fail. |
| ... | ... | @@ -127,7 +127,7 @@ POST /projects/:id/issues/:issue_id/notes |
| 127 | 127 | |
| 128 | 128 | Parameters: |
| 129 | 129 | |
| 130 | -+ `id` (required) - The ID or code name of a project | |
| 130 | ++ `id` (required) - The ID of a project | |
| 131 | 131 | + `issue_id` (required) - The ID of an issue |
| 132 | 132 | + `body` (required) - The content of a note |
| 133 | 133 | |
| ... | ... | @@ -143,7 +143,7 @@ POST /projects/:id/snippets/:snippet_id/notes |
| 143 | 143 | |
| 144 | 144 | Parameters: |
| 145 | 145 | |
| 146 | -+ `id` (required) - The ID or code name of a project | |
| 146 | ++ `id` (required) - The ID of a project | |
| 147 | 147 | + `snippet_id` (required) - The ID of an snippet |
| 148 | 148 | + `body` (required) - The content of a note |
| 149 | 149 | ... | ... |
doc/api/projects.md
| ... | ... | @@ -10,7 +10,6 @@ GET /projects |
| 10 | 10 | [ |
| 11 | 11 | { |
| 12 | 12 | "id": 3, |
| 13 | - "code": "rails", | |
| 14 | 13 | "name": "rails", |
| 15 | 14 | "description": null, |
| 16 | 15 | "path": "rails", |
| ... | ... | @@ -32,7 +31,6 @@ GET /projects |
| 32 | 31 | }, |
| 33 | 32 | { |
| 34 | 33 | "id": 5, |
| 35 | - "code": "gitlab", | |
| 36 | 34 | "name": "gitlab", |
| 37 | 35 | "description": null, |
| 38 | 36 | "path": "gitlab", |
| ... | ... | @@ -65,12 +63,11 @@ GET /projects/:id |
| 65 | 63 | |
| 66 | 64 | Parameters: |
| 67 | 65 | |
| 68 | -+ `id` (required) - The ID or code name of a project | |
| 66 | ++ `id` (required) - The ID of a project | |
| 69 | 67 | |
| 70 | 68 | ```json |
| 71 | 69 | { |
| 72 | 70 | "id": 5, |
| 73 | - "code": "gitlab", | |
| 74 | 71 | "name": "gitlab", |
| 75 | 72 | "description": null, |
| 76 | 73 | "path": "gitlab", |
| ... | ... | @@ -103,7 +100,6 @@ POST /projects |
| 103 | 100 | Parameters: |
| 104 | 101 | |
| 105 | 102 | + `name` (required) - new project name |
| 106 | -+ `code` (optional) - new project code, uses project name if not set | |
| 107 | 103 | + `path` (optional) - new project path, uses project name if not set |
| 108 | 104 | + `description` (optional) - short project description |
| 109 | 105 | + `default_branch` (optional) - 'master' by default |
| ... | ... | @@ -125,7 +121,7 @@ GET /projects/:id/members |
| 125 | 121 | |
| 126 | 122 | Parameters: |
| 127 | 123 | |
| 128 | -+ `id` (required) - The ID or code name of a project | |
| 124 | ++ `id` (required) - The ID of a project | |
| 129 | 125 | + `query` - Query string |
| 130 | 126 | |
| 131 | 127 | ## Get project team member |
| ... | ... | @@ -138,7 +134,7 @@ GET /projects/:id/members/:user_id |
| 138 | 134 | |
| 139 | 135 | Parameters: |
| 140 | 136 | |
| 141 | -+ `id` (required) - The ID or code name of a project | |
| 137 | ++ `id` (required) - The ID of a project | |
| 142 | 138 | + `user_id` (required) - The ID of a user |
| 143 | 139 | |
| 144 | 140 | ```json |
| ... | ... | @@ -164,7 +160,7 @@ POST /projects/:id/members |
| 164 | 160 | |
| 165 | 161 | Parameters: |
| 166 | 162 | |
| 167 | -+ `id` (required) - The ID or code name of a project | |
| 163 | ++ `id` (required) - The ID of a project | |
| 168 | 164 | + `user_id` (required) - The ID of a user to add |
| 169 | 165 | + `access_level` (required) - Project access level |
| 170 | 166 | |
| ... | ... | @@ -180,7 +176,7 @@ PUT /projects/:id/members/:user_id |
| 180 | 176 | |
| 181 | 177 | Parameters: |
| 182 | 178 | |
| 183 | -+ `id` (required) - The ID or code name of a project | |
| 179 | ++ `id` (required) - The ID of a project | |
| 184 | 180 | + `user_id` (required) - The ID of a team member |
| 185 | 181 | + `access_level` (required) - Project access level |
| 186 | 182 | |
| ... | ... | @@ -196,7 +192,7 @@ DELETE /projects/:id/members/:user_id |
| 196 | 192 | |
| 197 | 193 | Parameters: |
| 198 | 194 | |
| 199 | -+ `id` (required) - The ID or code name of a project | |
| 195 | ++ `id` (required) - The ID of a project | |
| 200 | 196 | + `user_id` (required) - The ID of a team member |
| 201 | 197 | |
| 202 | 198 | Status code `200` will be returned on success. |
| ... | ... | @@ -211,7 +207,7 @@ GET /projects/:id/hooks |
| 211 | 207 | |
| 212 | 208 | Parameters: |
| 213 | 209 | |
| 214 | -+ `id` (required) - The ID or code name of a project | |
| 210 | ++ `id` (required) - The ID of a project | |
| 215 | 211 | |
| 216 | 212 | Will return hooks with status `200 OK` on success, or `404 Not found` on fail. |
| 217 | 213 | |
| ... | ... | @@ -225,7 +221,7 @@ GET /projects/:id/hooks/:hook_id |
| 225 | 221 | |
| 226 | 222 | Parameters: |
| 227 | 223 | |
| 228 | -+ `id` (required) - The ID or code name of a project | |
| 224 | ++ `id` (required) - The ID of a project | |
| 229 | 225 | + `hook_id` (required) - The ID of a project hook |
| 230 | 226 | |
| 231 | 227 | Will return hook with status `200 OK` on success, or `404 Not found` on fail. |
| ... | ... | @@ -240,7 +236,7 @@ POST /projects/:id/hooks |
| 240 | 236 | |
| 241 | 237 | Parameters: |
| 242 | 238 | |
| 243 | -+ `id` (required) - The ID or code name of a project | |
| 239 | ++ `id` (required) - The ID of a project | |
| 244 | 240 | + `url` (required) - The hook URL |
| 245 | 241 | |
| 246 | 242 | Will return status `201 Created` on success, or `404 Not found` on fail. |
| ... | ... | @@ -255,7 +251,7 @@ PUT /projects/:id/hooks/:hook_id |
| 255 | 251 | |
| 256 | 252 | Parameters: |
| 257 | 253 | |
| 258 | -+ `id` (required) - The ID or code name of a project | |
| 254 | ++ `id` (required) - The ID of a project | |
| 259 | 255 | + `hook_id` (required) - The ID of a project hook |
| 260 | 256 | + `url` (required) - The hook URL |
| 261 | 257 | |
| ... | ... | @@ -272,7 +268,7 @@ DELETE /projects/:id/hooks |
| 272 | 268 | |
| 273 | 269 | Parameters: |
| 274 | 270 | |
| 275 | -+ `id` (required) - The ID or code name of a project | |
| 271 | ++ `id` (required) - The ID of a project | |
| 276 | 272 | + `hook_id` (required) - The ID of hook to delete |
| 277 | 273 | |
| 278 | 274 | Will return status `200 OK` on success, or `404 Not found` on fail. | ... | ... |
doc/api/repositories.md
| ... | ... | @@ -8,7 +8,7 @@ GET /projects/:id/repository/branches |
| 8 | 8 | |
| 9 | 9 | Parameters: |
| 10 | 10 | |
| 11 | -+ `id` (required) - The ID or code name of a project | |
| 11 | ++ `id` (required) - The ID of a project | |
| 12 | 12 | |
| 13 | 13 | ```json |
| 14 | 14 | [ |
| ... | ... | @@ -48,7 +48,7 @@ GET /projects/:id/repository/branches/:branch |
| 48 | 48 | |
| 49 | 49 | Parameters: |
| 50 | 50 | |
| 51 | -+ `id` (required) - The ID or code name of a project | |
| 51 | ++ `id` (required) - The ID of a project | |
| 52 | 52 | + `branch` (required) - The name of the branch |
| 53 | 53 | |
| 54 | 54 | ```json |
| ... | ... | @@ -87,7 +87,7 @@ GET /projects/:id/repository/tags |
| 87 | 87 | |
| 88 | 88 | Parameters: |
| 89 | 89 | |
| 90 | -+ `id` (required) - The ID or code name of a project | |
| 90 | ++ `id` (required) - The ID of a project | |
| 91 | 91 | |
| 92 | 92 | ```json |
| 93 | 93 | [ |
| ... | ... | @@ -125,7 +125,7 @@ GET /projects/:id/repository/commits |
| 125 | 125 | |
| 126 | 126 | Parameters: |
| 127 | 127 | |
| 128 | -+ `id` (required) - The ID or code name of a project | |
| 128 | ++ `id` (required) - The ID of a project | |
| 129 | 129 | + `ref_name` (optional) - The name of a repository branch or tag |
| 130 | 130 | |
| 131 | 131 | ```json |
| ... | ... | @@ -159,7 +159,7 @@ GET /projects/:id/repository/commits/:sha/blob |
| 159 | 159 | |
| 160 | 160 | Parameters: |
| 161 | 161 | |
| 162 | -+ `id` (required) - The ID or code name of a project | |
| 162 | ++ `id` (required) - The ID of a project | |
| 163 | 163 | + `sha` (required) - The commit or branch name |
| 164 | 164 | + `filepath` (required) - The path the file |
| 165 | 165 | ... | ... |
doc/api/snippets.md
| ... | ... | @@ -8,7 +8,7 @@ GET /projects/:id/snippets |
| 8 | 8 | |
| 9 | 9 | Parameters: |
| 10 | 10 | |
| 11 | -+ `id` (required) - The ID or code name of a project | |
| 11 | ++ `id` (required) - The ID of a project | |
| 12 | 12 | |
| 13 | 13 | ## Single snippet |
| 14 | 14 | |
| ... | ... | @@ -20,7 +20,7 @@ GET /projects/:id/snippets/:snippet_id |
| 20 | 20 | |
| 21 | 21 | Parameters: |
| 22 | 22 | |
| 23 | -+ `id` (required) - The ID or code name of a project | |
| 23 | ++ `id` (required) - The ID of a project | |
| 24 | 24 | + `snippet_id` (required) - The ID of a project's snippet |
| 25 | 25 | |
| 26 | 26 | ```json |
| ... | ... | @@ -52,7 +52,7 @@ GET /projects/:id/snippets/:snippet_id/raw |
| 52 | 52 | |
| 53 | 53 | Parameters: |
| 54 | 54 | |
| 55 | -+ `id` (required) - The ID or code name of a project | |
| 55 | ++ `id` (required) - The ID of a project | |
| 56 | 56 | + `snippet_id` (required) - The ID of a project's snippet |
| 57 | 57 | |
| 58 | 58 | ## New snippet |
| ... | ... | @@ -65,7 +65,7 @@ POST /projects/:id/snippets |
| 65 | 65 | |
| 66 | 66 | Parameters: |
| 67 | 67 | |
| 68 | -+ `id` (required) - The ID or code name of a project | |
| 68 | ++ `id` (required) - The ID of a project | |
| 69 | 69 | + `title` (required) - The title of a snippet |
| 70 | 70 | + `file_name` (required) - The name of a snippet file |
| 71 | 71 | + `lifetime` (optional) - The expiration date of a snippet |
| ... | ... | @@ -83,7 +83,7 @@ PUT /projects/:id/snippets/:snippet_id |
| 83 | 83 | |
| 84 | 84 | Parameters: |
| 85 | 85 | |
| 86 | -+ `id` (required) - The ID or code name of a project | |
| 86 | ++ `id` (required) - The ID of a project | |
| 87 | 87 | + `snippet_id` (required) - The ID of a project's snippet |
| 88 | 88 | + `title` (optional) - The title of a snippet |
| 89 | 89 | + `file_name` (optional) - The name of a snippet file |
| ... | ... | @@ -102,7 +102,7 @@ DELETE /projects/:id/snippets/:snippet_id |
| 102 | 102 | |
| 103 | 103 | Parameters: |
| 104 | 104 | |
| 105 | -+ `id` (required) - The ID or code name of a project | |
| 105 | ++ `id` (required) - The ID of a project | |
| 106 | 106 | + `snippet_id` (required) - The ID of a project's snippet |
| 107 | 107 | |
| 108 | 108 | Status code `200` will be returned on success. | ... | ... |
lib/api.rb
| ... | ... | @@ -2,7 +2,7 @@ Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file} |
| 2 | 2 | |
| 3 | 3 | module Gitlab |
| 4 | 4 | class API < Grape::API |
| 5 | - version 'v2', using: :path | |
| 5 | + version 'v3', using: :path | |
| 6 | 6 | |
| 7 | 7 | rescue_from ActiveRecord::RecordNotFound do |
| 8 | 8 | rack_response({'message' => '404 Not found'}.to_json, 404) | ... | ... |
lib/api/entities.rb
| ... | ... | @@ -18,7 +18,7 @@ module Gitlab |
| 18 | 18 | end |
| 19 | 19 | |
| 20 | 20 | class Project < Grape::Entity |
| 21 | - expose :id, :code, :name, :description, :path, :default_branch | |
| 21 | + expose :id, :name, :description, :path, :default_branch | |
| 22 | 22 | expose :owner, using: Entities::UserBasic |
| 23 | 23 | expose :private_flag, as: :private |
| 24 | 24 | expose :issues_enabled, :merge_requests_enabled, :wall_enabled, :wiki_enabled, :created_at | ... | ... |
lib/api/issues.rb
| ... | ... | @@ -17,7 +17,7 @@ module Gitlab |
| 17 | 17 | # Get a list of project issues |
| 18 | 18 | # |
| 19 | 19 | # Parameters: |
| 20 | - # id (required) - The ID or code name of a project | |
| 20 | + # id (required) - The ID of a project | |
| 21 | 21 | # Example Request: |
| 22 | 22 | # GET /projects/:id/issues |
| 23 | 23 | get ":id/issues" do |
| ... | ... | @@ -27,7 +27,7 @@ module Gitlab |
| 27 | 27 | # Get a single project issue |
| 28 | 28 | # |
| 29 | 29 | # Parameters: |
| 30 | - # id (required) - The ID or code name of a project | |
| 30 | + # id (required) - The ID of a project | |
| 31 | 31 | # issue_id (required) - The ID of a project issue |
| 32 | 32 | # Example Request: |
| 33 | 33 | # GET /projects/:id/issues/:issue_id |
| ... | ... | @@ -39,7 +39,7 @@ module Gitlab |
| 39 | 39 | # Create a new project issue |
| 40 | 40 | # |
| 41 | 41 | # Parameters: |
| 42 | - # id (required) - The ID or code name of a project | |
| 42 | + # id (required) - The ID of a project | |
| 43 | 43 | # title (required) - The title of an issue |
| 44 | 44 | # description (optional) - The description of an issue |
| 45 | 45 | # assignee_id (optional) - The ID of a user to assign issue |
| ... | ... | @@ -62,7 +62,7 @@ module Gitlab |
| 62 | 62 | # Update an existing issue |
| 63 | 63 | # |
| 64 | 64 | # Parameters: |
| 65 | - # id (required) - The ID or code name of a project | |
| 65 | + # id (required) - The ID of a project | |
| 66 | 66 | # issue_id (required) - The ID of a project issue |
| 67 | 67 | # title (optional) - The title of an issue |
| 68 | 68 | # description (optional) - The description of an issue |
| ... | ... | @@ -88,7 +88,7 @@ module Gitlab |
| 88 | 88 | # Delete a project issue (deprecated) |
| 89 | 89 | # |
| 90 | 90 | # Parameters: |
| 91 | - # id (required) - The ID or code name of a project | |
| 91 | + # id (required) - The ID of a project | |
| 92 | 92 | # issue_id (required) - The ID of a project issue |
| 93 | 93 | # Example Request: |
| 94 | 94 | # DELETE /projects/:id/issues/:issue_id | ... | ... |
lib/api/merge_requests.rb
| ... | ... | @@ -8,7 +8,7 @@ module Gitlab |
| 8 | 8 | # List merge requests |
| 9 | 9 | # |
| 10 | 10 | # Parameters: |
| 11 | - # id (required) - The ID or code name of a project | |
| 11 | + # id (required) - The ID of a project | |
| 12 | 12 | # |
| 13 | 13 | # Example: |
| 14 | 14 | # GET /projects/:id/merge_requests |
| ... | ... | @@ -22,7 +22,7 @@ module Gitlab |
| 22 | 22 | # Show MR |
| 23 | 23 | # |
| 24 | 24 | # Parameters: |
| 25 | - # id (required) - The ID or code name of a project | |
| 25 | + # id (required) - The ID of a project | |
| 26 | 26 | # merge_request_id (required) - The ID of MR |
| 27 | 27 | # |
| 28 | 28 | # Example: |
| ... | ... | @@ -40,7 +40,7 @@ module Gitlab |
| 40 | 40 | # |
| 41 | 41 | # Parameters: |
| 42 | 42 | # |
| 43 | - # id (required) - The ID or code name of a project | |
| 43 | + # id (required) - The ID of a project | |
| 44 | 44 | # source_branch (required) - The source branch |
| 45 | 45 | # target_branch (required) - The target branch |
| 46 | 46 | # assignee_id - Assignee user ID |
| ... | ... | @@ -67,7 +67,7 @@ module Gitlab |
| 67 | 67 | # Update MR |
| 68 | 68 | # |
| 69 | 69 | # Parameters: |
| 70 | - # id (required) - The ID or code name of a project | |
| 70 | + # id (required) - The ID of a project | |
| 71 | 71 | # merge_request_id (required) - ID of MR |
| 72 | 72 | # source_branch - The source branch |
| 73 | 73 | # target_branch - The target branch |
| ... | ... | @@ -95,7 +95,7 @@ module Gitlab |
| 95 | 95 | # Post comment to merge request |
| 96 | 96 | # |
| 97 | 97 | # Parameters: |
| 98 | - # id (required) - The ID or code name of a project | |
| 98 | + # id (required) - The ID of a project | |
| 99 | 99 | # merge_request_id (required) - ID of MR |
| 100 | 100 | # note (required) - Text of comment |
| 101 | 101 | # Examples: | ... | ... |
lib/api/milestones.rb
| ... | ... | @@ -7,7 +7,7 @@ module Gitlab |
| 7 | 7 | # Get a list of project milestones |
| 8 | 8 | # |
| 9 | 9 | # Parameters: |
| 10 | - # id (required) - The ID or code name of a project | |
| 10 | + # id (required) - The ID of a project | |
| 11 | 11 | # Example Request: |
| 12 | 12 | # GET /projects/:id/milestones |
| 13 | 13 | get ":id/milestones" do |
| ... | ... | @@ -19,7 +19,7 @@ module Gitlab |
| 19 | 19 | # Get a single project milestone |
| 20 | 20 | # |
| 21 | 21 | # Parameters: |
| 22 | - # id (required) - The ID or code name of a project | |
| 22 | + # id (required) - The ID of a project | |
| 23 | 23 | # milestone_id (required) - The ID of a project milestone |
| 24 | 24 | # Example Request: |
| 25 | 25 | # GET /projects/:id/milestones/:milestone_id |
| ... | ... | @@ -33,7 +33,7 @@ module Gitlab |
| 33 | 33 | # Create a new project milestone |
| 34 | 34 | # |
| 35 | 35 | # Parameters: |
| 36 | - # id (required) - The ID or code name of the project | |
| 36 | + # id (required) - The ID of the project | |
| 37 | 37 | # title (required) - The title of the milestone |
| 38 | 38 | # description (optional) - The description of the milestone |
| 39 | 39 | # due_date (optional) - The due date of the milestone |
| ... | ... | @@ -54,7 +54,7 @@ module Gitlab |
| 54 | 54 | # Update an existing project milestone |
| 55 | 55 | # |
| 56 | 56 | # Parameters: |
| 57 | - # id (required) - The ID or code name of a project | |
| 57 | + # id (required) - The ID of a project | |
| 58 | 58 | # milestone_id (required) - The ID of a project milestone |
| 59 | 59 | # title (optional) - The title of a milestone |
| 60 | 60 | # description (optional) - The description of a milestone | ... | ... |
lib/api/notes.rb
| ... | ... | @@ -9,7 +9,7 @@ module Gitlab |
| 9 | 9 | # Get a list of project wall notes |
| 10 | 10 | # |
| 11 | 11 | # Parameters: |
| 12 | - # id (required) - The ID or code name of a project | |
| 12 | + # id (required) - The ID of a project | |
| 13 | 13 | # Example Request: |
| 14 | 14 | # GET /projects/:id/notes |
| 15 | 15 | get ":id/notes" do |
| ... | ... | @@ -20,7 +20,7 @@ module Gitlab |
| 20 | 20 | # Get a single project wall note |
| 21 | 21 | # |
| 22 | 22 | # Parameters: |
| 23 | - # id (required) - The ID or code name of a project | |
| 23 | + # id (required) - The ID of a project | |
| 24 | 24 | # note_id (required) - The ID of a note |
| 25 | 25 | # Example Request: |
| 26 | 26 | # GET /projects/:id/notes/:note_id |
| ... | ... | @@ -32,7 +32,7 @@ module Gitlab |
| 32 | 32 | # Create a new project wall note |
| 33 | 33 | # |
| 34 | 34 | # Parameters: |
| 35 | - # id (required) - The ID or code name of a project | |
| 35 | + # id (required) - The ID of a project | |
| 36 | 36 | # body (required) - The content of a note |
| 37 | 37 | # Example Request: |
| 38 | 38 | # POST /projects/:id/notes |
| ... | ... | @@ -54,7 +54,7 @@ module Gitlab |
| 54 | 54 | # Get a list of project +noteable+ notes |
| 55 | 55 | # |
| 56 | 56 | # Parameters: |
| 57 | - # id (required) - The ID or code name of a project | |
| 57 | + # id (required) - The ID of a project | |
| 58 | 58 | # noteable_id (required) - The ID of an issue or snippet |
| 59 | 59 | # Example Request: |
| 60 | 60 | # GET /projects/:id/issues/:noteable_id/notes |
| ... | ... | @@ -67,7 +67,7 @@ module Gitlab |
| 67 | 67 | # Get a single +noteable+ note |
| 68 | 68 | # |
| 69 | 69 | # Parameters: |
| 70 | - # id (required) - The ID or code name of a project | |
| 70 | + # id (required) - The ID of a project | |
| 71 | 71 | # noteable_id (required) - The ID of an issue or snippet |
| 72 | 72 | # note_id (required) - The ID of a note |
| 73 | 73 | # Example Request: |
| ... | ... | @@ -82,7 +82,7 @@ module Gitlab |
| 82 | 82 | # Create a new +noteable+ note |
| 83 | 83 | # |
| 84 | 84 | # Parameters: |
| 85 | - # id (required) - The ID or code name of a project | |
| 85 | + # id (required) - The ID of a project | |
| 86 | 86 | # noteable_id (required) - The ID of an issue or snippet |
| 87 | 87 | # body (required) - The content of a note |
| 88 | 88 | # Example Request: | ... | ... |
lib/api/projects.rb
| ... | ... | @@ -16,7 +16,7 @@ module Gitlab |
| 16 | 16 | # Get a single project |
| 17 | 17 | # |
| 18 | 18 | # Parameters: |
| 19 | - # id (required) - The ID or code name of a project | |
| 19 | + # id (required) - The ID of a project | |
| 20 | 20 | # Example Request: |
| 21 | 21 | # GET /projects/:id |
| 22 | 22 | get ":id" do |
| ... | ... | @@ -27,7 +27,6 @@ module Gitlab |
| 27 | 27 | # |
| 28 | 28 | # Parameters: |
| 29 | 29 | # name (required) - name for new project |
| 30 | - # code (optional) - code for new project, uses project name if not set | |
| 31 | 30 | # path (optional) - path for new project, uses project name if not set |
| 32 | 31 | # description (optional) - short project description |
| 33 | 32 | # default_branch (optional) - 'master' by default |
| ... | ... | @@ -56,7 +55,7 @@ module Gitlab |
| 56 | 55 | # Get a project team members |
| 57 | 56 | # |
| 58 | 57 | # Parameters: |
| 59 | - # id (required) - The ID or code name of a project | |
| 58 | + # id (required) - The ID of a project | |
| 60 | 59 | # query - Query string |
| 61 | 60 | # Example Request: |
| 62 | 61 | # GET /projects/:id/members |
| ... | ... | @@ -72,7 +71,7 @@ module Gitlab |
| 72 | 71 | # Get a project team members |
| 73 | 72 | # |
| 74 | 73 | # Parameters: |
| 75 | - # id (required) - The ID or code name of a project | |
| 74 | + # id (required) - The ID of a project | |
| 76 | 75 | # user_id (required) - The ID of a user |
| 77 | 76 | # Example Request: |
| 78 | 77 | # GET /projects/:id/members/:user_id |
| ... | ... | @@ -84,7 +83,7 @@ module Gitlab |
| 84 | 83 | # Add a new project team member |
| 85 | 84 | # |
| 86 | 85 | # Parameters: |
| 87 | - # id (required) - The ID or code name of a project | |
| 86 | + # id (required) - The ID of a project | |
| 88 | 87 | # user_id (required) - The ID of a user |
| 89 | 88 | # access_level (required) - Project access level |
| 90 | 89 | # Example Request: |
| ... | ... | @@ -107,7 +106,7 @@ module Gitlab |
| 107 | 106 | # Update project team member |
| 108 | 107 | # |
| 109 | 108 | # Parameters: |
| 110 | - # id (required) - The ID or code name of a project | |
| 109 | + # id (required) - The ID of a project | |
| 111 | 110 | # user_id (required) - The ID of a team member |
| 112 | 111 | # access_level (required) - Project access level |
| 113 | 112 | # Example Request: |
| ... | ... | @@ -127,7 +126,7 @@ module Gitlab |
| 127 | 126 | # Remove a team member from project |
| 128 | 127 | # |
| 129 | 128 | # Parameters: |
| 130 | - # id (required) - The ID or code name of a project | |
| 129 | + # id (required) - The ID of a project | |
| 131 | 130 | # user_id (required) - The ID of a team member |
| 132 | 131 | # Example Request: |
| 133 | 132 | # DELETE /projects/:id/members/:user_id |
| ... | ... | @@ -140,7 +139,7 @@ module Gitlab |
| 140 | 139 | # Get project hooks |
| 141 | 140 | # |
| 142 | 141 | # Parameters: |
| 143 | - # id (required) - The ID or code name of a project | |
| 142 | + # id (required) - The ID of a project | |
| 144 | 143 | # Example Request: |
| 145 | 144 | # GET /projects/:id/hooks |
| 146 | 145 | get ":id/hooks" do |
| ... | ... | @@ -152,7 +151,7 @@ module Gitlab |
| 152 | 151 | # Get a project hook |
| 153 | 152 | # |
| 154 | 153 | # Parameters: |
| 155 | - # id (required) - The ID or code name of a project | |
| 154 | + # id (required) - The ID of a project | |
| 156 | 155 | # hook_id (required) - The ID of a project hook |
| 157 | 156 | # Example Request: |
| 158 | 157 | # GET /projects/:id/hooks/:hook_id |
| ... | ... | @@ -165,7 +164,7 @@ module Gitlab |
| 165 | 164 | # Add hook to project |
| 166 | 165 | # |
| 167 | 166 | # Parameters: |
| 168 | - # id (required) - The ID or code name of a project | |
| 167 | + # id (required) - The ID of a project | |
| 169 | 168 | # url (required) - The hook URL |
| 170 | 169 | # Example Request: |
| 171 | 170 | # POST /projects/:id/hooks |
| ... | ... | @@ -182,7 +181,7 @@ module Gitlab |
| 182 | 181 | # Update an existing project hook |
| 183 | 182 | # |
| 184 | 183 | # Parameters: |
| 185 | - # id (required) - The ID or code name of a project | |
| 184 | + # id (required) - The ID of a project | |
| 186 | 185 | # hook_id (required) - The ID of a project hook |
| 187 | 186 | # url (required) - The hook URL |
| 188 | 187 | # Example Request: |
| ... | ... | @@ -203,7 +202,7 @@ module Gitlab |
| 203 | 202 | # Delete project hook |
| 204 | 203 | # |
| 205 | 204 | # Parameters: |
| 206 | - # id (required) - The ID or code name of a project | |
| 205 | + # id (required) - The ID of a project | |
| 207 | 206 | # hook_id (required) - The ID of hook to delete |
| 208 | 207 | # Example Request: |
| 209 | 208 | # DELETE /projects/:id/hooks |
| ... | ... | @@ -216,7 +215,7 @@ module Gitlab |
| 216 | 215 | # Get a project repository branches |
| 217 | 216 | # |
| 218 | 217 | # Parameters: |
| 219 | - # id (required) - The ID or code name of a project | |
| 218 | + # id (required) - The ID of a project | |
| 220 | 219 | # Example Request: |
| 221 | 220 | # GET /projects/:id/repository/branches |
| 222 | 221 | get ":id/repository/branches" do |
| ... | ... | @@ -226,7 +225,7 @@ module Gitlab |
| 226 | 225 | # Get a single branch |
| 227 | 226 | # |
| 228 | 227 | # Parameters: |
| 229 | - # id (required) - The ID or code name of a project | |
| 228 | + # id (required) - The ID of a project | |
| 230 | 229 | # branch (required) - The name of the branch |
| 231 | 230 | # Example Request: |
| 232 | 231 | # GET /projects/:id/repository/branches/:branch |
| ... | ... | @@ -238,7 +237,7 @@ module Gitlab |
| 238 | 237 | # Get a project repository tags |
| 239 | 238 | # |
| 240 | 239 | # Parameters: |
| 241 | - # id (required) - The ID or code name of a project | |
| 240 | + # id (required) - The ID of a project | |
| 242 | 241 | # Example Request: |
| 243 | 242 | # GET /projects/:id/repository/tags |
| 244 | 243 | get ":id/repository/tags" do |
| ... | ... | @@ -248,7 +247,7 @@ module Gitlab |
| 248 | 247 | # Get a project repository commits |
| 249 | 248 | # |
| 250 | 249 | # Parameters: |
| 251 | - # id (required) - The ID or code name of a project | |
| 250 | + # id (required) - The ID of a project | |
| 252 | 251 | # ref_name (optional) - The name of a repository branch or tag |
| 253 | 252 | # Example Request: |
| 254 | 253 | # GET /projects/:id/repository/commits |
| ... | ... | @@ -266,7 +265,7 @@ module Gitlab |
| 266 | 265 | # Get a project snippets |
| 267 | 266 | # |
| 268 | 267 | # Parameters: |
| 269 | - # id (required) - The ID or code name of a project | |
| 268 | + # id (required) - The ID of a project | |
| 270 | 269 | # Example Request: |
| 271 | 270 | # GET /projects/:id/snippets |
| 272 | 271 | get ":id/snippets" do |
| ... | ... | @@ -276,7 +275,7 @@ module Gitlab |
| 276 | 275 | # Get a project snippet |
| 277 | 276 | # |
| 278 | 277 | # Parameters: |
| 279 | - # id (required) - The ID or code name of a project | |
| 278 | + # id (required) - The ID of a project | |
| 280 | 279 | # snippet_id (required) - The ID of a project snippet |
| 281 | 280 | # Example Request: |
| 282 | 281 | # GET /projects/:id/snippets/:snippet_id |
| ... | ... | @@ -288,7 +287,7 @@ module Gitlab |
| 288 | 287 | # Create a new project snippet |
| 289 | 288 | # |
| 290 | 289 | # Parameters: |
| 291 | - # id (required) - The ID or code name of a project | |
| 290 | + # id (required) - The ID of a project | |
| 292 | 291 | # title (required) - The title of a snippet |
| 293 | 292 | # file_name (required) - The name of a snippet file |
| 294 | 293 | # lifetime (optional) - The expiration date of a snippet |
| ... | ... | @@ -314,7 +313,7 @@ module Gitlab |
| 314 | 313 | # Update an existing project snippet |
| 315 | 314 | # |
| 316 | 315 | # Parameters: |
| 317 | - # id (required) - The ID or code name of a project | |
| 316 | + # id (required) - The ID of a project | |
| 318 | 317 | # snippet_id (required) - The ID of a project snippet |
| 319 | 318 | # title (optional) - The title of a snippet |
| 320 | 319 | # file_name (optional) - The name of a snippet file |
| ... | ... | @@ -340,7 +339,7 @@ module Gitlab |
| 340 | 339 | # Delete a project snippet |
| 341 | 340 | # |
| 342 | 341 | # Parameters: |
| 343 | - # id (required) - The ID or code name of a project | |
| 342 | + # id (required) - The ID of a project | |
| 344 | 343 | # snippet_id (required) - The ID of a project snippet |
| 345 | 344 | # Example Request: |
| 346 | 345 | # DELETE /projects/:id/snippets/:snippet_id |
| ... | ... | @@ -354,7 +353,7 @@ module Gitlab |
| 354 | 353 | # Get a raw project snippet |
| 355 | 354 | # |
| 356 | 355 | # Parameters: |
| 357 | - # id (required) - The ID or code name of a project | |
| 356 | + # id (required) - The ID of a project | |
| 358 | 357 | # snippet_id (required) - The ID of a project snippet |
| 359 | 358 | # Example Request: |
| 360 | 359 | # GET /projects/:id/snippets/:snippet_id/raw |
| ... | ... | @@ -367,7 +366,7 @@ module Gitlab |
| 367 | 366 | # Get a raw file contents |
| 368 | 367 | # |
| 369 | 368 | # Parameters: |
| 370 | - # id (required) - The ID or code name of a project | |
| 369 | + # id (required) - The ID of a project | |
| 371 | 370 | # sha (required) - The commit or branch name |
| 372 | 371 | # filepath (required) - The path to the file to display |
| 373 | 372 | # Example Request: | ... | ... |