It's all about the answers!

Ask a question

RQM rest api get Testcase by title with % on the title


Pablo Torres (112) | asked Aug 07 '20, 7:56 a.m.
edited Aug 07 '20, 9:26 a.m.
Good  morning,
i am using the rest api on RQM 6.0 to get the date of a testCase matching a specific title, but the title contains the % simbol and i could not make the query work.
Lests say the title is "Check that the preasure is under 100%"

Acording to the api documentaiton: https://jazz.net/wiki/bin/view/Main/RqmApi : "wildcard characters may be escaped by a proceeding # character"

So I ran the query like:
.../testcase?fields=feed/entry/content/testcase[title='Check that the preasure is under 100%']/* <-- expected fail: URLDecoder: Illegal hex characters in escape (%) pattern - For input string.

.../testcase?fields=feed/entry/content/testcase[title='Check that the preasure is under 100#%']/* <-- return all the TC regardless of the title

.../testcase?fields=feed/entry/content/testcase[title='Check that the preasure is under 100##%']/* <-- return all the TC regardless of the title

.../testcase?fields=feed/entry/content/testcase[title='Check that the preasure is under 100\%']/* <-- fails: URLDecoder: Illegal hex characters in escape (%) pattern - For input string

.../testcase?fields=feed/entry/content/testcase[title='Check that the preasure is under 100\\%']/* <-- fails: URLDecoder: Illegal hex characters in escape (%) pattern - For input string

i also tried all this combination replacing the string char ' to " with similars results

Also tried adding &wildcard=X 
but it does not work.

I dont know what else to try, but it fails or return everything regardles of the title.
Any clue on how to escape the % character

One answer



permanent link
Fabian Lomeli (1013) | answered Aug 07 '20, 4:43 p.m.
Hello Pablo,
I was playing with the API and seems this might work for you

{{hostname-url}}/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/{{qm-project-area-id}}/testcase?fields=feed/entry/content/testcase[title='Check that the preasure is under 100*']/*&strictFields=true&wildcard=*

Hope this helps

Comments
Pablo Torres commented Aug 10 '20, 2:16 a.m.
Sorry. It does not help.
Please note that the % is part of the title, i do not intent do use it as a wildcard, or regex.
so i have a this two test cases:
"Check that the preasure is under 100%"
"Check that the preasure is under 100Y"

Your query will return them both, and i just whant the first one.

Pablo Torres commented Aug 10 '20, 2:19 a.m.
Sorry. It does not help.
Please note that the % is part of the title, i do not intent do use it as a wildcard, or regex.
so i have a this two test cases:
"Check that the preasure is under 100%"
"Check that the preasure is under 100Y"

Your query will return them both, and i just whant the first one.

Pablo Torres commented Aug 10 '20, 5:56 a.m.
I just tried this also:

?fields=feed/entry/content/testcase[title='Check that the preasure is under 100#%']/*&strictFields=true&wildcard=*

And return all the TestCases on the platform (not filtering by title at all).

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.