Apollo API Documentation

Milestones API calls


Get milestones

GET /projects/#{project_id}/milestones/#{filter}

Returns all the milestones in the given project. The {filter} parameter is optional. Possible values are: “all” (the default value), “late”, “completed” and “upcoming”.

Response

{
	"milestones":[
		{
			"id":"12275039",
			"project-id":"44804074",
			"title":"A milestone",
			...
		},
		{
			"id":"86715700",
			"project-id":"87582549",
			"title":"Another milestone",
			...
		},
		...
	]
}

Get milestone

GET /milestones/#{id}

Returns a single milestone record identified by its integer ID.

Response

{
	"milestone":{
		"id":"12275039",
		"project-id":"44804074",
		"title":"A milestone",
		...
	}
}

Create milestone

POST /projects/#{project_id}/milestones

Creates a new milestone.

Request

{
	"milestone":{
		"title":"A new milestone",
		"responsible-id":"28765220",
		"deadline":"2012-08-15"
	}
}

Response

Returns HTTP status code 201 (“Created”) on success. The response contain the new milestone ID. On failure, a non-200 status code will be returned, possibly with error information in JSON format as the response's content.

{
	"milestone-id":"94958219"
}

Update milestone

PUT /milestones/#{id}

Updates an existing milestone. You can use this to shift the deadline of a single milestone, and optionally shift the deadlines of subsequent milestones as well. Note that you can complete a milestone by sending the “completed-at” field.

Request

{
	"milestone":{
		"title":"Updated milestone",
		"deadline":"2012-08-05",
		"completed-at":"2012-06-12",
		"move-upcoming-milestones":"1", // 1 = move milestones, 0 = don't move them
		"move-upcoming-milestones-off-weekends": 0
	}
}

Response

Returns HTTP status code 200 on success, or any other code (and possibly error information in JSON format) on error.


Destroy milestone

DELETE /milestone/#{id}

Destroys the given milestone and all of its associated comments.

Response

Returns HTTP status code 200 on success, or any other code (and possibly error information in JSON format) on error.