Commit e76215a395bb814972c1385ce815b2da2a6e3402

Authored by Felix Gilcher
1 parent a90d5c21

Update docs to reflect that project names are allowed as ID

The API accepts project names in all places where project IDs are expected. Updated the docs to
reflect that.
Showing 1 changed file with 13 additions and 12 deletions   Show diff stats
doc/api/projects.md
@@ -53,7 +53,8 @@ GET /projects @@ -53,7 +53,8 @@ GET /projects
53 53
54 ## Single project 54 ## Single project
55 55
56 -Get a specific project, identified by project ID, which is owned by the authentication user. 56 +Get a specific project, identified by project ID or NAME, which is owned by the authentication user.
  57 +Currently namespaced projects cannot retrieved by name.
57 58
58 ``` 59 ```
59 GET /projects/:id 60 GET /projects/:id
@@ -61,7 +62,7 @@ GET /projects/:id @@ -61,7 +62,7 @@ GET /projects/:id
61 62
62 Parameters: 63 Parameters:
63 64
64 -+ `id` (required) - The ID of a project 65 ++ `id` (required) - The ID or NAME of a project
65 66
66 ```json 67 ```json
67 { 68 {
@@ -129,7 +130,7 @@ GET /projects/:id/members @@ -129,7 +130,7 @@ GET /projects/:id/members
129 130
130 Parameters: 131 Parameters:
131 132
132 -+ `id` (required) - The ID of a project 133 ++ `id` (required) - The ID or NAME of a project
133 + `query` - Query string 134 + `query` - Query string
134 135
135 ## Get project team member 136 ## Get project team member
@@ -142,7 +143,7 @@ GET /projects/:id/members/:user_id @@ -142,7 +143,7 @@ GET /projects/:id/members/:user_id
142 143
143 Parameters: 144 Parameters:
144 145
145 -+ `id` (required) - The ID of a project 146 ++ `id` (required) - The ID or NAME of a project
146 + `user_id` (required) - The ID of a user 147 + `user_id` (required) - The ID of a user
147 148
148 ```json 149 ```json
@@ -168,7 +169,7 @@ POST /projects/:id/members @@ -168,7 +169,7 @@ POST /projects/:id/members
168 169
169 Parameters: 170 Parameters:
170 171
171 -+ `id` (required) - The ID of a project 172 ++ `id` (required) - The ID or NAME of a project
172 + `user_id` (required) - The ID of a user to add 173 + `user_id` (required) - The ID of a user to add
173 + `access_level` (required) - Project access level 174 + `access_level` (required) - Project access level
174 175
@@ -184,7 +185,7 @@ PUT /projects/:id/members/:user_id @@ -184,7 +185,7 @@ PUT /projects/:id/members/:user_id
184 185
185 Parameters: 186 Parameters:
186 187
187 -+ `id` (required) - The ID of a project 188 ++ `id` (required) - The ID or NAME of a project
188 + `user_id` (required) - The ID of a team member 189 + `user_id` (required) - The ID of a team member
189 + `access_level` (required) - Project access level 190 + `access_level` (required) - Project access level
190 191
@@ -200,7 +201,7 @@ DELETE /projects/:id/members/:user_id @@ -200,7 +201,7 @@ DELETE /projects/:id/members/:user_id
200 201
201 Parameters: 202 Parameters:
202 203
203 -+ `id` (required) - The ID of a project 204 ++ `id` (required) - The ID or NAME of a project
204 + `user_id` (required) - The ID of a team member 205 + `user_id` (required) - The ID of a team member
205 206
206 Status code `200` will be returned on success. 207 Status code `200` will be returned on success.
@@ -215,7 +216,7 @@ GET /projects/:id/hooks @@ -215,7 +216,7 @@ GET /projects/:id/hooks
215 216
216 Parameters: 217 Parameters:
217 218
218 -+ `id` (required) - The ID of a project 219 ++ `id` (required) - The ID or NAME of a project
219 220
220 Will return hooks with status `200 OK` on success, or `404 Not found` on fail. 221 Will return hooks with status `200 OK` on success, or `404 Not found` on fail.
221 222
@@ -229,7 +230,7 @@ GET /projects/:id/hooks/:hook_id @@ -229,7 +230,7 @@ GET /projects/:id/hooks/:hook_id
229 230
230 Parameters: 231 Parameters:
231 232
232 -+ `id` (required) - The ID of a project 233 ++ `id` (required) - The ID or NAME of a project
233 + `hook_id` (required) - The ID of a project hook 234 + `hook_id` (required) - The ID of a project hook
234 235
235 Will return hook with status `200 OK` on success, or `404 Not found` on fail. 236 Will return hook with status `200 OK` on success, or `404 Not found` on fail.
@@ -244,7 +245,7 @@ POST /projects/:id/hooks @@ -244,7 +245,7 @@ POST /projects/:id/hooks
244 245
245 Parameters: 246 Parameters:
246 247
247 -+ `id` (required) - The ID of a project 248 ++ `id` (required) - The ID or NAME of a project
248 + `url` (required) - The hook URL 249 + `url` (required) - The hook URL
249 250
250 Will return status `201 Created` on success, or `404 Not found` on fail. 251 Will return status `201 Created` on success, or `404 Not found` on fail.
@@ -259,7 +260,7 @@ PUT /projects/:id/hooks/:hook_id @@ -259,7 +260,7 @@ PUT /projects/:id/hooks/:hook_id
259 260
260 Parameters: 261 Parameters:
261 262
262 -+ `id` (required) - The ID of a project 263 ++ `id` (required) - The ID or NAME of a project
263 + `hook_id` (required) - The ID of a project hook 264 + `hook_id` (required) - The ID of a project hook
264 + `url` (required) - The hook URL 265 + `url` (required) - The hook URL
265 266
@@ -276,7 +277,7 @@ DELETE /projects/:id/hooks @@ -276,7 +277,7 @@ DELETE /projects/:id/hooks
276 277
277 Parameters: 278 Parameters:
278 279
279 -+ `id` (required) - The ID of a project 280 ++ `id` (required) - The ID or NAME of a project
280 + `hook_id` (required) - The ID of hook to delete 281 + `hook_id` (required) - The ID of hook to delete
281 282
282 Will return status `200 OK` on success, or `404 Not found` on fail. 283 Will return status `200 OK` on success, or `404 Not found` on fail.