I am trying to contact the IBM Rational Quality Manager server using the REST API . I am using the RESTClient browser plugin, and during login, the browser is working as expected. For the record, my queries look like
https://server/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/project/testscript/urn:com.ibm.rqm:testscript:42
However, if I wait long enough for RQM to log out, the REST API says I need to log in to continue (see below). I am sure that this can be done through the API itself, because RQM comes with RQMUrlUtility , which accepts the username and password and runs basically the same REST requests that I use:
java -jar RQMUrlUtility.jar -command GET -user JazzUserID -password JazzPassword -filepath pathtoFile -url REST_URL
So far, I have found this section explaining how to log in using basic HTTP authentication. Following this Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ= , I added Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ= (not my real password) to the request, but RQM still cannot log in. I also tried setting the User-Agent to a dummy value, and also sending the value from JSESSIONID to X-Jazz-CSRF-Prevent , as described here , but regardless of all these headers present, I get the same answer:
Status Code: 200 OK Cache-Control: no-cache="set-cookie, set-cookie2" Connection: Keep-Alive Content-Encoding: gzip Content-Language: en-US Content-Type: text/html; charset=UTF-8 Date: Tue, 26 Jan 2016 15:48:02 GMT Expires: Thu, 01 Dec 1994 16:00:00 GMT Keep-Alive: timeout=10, max=100 Set-Cookie: JazzFormAuth=Form; Path=/qm; Secure x-com-ibm-team-scenario=ac55f959-c738-4ef0-854d-6e37648edcba%3Bname%3DInitial+Page+Load%3Bextras%3D%2Fqm%2Fauth%2Fauthrequired%2C1453823282026; Path=/ Transfer-Encoding: chunked X-Powered-By: Servlet/3.0 X-com-ibm-team-repository-web-auth-msg: authrequired
Can anyone with experience with the RQM API tell me what happened? Or maybe I'm missing something in common that is common to most RESP APIs?
source share