Reportable Rest API is not Returning all Test cases
Hello Everyone,
I have used below reportable rest API for fetching all test cases available, but it is returning only 50 testcases but total 2744 present. Kindly guide me, how to retrieve all test cases.
Query URL:-
https://{domainName}:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/{Project UUID}/testcase?oslc_config.context={Config Context}
I have also tried the above query by adding pagination parameter(&oslc.paging=true&oslc.page=0&oslc.pageSize=512), still ,it is returning only 50 test cases. I have also tried by adding '&size=10'.Kindly help me.
Is there any Configuration to be set in Advanced properties to get more then 50 data.
Thanks and Regards,
Jyoti
Accepted answer
The Reportable REST API is not an OSLC API and does not support OSLC pagination. (Note that configuration headers are supported.)
Paging for this (Reportable REST) API is described in the documentation:
https://jazz.net/wiki/bin/view/Main/RqmApi - see section Feeds . Click on the link ATOM paging specification and read the document. As described you get first, last, previous, next URLs that you can use to get the next or other page. Mind the character conversion mentioned in the section.
It does not document pagination parameters as far as I can tell. The page size is defined in the Advanced Properties (see the related section in the document next after the feed section). Default is 50. Max 512 and this works, I just tested it by setting it to 5. This also revealed the next page links as explained above.
Comments
Hello Ralph,
Thank you for information .I am also able to get test cases till 512,as it is max, after changing 'Max Feed entries per page' in Advanced property of QM, but next page is still returning same data. Pagination is not working as expected. Next page URL ,will contain '&page={Number starting from 0}',but after incrementing this page parameter value, still returning same data.
Pagination Query:-
https://{domainName}:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/{Project UUID}/testcase?oslc_config.context={Config Context}&page=1
Kindly guide me, how to retrieve all testcases.
Thanks and Regards,
Jyoti
First call e.g.
Returns results with next page info
Get the next link information e.g.
https://elm.example.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/_9rYEoFpmEeubKv3DLU7kgg/testcase?token=_elcSkOCyEeyNV5l-7YU0TA&page=1
Fix the encoding (the 'amp' must go)
https://elm.example.com:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/_9rYEoFpmEeubKv3DLU7kgg/testcase?token=_elcSkOCyEeyNV5l-7YU0TA&page=1
Fix the encoding (the 'amp' must go)
GET the URL and perform the same operations for the next pages.
Thank you so much. It is working fine.