how do I use Curl to work with the RQM API?
One answer
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: