PUT /v1/spaces/:space_id/tickets/:ticket_number/ticket_associations/:id
HTTP Verb: PUT
Available statuses: 200 OK, 404 Not Found, 422 Unprocessable Entity
Object: TicketAssociation
Location: n/a
Formats: XML, JSON
Update a ticket association.
Params
To update a ticket association, 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 ticket_association namespace, e.g.:
XML
<ticket_association>
<relationship>_relationship</relationship>
</ticket_association>
JSON
{"ticket_association":{"relationship":_relationship}}
Query string
ticket_association[relationship]=_relationship
Check the full list of fields on ticket association object fields reference page
Examples
For example purposes we use a JSON body
{"ticket_association":{"relationship":2}}
Request JSON, using cURL utility:
curl -i -X PUT -H "Authorization: Bearer _token" -H "Content-type: application/json" -d '{"ticket_association":{"relationship":2}}' https://api.assembla.com/v1/spaces/_space_id/tickets/_ticket_number/ticket_associations/_id.json
Response
HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Mon, 16 Jul 2012 14:02:19 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
{}
Request XML, using cURL utility:
curl -i -X PUT -H "Authorization: Bearer _token" -H "Content-type: application/json" -d '{"ticket_association":{"relationship":2}}' https://api.assembla.com/v1/spaces/_space_id/tickets/_ticket_number/ticket_associations/_id.xml
Response
HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Mon, 16 Jul 2012 14:02:55 GMT
Content-Type: application/xml; 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_associations/_id.(xml|json)