How to find parent testcase for testscript via REST-API?
![](http://jazz.net/_images/myphoto/60279671bd046206863c2b15a82f9635.jpg)
I am given a test script ID and can download the XML-representation.
But the XML does not contain any reference to the parent test case.
But I need this information to retrieve the test script's pre-condition.
How do I query RQM w/ curl/poster to find the parent testcase of a testscript?
Kind regards
Stefan
One answer
![](http://jazz.net/_images/myphoto/60279671bd046206863c2b15a82f9635.jpg)
Please try URL like below:
https://server:port/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project area alias>/testcase?fields=feed/entry/content/testscase/(testscript[@href='https://server:port /qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/projectarea/testscript/<web ID>]|*)
I have not tried this. But this should be similar to https://jazz.net/forum/questions/206593
Comments
![](http://jazz.net/_images/myphoto/60279671bd046206863c2b15a82f9635.jpg)
Where do I find the closing single quote for the single quote after @href='
![](http://jazz.net/_images/myphoto/60279671bd046206863c2b15a82f9635.jpg)
Where to put the closing single quote that was opened after @href='
![](http://jazz.net/_images/myphoto/60279671bd046206863c2b15a82f9635.jpg)
I am assuming, that the quote comes after the webid.
I have tried this, but it gives me a feed with a huge list of TCER, that are completely unrelated to the webId that I have provided.
![](http://jazz.net/_images/myphoto/60279671bd046206863c2b15a82f9635.jpg)
I got it to work with
https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/myProject/testcase?fields=feed/entry/content/testcase/testscript[@href='https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/myProject/testscript/urn:com.ibm.rqm:testscript:12345']
I dropped the |*.
I added the closing single quote.
I corrected the misspelled "testcase".
And then it worked.
Thank you.
![](http://jazz.net/_images/myphoto/dbe94a27c372fd9d8fa482d274c8da80.jpg)
Seems there is some issue with the rich text editor while posting answer. Please ignore the typos. Will post my answer after testing at my end. :)