It's all about the answers!

Ask a question

Login inside RQM Server using a REST API


Ajith O M (369) | asked Jan 29 '19, 4:52 a.m.

 I'm trying to hit the RQM API URL using postman in chrome/restclient in mozilla without opening the the qm site (https://serveraddress.com/qm) and Im notting getting a valid 200 response. How do i overcome this ? Is there any way i can access the details from rqm api without opening the site in new tab ? 

Accepted answer


permanent link
Tadeusz Janasiewicz (105149) | answered Jan 29 '19, 5:02 a.m.
Hi Ajith,

You need to have a JSession ID, not sure if Poster supports it.
I mean, browser plugins using session details from browser.
Here you will find some helpful tips:
Ajith O M selected this answer as the correct answer

Comments
Ralph Schoon commented Jan 29 '19, 5:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Ajith O M commented Jan 29 '19, 7:44 a.m. | edited Jan 29 '19, 7:44 a.m.

Thanks a lot Tadeusz and Ralph.

Could you please tel me how do i get the response from RQM rest API from java code. Which http client should be used to achieve this. My objective is to consume the rqm Apis and get the response through java. 


Tadeusz Janasiewicz commented Jan 29 '19, 8:03 a.m.
I think this is the best place to start:

Download the workshop and check the examples :)

Ajith O M commented Jan 30 '19, 2:25 a.m.

Thanks a lot :)

Got it..Just posting the steps for future reference. . I used RQMUrlUtility jar provided by JAZZ for both Get and Put requests. Using this we can login inside the server as well as perform different http operations from code. 
Steps followed : 
1. RQMUrlUtlyLogin to login inside the server. 
2. rqmLogin.login(userid, password, context);
3.RQMUrlUtlyJRSHttpsClient httpClient = rqmLogin.getHttpClient();
4. GetMethod getMethod = new GetMethod(url);
5.int response = httpClient.executeMethod(getMethod);

Thanks a lot guys. 


Ajith O M commented Jan 30 '19, 4:31 a.m.

Dear Tadeusz and Ralph,

Please let me know the RQM Rest APIs for export pdf option. I would like to have API for pdf trigger(export summary) with respect to test plan. I wish to have a pdf trigger of a particular plan when i give a test plan id through API. I also wish to get the pdf using REST API when igive a plan id. Kindly tell me the APIs for both the operations.

Could you please help me ?


Ralph Schoon commented Jan 30 '19, 5:32 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I am pretty sure that those are internal APIs and you will have to find them out on your own if you want to use them. 


Ajith O M commented Jan 30 '19, 8:22 a.m. | edited unknown

Thanks for the update Ralph.

But could you please guide me on how to start in-order for me to find it those APIs.


Ajith O M commented Jan 30 '19, 8:22 a.m.

Thanks for the update Ralph.
But could you please guide me on how to start in-order for me to find it those APIs. 


Tadeusz Janasiewicz commented Jan 31 '19, 7:47 a.m. | edited Jan 31 '19, 7:49 a.m.
Hi Ajith,

I think Ralph suggested you to try to use reverse engineering and for example, using Dev tools in your web browser check what are the requests send to the server which in return give you the pdf.
There is no publicly available documentation where you can find how to export artifacts to pdf (at least I am not aware of such), and that would be the only option.
You may also contact with your IBM Sales Representative and involve IBM Services to help you with it. That would be the second option which we can offer.
showing 5 of 9 show 4 more comments

Your answer


Register or to post your answer.