How to get more workitems using oslc_cm.pageSize parameter in HTTP Client Query method?
Hi,
2 answers
This came up already as a question from you. I think it was made clear to you in https://jazz.net/forum/questions/282584/how-to-return-data-in-json-format-in-eclipse-while-using-http-client-query-method that "application/Json" might not be supported and you should use "application/rdf+xml".
In general you should be able to (for supported content type/accept) define the page size using oslc_cm.pageSize=value within reasonable limits. I think I tested this and it worked for me (provided the supported accept header). See my experiences in https://rsjazz.wordpress.com/2022/02/22/ewm-oslc-query-api/
Most of the users here, I am pretty sure, do not know Boomerang and it is not helpful to even mention the tool if there was no suspicion that the tool is the reason for the issue. If you want to use tools that most of the API users in this forum have, I would suggest to use RESTClient in Firefox or Postman as standalone tool. The first one allows to circumvent authentication as you can reuse a session you opened with the application. The second has more capabilities, but requires you to understand and perform the authentication.
oslc_cm.pageSize
is not a standard OSLC parameter.This is a non-standard parameter specific to EWM. If the data you want is not on the first page, you should keep getting the next page until you see the data you want, or you reach the end of the sequence of pages.
OSLC Core https://docs.oasis-open-projects.org/oslc-op/core/v3.0/os/oslc-core.html defines the
oslc.pageSize
parameter, but this is expressed in terms of number of triples and not the number of members returned. Note that standard OSLC paging requires a client to consume all pages, construct a union RDF model from all the responses, before it can process the RDF result.
Comments
AFAIK, each page contains all the data requested for the work items. You can deal with each page at a time and do not have to merge them to a new RDF document.
oslc.paging=true
is specified, the paging should be done as per the OSLC Core specification where
oslc.pageSize
expresses the page size in units of triples, and there is no guarantee as to the order of triples that are included in any one page. See https://github.com/oslc-op/oslc-specs/issues/169 for a discussion. It would not surprise me if EWM was non OSLC compliant in this area.
Thanks for sharing David!