It's all about the answers!

Ask a question

how do I use Curl to work with the RQM API?


Matthieu Leroux (6571614) | asked Apr 17 '20, 5:49 a.m.
JAZZ DEVELOPER

I want to use Curl as a tool to interact with the RQM/ETM API. How do I do that?

One answer



permanent link
Matthieu Leroux (6571614) | answered Apr 17 '20, 5:50 a.m.
JAZZ DEVELOPER
edited Apr 18 '20, 4:18 p.m.

You need to send a post request to qm/j_security_check with your credentials and save the cookies in a cookie jar:

curl -k --location --cookie jar.txt --cookie-jar jar.txt 'https://clm.example.com:9443/qm/j_security_check' --header 'accept: /' --header 'oslc-core-version: 2.0' --header 'Content-Type: application/x-www-form-urlencoded' --header 'Content-Type: application/x-www-form-urlencoded' --data j_username=jazzadmin --data j_password=jazzadmin

using the same cookies, you can then do a get request to the api:
curl -k --cookie jar.txt --location --request GET 'https://clm.example.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/MYPROJECTALIAS/testscript/urn:com.ibm.rqm:testscript:198' --header 'Accept: application/xml'

you can then use this xml as an example and do a put request to create a new one:

curl -k --cookie jar.txt --location --request PUT 'https://clm.example.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/MYPROJECTALIAS/testscript/newtestscript20200417112700' --header 'content-type:application/xml' --data '<the xml of your test script here>'

if you saved the xml as a file, use --data @myfile.xml

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.