How to get more workitems using oslc_cm.pageSize parameter in HTTP Client Query method?
Hi,
We are trying to get a custom workitem type and it's attributes details using HTTP Client Query method and the headers are "Content-Type", "application/Json", "OSLC-Core-Version", "2.0", "Accept", "application/Json".
Query :
qa-clm.pw.ge.com/ccm/oslc/contexts/_JSWgwaSqEeqGIaAO2lNttQ/workitems?oslc_cm.query=dc:type=%22com.ibm.team.workitem.workItemType.p6%22&oslc_cm.pageSize=100&oslc.select=rtc_cm:plannedFor
By using the above query we are able to get 100 workitems in web(rdf+xml), but in the Boomerang(REST API Client) it shows only 50 workitems . Boomerang given the output based on the JSON format.
In the query we are using page size parameter set to 100 but still we are not able to see the values in the output.
Is there any way to get more workitems like (100 or more) using oslc_cm.pageSize while fetching the data using HTTP Client Query
|
2 answers
Ralph Schoon (63.5k●3●36●46)
| answered Mar 10 '23, 3:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Mar 10 '23, 3:41 a.m. 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".
|
David Honey (1.8k●1●7)
| answered Mar 10 '23, 5:17 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Mar 10 '23, 5:18 a.m.
I think you are asking the wrong question.
Note that application/json is not an RDF mime type. This has been previously pointed out to you. If you want to use an OSLC Query, use a supported RDF mime type.
Note that
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.
This is true of the EWM specific paging which is not compliant with OSLC Resource Paging.
For OSLC complant servers, when
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.
Sadly, OSLC does not support the kind of paging required to implement paged UI displays, or to progressively fetch the next N members. I suspect that is why EWM implemented its own proprietary non-OSLC based paging. It's possible that the OSLC OP workgroup may revisit https://github.com/oslc-op/oslc-specs/issues/169 to address this feature gap in a future release of OSLC Core.
Thanks for sharing David! |
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.