API documentation update for milestones

Updated the milestones API documentation and added return codes descriptions.
This commit is contained in:
Sebastian Ziebell 2013-02-20 22:51:59 +01:00
parent 33c1463645
commit 4a60c377b8
3 changed files with 48 additions and 25 deletions

View file

@ -1,6 +1,6 @@
## List project milestones
Get a list of project milestones.
Returns a list of project milestones.
```
GET /projects/:id/milestones
@ -10,9 +10,16 @@ Parameters:
+ `id` (required) - The ID of a project
## Single milestone
Return values:
Get a single project milestone.
+ `200 Ok` on success and the list of project milestones
+ `401 Unauthorized` if user is not authenticated
+ `404 Not Found` if project ID not found
## Get single milestone
Gets a single project milestone.
```
GET /projects/:id/milestones/:milestone_id
@ -23,9 +30,16 @@ Parameters:
+ `id` (required) - The ID of a project
+ `milestone_id` (required) - The ID of a project milestone
## New milestone
Return values:
Create a new project milestone.
+ `200 Ok` on success and the single milestone
+ `401 Unauthorized` if user is not authenticated
+ `404 Not Found` if project ID not found
## Create new milestone
Creates a new project milestone.
```
POST /projects/:id/milestones
@ -38,9 +52,17 @@ Parameters:
+ `description` (optional) - The description of the milestone
+ `due_date` (optional) - The due date of the milestone
Return values:
+ `201 Created` on success and the new milestone
+ `400 Bad Request` if the required attribute title is not given
+ `401 Unauthorized` if user is not authenticated
+ `404 Not Found` if project ID not found
## Edit milestone
Update an existing project milestone.
Updates an existing project milestone.
```
PUT /projects/:id/milestones/:milestone_id
@ -54,3 +76,9 @@ Parameters:
+ `description` (optional) - The description of a milestone
+ `due_date` (optional) - The due date of the milestone
+ `closed` (optional) - The status of the milestone
Return values:
+ `200 Ok` on success and the updated milestone
+ `401 Unauthorized` if user is not authenticated
+ `404 Not Found` if project ID or milestone ID not found