Milestones
List Milestones - GET /projects/#{project_id}/milestones.xml
Retrieve a list of milestones for the current project.
Response:
<milestones>
<total_pages>...</total_pages>
<current_page>...</current_page>
<milestone>
...
</milestone>
<milestone>
...
</milestone>
</milestones>
You can get additional pages using the page
parameter:
/projects/#{project_id}/milestones.xml?page=2
Get Milestone - GET
/projects/#{project_id}/milestones/#{ID}.xml
This fetches the Milestone.
Response:
<milestone>
<created-at type="datetime">2006-11-07T22:53:25Z</created-at>
<due-on type="datetime">2007-04-30T20:30:00Z</due-on>
<goals>#{unprocessed body}</goals>
<goals-html>#{processed HTML body}</goals-html>
<id type="integer">1</id>
<open-tickets-count type="integer">17</open-tickets-count>
<permalink>emergence-day</permalink>
<project-id type="integer">2</project-id>
<tickets-count type="integer">55</tickets-count>
<title>Emergence Day</title>
</milestone>
New Milestone - GET
/projects/#{project_id}/milestones/new.xml
This gives you the initial state for an empty milestone.
Response:
<milestone>
<created-at type="datetime"></created-at>
<due-on type="datetime"></due-on>
<goals></goals>
<goals-html></goals-html>
<open-tickets-count type="integer">0</open-tickets-count>
<permalink></permalink>
<project-id type="integer"></project-id>
<tickets-count type="integer">0</tickets-count>
<title></title>
</milestone>
Create Milestone - POST
/projects/#{project_id}/milestones.xml
Creates a milestones. The shown fields are the only ones you can set:
- goals - used as the body of milestone.
- title - the title of the message
- due_on - optional, the due date of the milestone.
Request:
<milestone>
<title>...</title>
<goals></goals>
</milestone>
Response:
HTTP Status: 201 Created
Location:
http://activereload.lighthouseapp.com/projects/5/milestones/5.xml
<milestone>
...
</milestone>
Update Milestone - PUT
/projects/#{project_id}/milestones/ID.xml
Updates a milestone. The shown fields are the only ones you can set:
- goals - used as the body of milestone.
- title - the title of the message.
- due_on - optional, the due date of the milestone.
Request:
<milestone>
<title>...</title>
<goals></goals>
</milestone>
Response:
HTTP Status: 200 OK
Close milestone - PUT
/projects/#{project_id}/milestones/#{ID}/close.xml
Set a milestone as 'closed'
Response:
HTTP Status: 200 OK
Reopen milestone - PUT
/projects/#{project_id}/milestones/#{ID}/open.xml
Set a closed milestone as 'open'
Response:
HTTP Status: 200 OK
Delete Milestone - DELETE
/projects/#{project_id}/milestones/#{ID}.xml
Deletes a milestone forever.
Response:
HTTP Status: 200 OK