It's all about the answers!

Ask a question

Query Test Plan with Rest API


Canberk Akduygu (99237371) | asked Jul 01 '14, 8:51 a.m.
edited Jul 01 '14, 8:56 a.m.
Hello,

I'd like to query my RQM projects to fetch 'Approved' Test Plans which contains UAT keyword in the category combobox.

I have written some REST Queries like:

https://server:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PROJECTNAME/testplan?fields=feed/entry/content/testplan/(title|description|category[@term='Test Phase' and @value='User Acceptance Test'])

This filters my plans and bring me 2 Test Plans as I expected.

I enhanced the query like:
https://servername:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PROJECTNAME/testplan?fields=feed/entry/content/testplan/(category[@term='Test Phase' and @value='User Acceptance Test'] | owner[@ns3:resource='https://wat01ibmclm.int.teb.com.tr:9443/jts/resource/itemName/com.ibm.team.repository.Contributor/P21885'])

That brought 1 test plan as expected because user P21885 has only one Test Plan assigned to him.

I tried to filter my plans according to Approval status:
https://SERVERNAME:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PROJECTNAME/testplan?fields=feed/entry/content/testplan/(category[@term='Test Phase' and @value='User Acceptance Test'] | state='com.ibm.rqm.planning.common.new')

But this is not working. It doesnt filter according to the status.

How should I combine my queries and get approved test plans that has User Acceptance Test set as category.

I also checked https://jazz.net/wiki/bin/view/Main/RqmApi#HTTP_GET_Requests but no get query for status has worked.
Thank you in advance

Accepted answer


permanent link
Vidya Malkarnekar (1.0k15) | answered Jul 01 '14, 2:00 p.m.
JAZZ DEVELOPER
Hi Canberk,

I could get the query to work after switching the order of filters.
e.g.
https://SERVERNAME:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PROJECTNAME/testplan?fields=feed/entry/content/testplan[state='com.ibm.rqm.planning.common.new']/(title|category[@term='Test Phase' and @value='User Acceptance Test'])

-Vidya
Canberk Akduygu selected this answer as the correct answer

Comments
Canberk Akduygu commented Jul 02 '14, 1:39 a.m.

Thank you for your help.
Is it normal that parameters should be in correct order to execute properly?

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.