It's all about the answers!

Ask a question

OSLC returning only 50 work items per page in EWM (7.0.2)


Brad Morse (235) | asked Jul 13 '23, 1:07 p.m.
I am using the following GET post for OSLC:
https://<server>/ccm/oslc/contexts/_d1dCIOOvEemJC5SNa9XURg/workitems/com.ibm.team.workitem.workItemType.defect

I have seen posts that point out a setting to change this. But, that does not seem to work. I have searched all the advanced settings and could not see where the limit was set to 50. There is a limit set to 1000 for Max Query Result Set Size. The return has the following:


<oslc_cm:Collection xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/terms/" xmlns:oslc_pl="http://open-services.net/ns/pl#" xmlns:calm="http://jazz.net/xmlns/prod/jazz/calm/1.0/" xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/" oslc_cm:next="https://<server>/ccm/oslc/contexts/_d1dCIOOvEemJC5SNa9XURg/workitems/com.ibm.team.workitem?oslc_cm.pageSize=50&_resultToken=_QRIewCGeEe6zGblBv9fanw&_startIndex=50" oslc_cm:totalCount="1000">

This seems to limit to the 1000 for all pages but also applies a limit of 50 for each page. I find nowhere to change that.

I would like to get all the results in one page. Is this possible?


Comments
Brad Morse commented Jul 13 '23, 1:09 p.m.

Also would like to know if the total limit is 1000 with 50 page limit and the actual results would be greater than 1000, how do I get to those over 1000? 


Brad Morse commented Jul 13 '23, 1:11 p.m.

Is the OSLC approach just too cumbersome to consider using and the Java REST API should always be used instead?


Brad Morse commented Jul 13 '23, 1:29 p.m.

Also when posting the nextPage (which is basically the same URL except startIndex increased by 50) it actually changes it back to the first page (startindex=0). 


Is this a defect?

2 answers



permanent link
Ralph Schoon (63.3k33646) | answered Jul 13 '23, 1:25 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jul 13 '23, 1:31 p.m.

This is called paging and, as far as I am aware, is documented in the OSLC API documentation. Paging is also used in other not OSLC APIs. Pretty much every API supports some kind of paging to help with scalability. You should look up the documentation for your API and read up on paging.

What I have found about paging used in OSLC querying can be found here: https://rsjazz.wordpress.com/2022/02/22/ewm-oslc-query-api/  I think I remember there was something about the next page being URL Encoded. I am not sure any more, if you can change the page size.


Comments
Brad Morse commented Jul 13 '23, 1:30 p.m.

Hi Ralph,

See my last comment. It doesn't appear that paging is working correctly as it changes the next page URL to the first page URL.
Seems like a defect


Brad Morse commented Jul 13 '23, 1:33 p.m.

 Also, would like to know if can configure to get around this and set the limit high enough where paging is not an issue. I only have to run this script once, so not concerned about performance. Will reset back to original value after script runs.


permanent link
David Honey (1.8k17) | answered Jul 13 '23, 6:07 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Note that EWM query capabilities for work items are not entirely conformant with OSLC Resource Paging. For example, the page size is expressed in terms of number of members per page rather than number of RDF statements per page.

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.