DNG REST API pagination
One answer
Pagination is different for the Reportable REST API and the OSLC API. Both are documented in their respective API documents, for instance in:
you will see the discussion about paging, for instance, when retrieving artefacts:
"Results will be paginated with a page size of 100. The next page will be located in the
href
element which specifies the URI for next page. If the href element is not included in the response that means there are no more pages. To execute next page URI, client should replace & with & in next page URI to decode the xml encoding."
History is a bit different:
"Results will be paginated with a page size of 25. The next page will be located in the
<history:nextPage>
element which specifies the URI for next page. If
<history:nextPage>
is not included in the response that means there are no more pages."
The OSLC API is different again and you need to use the oslc.pageSize parameter to set the page size. Note that the server can choose to ignore this and return it's own number of results, for example:
https://<server>/rm/views&oslc.pageSize=100
If there are more records to retrieve then the response (specifically in the <oslc:ResponseInfo> section), you'll find an element called <oslc:nextPage> which contains an rdf:resource attribute that is the call to the next page of the data set. This URL has all ampersands encoded so you need to replace all & with an actual & before you make the call.
Comments
i don't see any history tags in the XML response, but in the ds:dataSource section i do see these:
appId="RRC"
rel="next"
so how do i form the URL to get the next page?
See a detailed example for the EWM Reportable REST API and the gotchas: https://rsjazz.wordpress.com/2022/03/02/ewm-reportable-rest-api/
Should be similar for the other reportable REST APIs.
The HREF is an URL Encoded URL for the next page.
Comments
Suad Kajtazovic
Sep 05, 11:04 a.m.Please explain in more details. which API, how does your API call look like, etc.
M K
Sep 06, 3:08 a.m.using: