You can translate the question and the replies:

Can I use Denodo to paginate through a REST API where the link to the next page is returned in the header?

I'm trying to use Denodo to pull data from the OKTA API. The data is coming back paginated. OKTA puts a link to the next page in the response headers: https://developer.okta.com/docs/reference/api-overview/#link-header Link header RFC: https://tools.ietf.org/html/rfc5988#section-5 I would prefer to use Denodo to access the data out of OKTA, but the Denodo pagination settings for calling REST APIs doesn't seem to let me access the link headers, does it? If so, how can I access the link header to be able to have Denodo automatically call the next page to get results? Thank you~!
User
17-09-2019 16:36:05 -0400

1 Answer

Hi, In Virtual DataPort, you can automatically get the result of the next page by using the **Next page URL** located under the Pagination tab. In order to set Next page URL, I would do the following steps: * In Virtual DataPort, create the data source by navigating to **New > Data source. * In Data route, select the path type and click on the **Configure**. * Click on the **Pagination** tab and enable "the service return the data paginated". * Select the **Next page URL** and provide the tuple of the next page in the ** Path to “next” token in response**. 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 Subsequent Request it will fetch the details depending on the Base URL. This will continue until a Maximum number of requests is reached or there are no more continuation tokens. By going through the OKTA documentation I have seen that [Link relation types](https://developer.okta.com/docs/reference/api-overview/#links) can also be used to indicate that the target resource has particular attributes and it contains the link relation , target URL,etc as array under the links. So you can use the Link relation types instead of Link Header. For more information, 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 the Virtual DataPort Administration Guide. Hope this helps!
Denodo Team
10-10-2019 08:27:43 -0400
You must sign in to add an answer. If you do not have an account, you can register here