I'm trying to update defects in quality centre using their REST API from a curl-based script.

So far, I've managed to authenticate, store the cookie, and retrieve a defect's data from QC.

My problems start when I try to send data to update a defect, I always seem to get a 'method unsupported' exception.

My curl command is:

curl -b cookie.txt –T @xml.txt -H "Content-Type: application/xml; Accept: application/xml" http://qcserver/qcbin/rest/domains/DK/projects/R2/defects/74

I'm sending the following xml, just trying to update a standard field at the moment.

<xml version="1.0" encoding="UTF-8" standalone="yes" ?> <Entity Type="defect"><Fields><Field Name="owner"><Value>me</Value></Field></Fields></Entity>

The QC documentation says to use a 'PUT' command, so I've tried sending the XML using the -T curl option but that does not work, so I assume it still needs to be POSTed. Any suggestions gratefully received.

link|improve this question

75% accept rate
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.