It's all about the answers!

Ask a question

How do I disable OSLC paging in RTC 4.0


Karthik Krishnan (859393134) | asked Jul 30 '12, 7:57 a.m.
edited Jul 30 '12, 10:48 a.m.
I have the following url working perfectly fine in RTC 3.0.1

https://jazzserver:9443/ccm/oslc/users/

The above was returning all users in one XML

With the upgrade to RTC 4.0 the above url assumes paging by default and returns only 50 users (nodes) with link to next page

How can I disable the paging (by default possible?)

I tried https://jazzserver:9443/ccm/oslc/users?oslc.paging=false but no luck,.

Even tried
    https://jazzserver:9443/ccm/oslc/users?oslc_cm.pageSize=500
      https://jazzserver:9443/ccm/oslc/users?oslc_cm.pageSize=-1
but no luck

I am still consuming OSLC 1.0

Any help would be really appreciated

2 answers



permanent link
Jared Russell (1.3k12019) | answered Jul 30 '12, 10:42 a.m.
edited Jul 30 '12, 10:50 a.m.
I don't believe that it is possible to disable paging because the OSLC core specification itself doesn't say what should happen if the client specifies oslc.paging=false, only what may happen if the client specifies oslc.paging=true:

a client adds the "key=value" pair  oslc.paging=true  to the query component of the resource URI and the server MAY respond by returning a representation that contains partial information about the resource 


With regards to the pageSize attribute it is oslc.pageSize and not oslc_cm.pageSize, however note the caveat in the spec:

 OSLC Services MAY ignore oslc.pageSize
In order to be OSLC compliant you should be handling the case where the server does decide to paginate the results, and check for the oslc:ResponseInfo element in the returned response, then extracting the URL to the next page from that.

Comments
Karthik Krishnan commented Jul 30 '12, 10:46 a.m. | edited Jul 30 '12, 11:02 a.m.

Thanks. I even tried that but no luck. Actually oslc.pageSize does not work in the context of RTC. What works is oslc.pageSize which I guess is defaulted to 50. Unable to get it working beyond 100 as described here https://jazz.net/forum/questions/68752/cm-rest-api-simpe-query-results-limitted-to-50


permanent link
Karthik Krishnan (859393134) | answered Aug 03 '12, 4:25 a.m.
IBM says they won't fix this. Too bad they could have done this for backward compatibility sake

Your answer


Register or to post your answer.