You can translate the question and the replies:

issue with pagination in REST API call

I've configured a datasource with an http path of https://company.service.com/api/v1/entities?firm=2. The API uses next page pagination and so I've set those paramters up as well. when I run a query in my base view and look at the execution path, I see the first call is successful (url used is https://company.service.com/api/v1/entities?firm=2&page%5Blimit%5D=500, and if I look at the value of the next link, it is /v1/entities?page[limit]=500&page[after]=3178402. In thesecond call (that is using the next url) there is an error message. this is the url for that call. https://company.service.com/v1/entities?page%5Blimit%5D=500&page%5Bafter%5D=3178402. when the next url is being appended to the configuration url, it is omitting the /api that needs to go in front of /v1. so, how do I get '/api' included in what the next url is appended to? Thanks for your help
user
24-09-2019 17:38:11 -0400

1 Answer

Hi, The Next Page URL in Virtual DataPort points to the response of that first request using the path specified in the Next Page URL section. Then, in the Subsequest Request it will fetch the details depending on the Base URL. This will continue until **Maximum number of requests** is reached or there are no more continuation tokens. In cases where I get errors from the Next Page URL of the Paginated Web Service, I would check if the Website's default subsequent URL misses the /api part of the main URL https://company.service.com/api/v1/entities?firm=2. You could refer to 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 Virtual DataPort Administration Guide for more information. Hope this helps!
Denodo Team
27-09-2019 09:16:58 -0400
You must sign in to add an answer. If you do not have an account, you can register here