rqm REST API: get all testphase with a title name is not working
Hello all,
https://baseurl/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/project/testphase?fields=feed/entry/content/testphase[title="ABC40_TT#433"]
Thanks!
3 answers
Have you tried URL encoding the query parameter values in the request URI?
For example, instead of:
https://baseurl/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/project/testphase?fields=feed/entry/content/testphase[title="ABC40_TT#433"]
https://baseurl/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/project/testphase?fields=feed%2Fentry%2Fcontent%2Ftestphase%5Btitle%3D%22ABC40_TT%23433%22%5D
Comments
Then i added one more "#" to the title string like this: [title="ABC40_TT##433"]. I've encoded the url again and somehow i've got all the testphases with the titlename ABC40_TT#433.
This means if we have a value which contains one "#", then the get request will probably fail. I think we need to send the request with doubles hashs.This means:
You can also try free online tools like https://www.freeformatter.com/url-parser-query-string-splitter.html and https://url-decode.com/tool/url-parser and try your original URI. If you do that, you see that the #433 is taken as the hash fragment and is not part of the query parameter value. That's because the URI was not correctly formed by URL encoding the parameter value.
If you try the proper URI, you see the URL encoded fields parameter value extracted in full. Applications should perform URL decoding of such values. If they do not, that's a defect in that application.
https://baseurl/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/project/testphase?fields=feed%2Fentry%2Fcontent%2Ftestphase%5Btitle%3D%22ABC40_TT%23%23433%22%5D
I recommend submitting a defect against ETM.
That URI looks like an ETM reportable rest API. Have you looked at using OSLC Query?
For example, is there a query capability for test phases?
Comments
Thanks for the quick reply. What do you mean exactly with query capability for testphases? We are currently only using rest api queries. I think as Ian Barnard mentioned, maybe the filter is not set up correctly. But i'm doing it exactly as it is described in the documentation. This is a example from the documentation: <feedUrl>?fields=feed/entry/content/testplan[title='test plan title']/description
Comments
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Aug 11 '22, 9:58 a.m.IME the ETM reportable rest filters like you're trying seem to return everything when the filter is malformed - however I don't have a better suggestion for you to try, excep ttry dcterms:title instead of tite. Or search the forum for an example reportable rest call that works then work from there.
Sanj Ratnam
Aug 11 '22, 1:28 p.m.This is a example from the documentation: <feedUrl>?fields=feed/entry/content/testplan[title='test plan title']/description
my query looks similar. I've tried it also with dcterms:title, unfortunately it does also not work.