It's all about the answers!

Ask a question

Unable to GET all the test plans using the REST API


Jigar Shah (134) | asked Feb 01 '16, 5:39 p.m.
 Hi,

I am trying get all the test plans that are stored for our project in RQM using the REST API. However i am able to populate only first 17 pages off the 90 odd pages that i have. 

https://<.......>/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<projectName>/testplan

Please let me know if the above query i am using is correct. If so then how would i be able to get the rest of the testplan details.

I want to create a XML dump of all the test plans for our project.

Comments
Donald Nong commented Feb 01 '16, 5:50 p.m.

What do you mean "17 pages off the 90 odd pages"? What happened when you tried to fetch the 18th pages?


Jigar Shah commented Feb 01 '16, 5:54 p.m. | edited Feb 01 '16, 11:58 p.m.

 Hi,


I get a response 200 in my code when i check the return status. Also when i open the URL i get the same data. I manage to get around 300 test plan details.

However using the UI i observe i have over 1500 test plans for my project.

You can skip the 17 pages part. It is confusing. However what i mean by 17 pages is that looking at the XML response:
<link rel="self" 
    
;page=0"/><link rel="next" 
;page=17"/>

I assumed that i am receiving only 17 pages of data.

Regards,


Donald Nong commented Feb 01 '16, 11:59 p.m.

The content is all messed up. Do you mean that when you step through to the 17th page, the "next" tag does not contain the link to the 18th page?

One answer



permanent link
Paul Slauenwhite (8.4k12) | answered Feb 05 '16, 7:46 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
A couple of comments:

-See https://jazz.net/wiki/bin/view/Main/RqmApi#Feeds for an explanation on feed paging.

-Ensure the '&' characters are not URL-encoded in the next feed page URL.

-You can use the RQM API Utility (https://jazz.net/wiki/bin/view/Main/RqmApi#RQM_API_Utility) to read all <resource type> resources and outputs their XML representation in an XML feed (ATOM XML schema) to the resources file or console (see the readAll<resource type>Resources command).

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.