Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

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

0 votes



One answer

Permanent link

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

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,027

Question asked: Apr 17 '20, 5:49 a.m.

Question was seen: 2,181 times

Last updated: Apr 18 '20, 4:18 p.m.

Confirmation Cancel Confirm