Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

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

0 votes


Accepted answer

Permanent link
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

0 votes

Comments
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

1 vote

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

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
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)

0 votes

Comments
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 log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,948

Question asked: Nov 16 '20, 8:52 a.m.

Question was seen: 1,894 times

Last updated: Dec 08 '20, 8:12 a.m.

Confirmation Cancel Confirm