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.

  • I'm more interested about the part which talks about authenticate, store the cookie, and retrieve a defect's data from QC. Can you please explain how did you accomplish this?
    – user17187
    Mar 11, 2016 at 0:55
  • 5 years on? Not really. You need the QC SDK though, the docs were useful IIRC.
    – gbjbaanb
    Mar 11, 2016 at 22:17
  • Could you please share HPALM rest API details(URI, body, header) to create/update defects. Sep 2, 2020 at 16:23
  • 1
    @krishnashah Considering this is almost a decade old, I think it's safe to say the original poster does not still have all of those details! :-O
    – corsiKa
    Sep 3, 2020 at 0:36
  • @corsiKa I don't even live in the same country than when I needed those APIs! Ah, what memories.
    – gbjbaanb
    Sep 3, 2020 at 12:09

1 Answer 1


The curl man page says you need to use "-X PUT" to issue a PUT request.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.