It's all about the answers!

Ask a question

RTC returns only 50 work items when it is accessed though OSLC query


0
1
Takehiko Amano (1.3k3641) | asked Aug 22 '12, 3:39 a.m.
JAZZ DEVELOPER
Hi,

I wanted to change the number of records returned from RTC server when it is accessed via OSLC.  It seems default value is 50.  So I added oslc.paging and oslc.pageSize.

https://localhost/ccm/oslc/contexts/<project_uuid>/workitems?oslc.paging=true&oslc.pageSize=200&oslc.select=dcterms:identifier

But still it returns only 50 records. if I change the value to oslc.pageSize=10, the query returned 10 records. So this parameter is working for less than 50. I did some experiments:
  • oslc.pageSize=10 => Works
  • oslc.pageSize=50 => Works
  • oslc.pageSize=100 => Works
  • oslc.pageSize=101 => Does not Work !

I wonder if this is a spec or bug. I prefer not to use oslc:nextPage ( I understand there is overhead in the client side for large query though).




Accepted answer


permanent link
Prasun Roy (1673813) | answered Dec 20 '12, 2:26 p.m.
 This is a restriction on all CLM tools where the Max Feeds Per Page is fixed at 50. Although you can change it through Administrator Page (Advanced Settings --> Max Feed Entries/Page). But I would suggest that you iterate through all the pages to get all the entries. Every Page you get has a link to the next page (if any) that has next set of entries.
Takehiko Amano selected this answer as the correct answer

3 other answers



permanent link
Nate Decker (37812958) | answered Apr 22 '14, 2:48 p.m.

Just to add a note to this thread, I believe you can override the default number of query results by adding an optional qualifier at the end of the URL. I've done this with REST API queries and not really with the OSLC ones, but I assume it works for both protocols. Just tack on "&size=###" to override the number of returned results.

For example:

https://localhost:port/ccm/rpt/repository/workitem?fields=workitem/workItem[...]/displayFields&size=500


permanent link
Takehiko Amano (1.3k3641) | answered Aug 23 '12, 11:12 p.m.
JAZZ DEVELOPER
Self post. I think this is a defect, I created this one.

Setting oslc.pageSize over 100 does not work when querying workitems through OSLC (228310)

Please use this workitem when users hit this problem.


Comments
Buzz Moschetti commented Dec 20 '12, 10:56 a.m.

I think IBM uses paging as a defensive measure against a client dragging out the entire data set and clobbering the server.    Been barking up this tree for some time and gave up.   Now I have a small set of logic that looks for next page and iteratively calls the server for the next batch of material, appending it to a big list (in perl) as we go.


Takehiko Amano commented Dec 20 '12, 8:06 p.m.
JAZZ DEVELOPER

Yes, that is what I'm doing now in my Perl module. It is not difficult.


permanent link
Sian O'Briain (35318) | answered Sep 11 '15, 4:16 a.m.
edited Sep 11 '15, 4:18 a.m.
I hit problems using the next page link. I was requesting json format and when I navigated to the next page I would get back xml which seemed to cause problems with my script accept headers. In the end I started using the _startIndex and oslc_cm.pageSize paramaters and just add on the page size through each loop. This seems to work fine but if anyone can point out any flaws with this approach please let me know. No result token so hope it is ok

Your answer


Register or to post your answer.