It's all about the answers!

Ask a question

RPE RQM ETM: REST API for Single Test Case XML , Config Managed


Glyn Costello (1402252) | asked Oct 02 '20, 6:44 a.m.
edited Oct 02 '20, 9:38 a.m.

 Hi, I'm trying to use the below URI to retrieve the XML for a single test case so I can explore the data in the XML data source to help me build a template. However, when I paste this into my browser, I'm just redirected to the test case in the WebUI instead of receiving the XML?


https://[SERVER]/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/[PROJECT]/testcase?abbreviate=false/urn:com.ibm.rqm:testcase:3&oslc_config.context=[SERVER]/gc/configuration/2

Also, the config.context seems to be completely ignored when specifying the urn:com.ibm.rqm:<resourcetype> 
... it just takes me to the last config I selected in the WebUI. How would I control this for RPE Publishing?


Comments
Brett Bohnn commented Oct 02 '20, 9:50 a.m. | edited Oct 02 '20, 9:52 a.m.

 Here is a screen shot doing a GET on a test case URL using the same abbreviate=false and configuration context. As you said, pasting to the browser just resolves to the test case but the REST client will return the XML.


Accepted answer


permanent link
Brett Bohnn (94111157) | answered Oct 02 '20, 9:46 a.m.

 Hi Glyn,


Do you have a REST client for your browser? e.g. for Chrome I use https://chrome.google.com/webstore/detail/talend-api-tester-free-ed/aejoelaoggembcahagimdiliamlcdmfm?hl=en but there are several options.

You should install a REST client and add the header "accept" with value "application/rdf+xml" then paste in the test case query URL and click GET

Thanks,
Brett

Glyn Costello selected this answer as the correct answer

Comments
Glyn Costello commented Oct 02 '20, 10:35 a.m.

This is great, just what I was looking for, thanks! 

2 other answers



permanent link
Subramanya Prasad Pilar (4.6k16) | answered Oct 02 '20, 9:55 a.m.

For reading (making GET request on) resource URL (single resource), you cannot use browser. You can either use a REST Client or use "Preview Data..." option in RPE.
While using RESTClient, you can either add Configuration-Context header or append oslc_config.context parameter to the URL as in
https://<server>:<port>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<projectAlias>/testcase/urn:com.ibm.rqm:testcase:<id>?oslc_config.context=https://<server>:<port>/gc/configuration/<id>


permanent link
Brett Bohnn (94111157) | answered Oct 02 '20, 9:52 a.m.

Will try the screen shot again. 


Here is a screen shot doing a GET on a test case URL using the same abbreviate=false and configuration context. As you said, pasting to the browser just resolves to the test case but the REST client will return the XML.


Your answer


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