Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes



2 answers

Permanent link

 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.

0 votes


Permanent link
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.

0 votes

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

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937
× 7,495
× 1,325

Question asked: Mar 10 '23, 2:59 a.m.

Question was seen: 1,303 times

Last updated: Mar 10 '23, 7:06 a.m.

Related questions
Confirmation Cancel Confirm