It's all about the answers!

Ask a question

How to get more workitems using oslc_cm.pageSize parameter in HTTP Client Query method?


Y Deepak (713) | asked Mar 10 '23, 2:59 a.m.

 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



permanent link
Ralph Schoon (63.5k33646) | 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".

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.


permanent link
David Honey (1.8k17) | 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
Ralph Schoon commented Mar 10 '23, 6:49 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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. 


David Honey commented Mar 10 '23, 7:04 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.

Ralph Schoon commented Mar 10 '23, 7:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Thanks for sharing David! 

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.