You can translate the question and the replies:

API connection working but cannot paginate using a cursor key reference in the JSON response

I have a working API call that returns the first set of data without error (up to first 5000 records). However, when I try to set up pagination using a value in the end of the results it spins indefinitely. The token to use is called "cursor" at the bottom of the JSON return (here is an example) } ], "cursor": "bWl4Ojc5I0RYRjFaWEo1UVc1a1JtVjBZMmdCQUFBQUFBQmlWNG9XWjBKcWNrbG1OMWxVZVcxWGFVOTZka2Q1TldsSlVRPT0lMTY0NTY3MDU1Mzg1Mg==" } if this value is added to the end of a call like this --- it starts with the next record (after the last one from the previous call) https://mycompany.tool.nett/services/pathfinder/v1/factSheets?page=2&pageSize=500&cursor=<cursor value here> I tried setting up the pagination using token continuation parameter in URL for next token = cursor path to next token in response = cursor This does not seem to work as it just spins indefinitely. Any help would be appreciated
23-02-2022 21:41:06 -0500

1 Answer

Hi, I understand that you have used the token continuation method and implemented the cursor-pagination in the JSON data source configuration to get paginated results. In order to implement the cursor-pagination to work fine, make sure that you have specified the correct values for the “Parameter in URL for “next” token” and “Path to “next” token in response” parameters based on the JSON response which will be retrieved from the API call. Refer to the [Obtain a Token from the Response]( section of the Virtual DataPort Administration Guide for more information about these parameters. You could also use a client tool like Postman to check whether the pagination works fine with this configuration or not and also it will help you to debug the issue. If you were able to retrieve the correct results from Postman then make sure you use the same configuration in Denodo as well. Additionally, to better assist with your use case and if you are a user with valid support access, create a support case in [Denodo Support Site ]( that our support team will assist you further. Hope this helps!
Denodo Team
25-02-2022 00:53:13 -0500
You must sign in to add an answer. If you do not have an account, you can register here