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

Query Test Plan with Rest API

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

0 votes


Accepted answer

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

0 votes

Comments

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

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,938
× 7,495
× 479
× 12

Question asked: Jul 01 '14, 8:51 a.m.

Question was seen: 6,503 times

Last updated: Jul 02 '14, 1:39 a.m.

Confirmation Cancel Confirm