How to get REST API call repsonse body to return the next page data
I ran an the following REST API call:
Headers:The response body is a paged atom feed with 50 testcases on page 0, so far so good. If I then use the links in the atom feed's link nodes, or run the previous API call and manually append a page no.(&page=1), I still get the same 50 testcases even though, according to the atom feed in the response body, I'm on a new page. This can be confirmed by "self","next", "previous", "last" attributes of the link nodes.
Get https://<my host url>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/_yG3bADHBEeWfYafF4ht9rQ/testcase?fields=feed/entry/content/testcase/(webId|title|category[(@value='Automated TH' or @value='Automated UX') and (@value='Regression' or @value='Automation IR Issues') and (@value='Explora 1 %26 Explora 2A')]|state|estimate|customAttributes)
- <label class="" style="color: rgb(51, 51, 51); display: inline-block; font-family: Cousine; font-size: 12px; margin-right: 5px;"> accept: </label> "application/atom+xml"
- <label class="" style="color: rgb(51, 51, 51); display: inline-block; font-family: Cousine; font-size: 12px; margin-right: 5px;"> oslc-core-version: </label> "2.0"
I have tried using "limit" and "offset" parameters in the API call to try and see if this would advance me to the next 50 results but have had no luck with that.
If I run the above call without any filters I get almost all 9713 testcases(don't know why not all are returned) in our project which, when I page through them using links, I get 26 pages of 50 unique records, thereafter each page starts repeating, until i've gone through 9000+ records. This results in 1300 unique records each repeated(duplicated) roughly 26 times, and in my inability to manually filter the results in my client, which I'm forced to do because the filter parameters bring back only 50 unique records, duplicated 86 times. 1300 is an improvement on 50, however still not the desired outcome.
One answer
Please read https://jazz.net/wiki/bin/view/Main/RqmApi#Feeds.
Note, you're using the OSLC-Core-Version header (not required), which is for the OSLC QM API (see https://jazz.net/wiki/bin/view/Main/RqmOslcQmV2Api).
Comments
Donald Nong
May 01 '18, 3:49 a.m.Paul Slauenwhite
FORUM MODERATOR / JAZZ DEVELOPER May 01 '18, 1:17 p.m.Masizane Marivate
May 02 '18, 3:17 a.m.Paul Slauenwhite
FORUM MODERATOR / JAZZ DEVELOPER May 02 '18, 3:39 a.m.Masizane Marivate
May 02 '18, 12:30 p.m.Paul Slauenwhite
FORUM MODERATOR / JAZZ DEVELOPER May 02 '18, 11:35 p.m.