how can I invoke the REST service provided in current RQM?
I would like to invoke the REST service API provided in the current RQM (1.0.1) from the outside of RQM, i.e., from a third part program in a programmatic way.
I tried to write code to send the HTTP request to the REST service, but it seems I should to login and authenticate to the RQM firstly from the server response. But it seems that the Tomcat does not allow authenticate directly by sending username and password to j_sucurity_check servlet.
I've posted similar subject in Extending Team Concert, please refer that..
https://jazz.net/forums/viewtopic.php?t=4348
https://jazz.net/forums/viewtopic.php?t=3910
so, how can I pass the authentication and invoke the REST API from the outside of the RQM?
Thanks in advance..
I tried to write code to send the HTTP request to the REST service, but it seems I should to login and authenticate to the RQM firstly from the server response. But it seems that the Tomcat does not allow authenticate directly by sending username and password to j_sucurity_check servlet.
I've posted similar subject in Extending Team Concert, please refer that..
https://jazz.net/forums/viewtopic.php?t=4348
https://jazz.net/forums/viewtopic.php?t=3910
so, how can I pass the authentication and invoke the REST API from the outside of the RQM?
Thanks in advance..
One answer
In tomcat or WAS, you can try it like this.
1. Invoke a REST Service
2. In response, RQM will ask you to login first. Get thecookie value from response header's "Set-Cookie" field
3. POST a request to "jazz/j_security_check", add "j_username", "j_password" to post parameters and also addcookie to request header
4. Add cookie to request header and invoke REST Service again. It should work this time. Hope it helps.
1. Invoke a REST Service
2. In response, RQM will ask you to login first. Get the
3. POST a request to "jazz/j_security_check", add "j_username", "j_password" to post parameters and also add
4. Add cookie to request header and invoke REST Service again. It should work this time. Hope it helps.