It's all about the answers!

Ask a question

Paged OSLC query result limited to 100 ?


ARMAND ANGLADE (12159) | asked Feb 03 '14, 3:51 a.m.
We are currently implementing dependent and parametrized HTTP Value set providers (https://jazz.net/library/article/1257)
In our implementation the XML Data source is retrieved from an OSLC query to the JTS Server.
By setting XML Data source to the value :
     https://<server-name>:<port>/ccm/oslc/contexts/<id of project AREA/workitems?oslc_cm.query=dc:type=%22component%22&oslc_cm.pageSize=100&oslc_cm.properties=dc:title
Im a able to retreive and process 100 WI, but if there are more than 100 I receive an exception. This  is because the query is paginated and the maximum page size is of 100.

Is there any way to increase the page size to more than 100 ?
Can we reset the pagination before running the query ?

We checked that in the server (ccm) there is a property called 'Maximum Query Result Set Size' set to 1000
 and another property (jts) called 'Max Number of Entries Returned from User Search' set to 100.

We don't know what they are exactly for – can it help us increasing the limit to be more than 100 in our case ?

Please advise, this limitation could have a severe impact our implementation.

Accepted answer


permanent link
Stephane Leroy (1.4k149) | answered Feb 03 '14, 8:31 a.m.
JAZZ DEVELOPER
Hi Armand,

you could handle the resource paging feature as described in the Pagination section of this article:
https://jazz.net/library/article/1001#advanced_concepts

Regards,
Stéphane
ARMAND ANGLADE selected this answer as the correct answer

Comments
ARMAND ANGLADE commented Feb 05 '14, 7:34 a.m.

Hi Stephane,

Thanks for pointing out to this article.

There is indeed a nice section about Pagination that explains how can we handle it, but in our implementation what we need is to increase the maximum page size to handle more than 100 WIs.

If we try to set oslc_cm.pageSize to a value superior to 100 for example, the page size is automatically set back to default value (50).

We can handle that with a script following the recomendation of the article  but we would prefer increase the maximum page size or disable pagination in the same query.

It seems to be working as designed for that OSLC services.

I will open an RFE.

Thanks again for your help.

Regards,

Armand


Stephane Leroy commented Feb 05 '14, 8:21 a.m. | edited Feb 05 '14, 8:28 a.m.
JAZZ DEVELOPER

Hi Armand,

seems like what you depict was experienced before:
https://jazz.net/forum/questions/73265/max-100-results/
https://jazz.net/forum/questions/68752/cm-rest-api-simpe-query-results-limitted-to-50/

FYI, a previous answer in
https://jazz.net/forum/questions/85641/rtc-returns-only-50-work-items-when-it-is-accessed-though-oslc-query points to an already existing RFE (will save you time maybe):
https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=228310/

My guess is that we don't want the CLM server to be overloaded with possibly very large OSLC requests. But again, just a guess. You should get more details along with this RFE tracking/analysis. 

Regards,
Stéphane


ARMAND ANGLADE commented Feb 11 '14, 6:20 a.m.

Thanks again stephane for your help.
The RFE link was very useful.
Regards.
Armand.

2 other answers



permanent link
Srikanth Bhushan (16942734) | answered Feb 03 '14, 4:19 a.m.
Did you try looking at

Max Feed Entries/Page , in the advanced properties?

Comments
ARMAND ANGLADE commented Feb 05 '14, 7:08 a.m.

Hi Srikanth,

Thanks for your reply !

Unfortunately, changing this value does not have any effect on the result of the ccm oslc query.

Regards,

Armand.


Takehiko Amano commented Feb 05 '14, 8:33 a.m.
JAZZ DEVELOPER

Currently, the number of WIs is limited to 100. I have implemented paging like:

  1.  Get the first page, it contains totalCount.
  2. Get oslc:totalCount, then determine the number of pages divided by 100.
  3. Get next page by adding &_startIndex='<next page>'  to query syntax.

3 loops until page is last page. The key is to specify "_startindex".



Hope this helps








ARMAND ANGLADE commented Feb 11 '14, 6:24 a.m.

Thanks Takehiko !
This will help if we decide to implement the paging.
However, we prefer to push for the existing RFE for have raised to raise the existing limit.
Regards.
Armand.


permanent link
Olivier ROSET (50121) | answered Jan 22 '18, 8:35 a.m.

 The simple way to do it is to : 


  1. Do the initial query
  2. get datas
  3. Get the oslc_cm:next attribute in oslc_cm:Collection
  4. if oslc_cm:next  is set, go to 1 with the oslc_cm:next as the resource url and loop
That's all.

You have a oslc_cm:previous in oslc_cm:Collection to move to the previous page if you want to go back
 

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.