You can translate the question and the replies:

JSON datasource pagination: path to “next” URL in response — in array

What is the syntax of the *Path to “next” URL in response* field in JSON data source pagination settings? I am trying to adress a second object in array, e.g. consider a modified example from [the manual](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/creating_data_sources_and_base_views/path_types_in_virtual_dataport/http_path#obtain-the-next-page-url-from-the-body-of-the-response): ``` { "name": "p_echo", "elements": [{ "customer_id": "1" }, { "customer_id": "2" }, { "customer_id": "3" } ], "links": [ { "rel": "this", "title": "This page", "href": "http://path-to-this-page" }, { "rel": "next", "title": "Next interval", "href": "http://rest-api.acme.com/my_service?$start_index=10&$count=10" } ] } ``` How would you set the *Path to “next” URL in response* in this case? (/links/*[2]/href doesn’t work)
user
15-06-2020 08:31:23 -0400

1 Answer

Hi, In my experience with pagination in Denodo, I've found that the path to the next page URL in the response must be a simple path: for example "/links/href". This means that the next URL must be formatted as the single "href" value in the "links" key. If I'm unable to modify the JSON source to have this format, a different method that I use frequently to retreive all the data from paginated JSON sources is the [Pagination with Indices](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/creating_data_sources_and_base_views/path_types_in_virtual_dataport/http_path#pagination-with-indices) option; this pagination method uses URL filters to iterate through all of the data. For example, using this method, Denodo would automatically navigate to each of the following URLs and retreive all the results from each page: ``` http://rest-api.acme.com/my_service http://rest-api.acme.com/my_service?$start_index=10&$count=10 http://rest-api.acme.com/my_service?$start_index=20&$count=10 ... ``` This process can be customized to use your desired step sizes and to use the URL filters provided by your JSON source. For more information about other pagination options offered by Denodo, you can reference the [Pagination](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/creating_data_sources_and_base_views/path_types_in_virtual_dataport/http_path#pagination) section of the Virtual DataPort Administration Guide. I hope this helps!
Denodo Team
17-06-2020 20:49:41 -0400
You must sign in to add an answer. If you do not have an account, you can register here