It's all about the answers!

Ask a question

DNG OSLC queries pagination


Jayesh Gaikar (59215) | asked Sep 11 '20, 7:52 p.m.
HI,

May i know how to handle multiple pages return by OSLC query in case of large number of artifacts return by the query.

I came across the URI in tag <oslc:nextPage > in <oslc:ResponseInfo> with page parameter. but When i try to access it through HTTP client it returns status Error 403: Forbidden .

I also verified Response Header Location, Which doesn't seems like having expected URL (URL ending with /rm/view)

Can someone help me with it .

Thanks & regards,
-Jay

2 answers



permanent link
Bartosz Chrabski (3.4k22949) | answered Sep 12 '20, 9:07 a.m.

 Hi Jay,


Please check the following article, pagination is explained atbthe bottom. 


Comments
Jayesh Gaikar commented Sep 12 '20, 1:05 p.m.
Hi Bartosz,

Thanks for your quick reply!
I observed oslc.pageSize and pageno in the response i got from original OSLC submit call. I tried utilizing rdf:resource URI from <oslc:nextPage > tag to  fetch nextpage data by using HTTP client. Which responded with 403 Forbidden status.

I m wondering is this right way to access second and subsequent pages from original query.

permanent link
aresha vora (2110) | answered Oct 18 '20, 4:04 a.m.
Yes, the <oslc:nextPage > url comes in response not working.  its not encoded correctly in response that seems to be reason. but solution for fetching next page is. we can build next page url by our own in code/script.

oslc.where=<some criteria>&oslc.pageSize=100&pageno=1
above will result first page with first 100 records. suppose there are total 200 records then second page can be found by changing the pageSize and pageno input in query like below
oslc.where=<some criteria>&oslc.pageSize=100&pageno=2

One can build query internally and consume until <oslc:nextPage > tag is empty.

Thanks.

Comments
Ian Barnard commented Oct 19 '20, 5:30 a.m. | edited Oct 19 '20, 5:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

What DNG version are you using? The nextPage URL works fine for 6.0.6.1.


The oslc:nextPage resource in the XML has ampersand expansion, have you removed that?.


Remove the ampersand encoding and that link works to get page 2.

You have to keep using the headers like OSLC-Core-Version: 2.0 and the vvc.configuration - i.e. the headers you used for the first request.

HTH
Ian

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.