PUT /v1/spaces/:space_id/tickets/statuses/:id
HTTP Verb: PUT
Available statuses: 200 OK, 404 Not Found, 422 Unprocessable Entity
Object: TicketStatus
Location: n/a
Formats: XML, JSON
Update a ticket status
Params
To update a ticket status, 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 status namespace, e.g.:
XML
<status>
<name>New status</name>
...
</status>
JSON
{"status":{"name":"New status"...}}
Query string
status[name]=New status...
Check the full list of available params on ticket status object fields reference
Examples
For example purposes we use a JSON body
{"status":{"name":"New status",...}}
Request XML, using cURL utility:
curl -i -X PUT -H "Authorization: Bearer _token" -H "Content-type: application/json" -d '{"status":{"name":"New status",...}}' https://api.assembla.com/v1/spaces/_space_id/tickets/statuses/_id.xml
Response
HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Wed, 20 Jun 2012 12:13:01 GMT
Content-Type: application/xml; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...
Request JSON, using cURL utility:
curl -i -X PUT -H "Authorization: Bearer _token" -H "Content-type: application/json" -d '{"status":{"name":"New status",...}}' https://api.assembla.com/v1/spaces/_space_id/tickets/statuses/_id.json
Response
HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Wed, 20 Jun 2012 12:05:41 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/tickets/statuses/_id.(xml|json)