Ticket components API is deprecated. Please use custom fields.

HTTP Verb: PUT

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

Object: TicketComponent

Location: n/a

Formats: XML, JSON

Update a component

Params

To update a component name, 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.

Send a component parameter with the new name of component, e.g.:

XML

<component>
  Component name
</component>

JSON

{"component":"Component name"}

Query string

component=Component name

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

Examples

Request XML, using cURL utility:

curl -X PUT -i -H "Authorization: Bearer _token" -d "component=new name" https://api.assembla.com/v1/spaces/_space_id/ticket_components/_id.xml

Response

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Tue, 17 Jul 2012 13:53:03 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" -d "component=new name" https://api.assembla.com/v1/spaces/_space_id/ticket_components/_id.json

Response

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Tue, 17 Jul 2012 13:52:44 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/ticket_components/_id.(xml|json)