HTTP Verb: PUT

Available statuses: 200 OK, 404 Not Found, 422 Unprocessable Entity

Object: TicketComment

Location: n/a

Formats: XML, JSON

Update a ticket comment

Params

To update a ticket comment, 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 ticket_comment namespace, e.g.:

XML

<ticket_comment>
  <comment>Comment text</comment>
  ...
</ticket_comment>

JSON

{"ticket_comment":{"comment":"Comment text",...}}

Query string

ticket_comment[comment]=Comment text&...

Check the full list of fields on ticket comment object fields reference page

Examples

For example purposes we use a JSON body {ticket_comment:{comment:"comment body"}} to update a ticket comment.

Request XML, using cURL utility:

curl -X PUT -i -H "Authorization: Bearer _token" -H "Content-type: application/json" -d '{"ticket_comment":{"comment":"comment body"}}' https://api.assembla.com/v1/spaces/_space_id/tickets/_ticket_number/ticket_comments/_id.xml

Response

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Wed, 18 Jul 2012 13:36:38 GMT
Content-Type: application/xml; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...

Request JSON, using cURL utility:

curl -X PUT -i -H "Authorization: Bearer _token" -H "Content-type: application/json" -d '{"ticket_comment":{"comment":"comment body"}}' https://api.assembla.com/v1/spaces/_space_id/tickets/_ticket_number/ticket_comments/_id.json

Response

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Wed, 18 Jul 2012 13:34:54 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/_ticket_number/ticket_comments/_id.(xml|json)