PUT /v1/spaces/:space_id/milestones/:id
HTTP Verb: PUT
Available statuses: 200 OK, 404 Not Found, 422 Unprocessable Entity
Object: Milestone
Location: n/a
Formats: XML, JSON
Update a milestone
Params
To update a milestone, a data body must be provided. Data can be provided in three formats: XML, JSON and query string. To specify data type of XML or JSON add the Content-type: application/(json|xml)
header to request headers, if you want to provide query string simply skip the Content-type header.
All params should be sent in the milestone
namespace, e.g.:
XML
<milestone>
<title>NewCurrent</title>
...
</milestone>
JSON
{"milestone":{"title":"NewCurrent",...}}
Query string
milestone[title]=NewCurrent&...
Check the full list of available params on milestone object fields reference
Examples
For example purposes we use a JSON body
{"milestone":{"title":"new name"}}
Request XML, using cURL utility:
curl -i -H "Authorization: Bearer _token" -H "Content-type: application/json" -d '{"milestone":{"title":"new name"}}' https://api.assembla.com/v1/spaces/_space_id/milestones/_id.xml
Response
HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Thu, 19 Jul 2012 13:47:34 GMT
Content-Type: application/xml; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...
Request JSON, using cURL utility:
curl -i -H "Authorization: Bearer _token" -H "Content-type: application/json" -d '{"milestone":{"title":"new name"}}' https://api.assembla.com/v1/spaces/_space_id/milestones/_id.json
Response
HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Thu, 19 Jul 2012 13:46:43 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...
{}
For update operations no response body is available, to get the data of updated resource send a GET request to the same URL, i.e.:
curl -i -H "Authorization: Bearer _token" https://api.assembla.com/v1/spaces/_space_id/milestones/_id.(xml|json)