It's all about the answers!

Ask a question

Why getting an invalid filter expression on @href from RQM 6.0.6.1 REST API


Aaron Troost (133) | asked Nov 16 '20, 8:52 a.m.
edited Nov 16 '20, 9:28 a.m.
Hi,

the background of my question is to fetch all testcases (name, ID-> used for result later) linked to an architectureElement (input) from RQM 6.0.6.1 iFix013.

Currently I get all testcases.  For perfomance reasons I would like to use filtering in the request already rather than filter in RPE.

Using strictFields=true, I got this error:
Error 400: AQXIN5017E The call to the Rational Quality Manager Reportable REST API contained an invalid filter expression: architectureElement/@href equals https://<host>/am/resource-rmm/1565991.

Request is:
https://<host>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/testcase?fields=feed/entry/content/testcase/(identifier|title|architectureElement[@href='https://<host>/am/resource-rmm/1565991'])&strictFields=true

For debugging I even copied the href from the result that I received when using:
?fields=feed/entry/content/testcase[title='XYZ']/(identifier|title|architectureElement), to make sure I have the correct format.

But I am still getting an invalid filter expression. What am I doing wrong?

I am also faceing the same issue in the next step to fetch the latest executionResult for the test case (using identifier from above request). Request:
https://<host>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/executionresult?fields=feed/entry/content/executionresult[isCurrent='true']/(*|testcase[@href='https://<host>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<projectArea>/testcase/urn:com.ibm.rqm:testcase:10487'])&strictFields=true

Thanks for your help,
Aaron

Accepted answer


permanent link
Subramanya Prasad Pilar (4.6k16) | answered Dec 08 '20, 1:10 a.m.
edited Dec 08 '20, 8:02 a.m.
Can you try
https://<host>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKEBanking+(Quality+Management)/testcase?fields=feed/entry/content/testcase/(indentifier|title|architectureElement/@href='https://<host>/am/resource-rmm/1565991'])

Please refer Supported Resources and Properties section in ETM Reportable REST API (RQM Reportable REST API) wiki.
Aaron Troost selected this answer as the correct answer

Comments
1
Aaron Troost commented Dec 08 '20, 4:08 a.m.
Hello Subramanya,

thank you for your response.

I acutually used architectureElement/@href on the testcase request and testcase/@ref on the executionresult. So it should be according to documentation.

Regards,
Aaron

Subramanya Prasad Pilar commented Dec 08 '20, 8:01 a.m.

Can you try the URL in my answer with projectAreaName included?


Aaron Troost commented Dec 08 '20, 8:12 a.m.
Hello Subramanya,

that did the trick.

Seems like the filtering is only working inside a project and not on the complete server.

Thank you,
Aaron

One other answer



permanent link
Chad Meadows (31) | answered Dec 07 '20, 12:36 p.m.
JAZZ DEVELOPER
Make sure that the client you are using is encoding the 'fields' parameter value using x-www-form-urlencoded.

For example something like:
fields=feed%2Fentry%2Fcontent%2Ftestcase%2F(identifier%7Ctitle%7CarchitectureElement%5B%40href%3D'https%3A%2F%2Fhost%2Fam%2Fresource-rmm%2F1565991'%5D)

Comments
Aaron Troost commented Dec 08 '20, 4:22 a.m.
Hello Chad,

thank you for your response.

I tried the request using the encoding directly. but it didn't work, still getting the same error.

I am not so familiar with REST API and PRE, its my first projected using them. Is there any other way to use this encoding? Or didn't I even use it properly? Do I need to include any header for it?

Thank you,
Aaron

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.