You can translate the question and the replies:

Denodo and Rest API

Hi, my intention is to return PureCloud data for reporting. I am looking at using Denodo as a way to connect to PureCloud's Analytics API (REST) and expose the data via a Denodo view for end consumers to use in their respective applications (BI application, SQL clients, etc.). Using data source JSON > Data route: HTTP client > I have made a post call to where the post body includes: \{ "interval": "2020-03-24T00:00:00.000Z/2020-03-26T00:00:00.000Z", "startOfDayIntervalMatching": true, "paging": \{ "pageSize": 100, "pageNumber": 10 \} \} I noticed the default pagesize is 25, so I increased it to 100 (I think this is the max pageSize). This seems to work and returns 100 records. However, I'm trying to figure out how to iterate through all the records / return all records in the Denodo view. For reference on Paging: I would appreciate any feedback. Thank you.
09-07-2020 10:24:16 -0400

1 Answer

Hi, When obtaining paginated data from a server using Denodo, I try my best to get the data that I want from a GET request. If the request is a GET type, then I can use the multiple pagination options included in the Denodo Platform in order to automatically retreive all the data. For more information about the pagination options available in Denodo, you can reference the [Pagination]( section of the Virtual DataPort Administration Guide. If you are unable to get the data that you want from a GET request, I was able to find a way to automate sending multiple post requests to get each page of results by adding a interpolation variable in the post body of the request. If you add an interpolation variable like this: ``` \{ ... “paging”: \{ “pageSize”: 100, “pageNumber”: @pg_number \} \} ``` You can assign a value to the pg\_number variable in order to select the pageNumber with which the query should be run. In order to automate the process of selecting each page, you can create another view with page numbers and join this view with your post view; this will make Denodo automatically run a POST request for each page number in the page number view and return the results of all the requests. More information about HTTP Path interpolation variables can be found in the [HTTP Path]( page of the Virtual DataPort Administration Guide. I hope this helps!
Denodo Team
14-07-2020 15:41:45 -0400
You must sign in to add an answer. If you do not have an account, you can register here