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 53  
54 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 60 GET /projects/:id
... ... @@ -61,7 +62,7 @@ GET /projects/:id
61 62  
62 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 67 ```json
67 68 {
... ... @@ -129,7 +130,7 @@ GET /projects/:id/members
129 130  
130 131 Parameters:
131 132  
132   -+ `id` (required) - The ID of a project
  133 ++ `id` (required) - The ID or NAME of a project
133 134 + `query` - Query string
134 135  
135 136 ## Get project team member
... ... @@ -142,7 +143,7 @@ GET /projects/:id/members/:user_id
142 143  
143 144 Parameters:
144 145  
145   -+ `id` (required) - The ID of a project
  146 ++ `id` (required) - The ID or NAME of a project
146 147 + `user_id` (required) - The ID of a user
147 148  
148 149 ```json
... ... @@ -168,7 +169,7 @@ POST /projects/:id/members
168 169  
169 170 Parameters:
170 171  
171   -+ `id` (required) - The ID of a project
  172 ++ `id` (required) - The ID or NAME of a project
172 173 + `user_id` (required) - The ID of a user to add
173 174 + `access_level` (required) - Project access level
174 175  
... ... @@ -184,7 +185,7 @@ PUT /projects/:id/members/:user_id
184 185  
185 186 Parameters:
186 187  
187   -+ `id` (required) - The ID of a project
  188 ++ `id` (required) - The ID or NAME of a project
188 189 + `user_id` (required) - The ID of a team member
189 190 + `access_level` (required) - Project access level
190 191  
... ... @@ -200,7 +201,7 @@ DELETE /projects/:id/members/:user_id
200 201  
201 202 Parameters:
202 203  
203   -+ `id` (required) - The ID of a project
  204 ++ `id` (required) - The ID or NAME of a project
204 205 + `user_id` (required) - The ID of a team member
205 206  
206 207 Status code `200` will be returned on success.
... ... @@ -215,7 +216,7 @@ GET /projects/:id/hooks
215 216  
216 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 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 230  
230 231 Parameters:
231 232  
232   -+ `id` (required) - The ID of a project
  233 ++ `id` (required) - The ID or NAME of a project
233 234 + `hook_id` (required) - The ID of a project hook
234 235  
235 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 245  
245 246 Parameters:
246 247  
247   -+ `id` (required) - The ID of a project
  248 ++ `id` (required) - The ID or NAME of a project
248 249 + `url` (required) - The hook URL
249 250  
250 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 260  
260 261 Parameters:
261 262  
262   -+ `id` (required) - The ID of a project
  263 ++ `id` (required) - The ID or NAME of a project
263 264 + `hook_id` (required) - The ID of a project hook
264 265 + `url` (required) - The hook URL
265 266  
... ... @@ -276,7 +277,7 @@ DELETE /projects/:id/hooks
276 277  
277 278 Parameters:
278 279  
279   -+ `id` (required) - The ID of a project
  280 ++ `id` (required) - The ID or NAME of a project
280 281 + `hook_id` (required) - The ID of hook to delete
281 282  
282 283 Will return status `200 OK` on success, or `404 Not found` on fail.
... ...