13
Views
2
Comments
Solved
How to use table pagination with existing third party API?

Hi,

I want to use pagination with table records while I am getting data from a open-source API, which doesn't have any parameter for current, total,  or next page.


Thanks,
Akif

mvp_badge
MVP
Rank: #18
Solution

Hi Akif,

First of all, the API doesn't have to have the exact parameters you see in the List_Navigation, as long as it has a way of specifying what "slice" of the results do you want (index for first and last records, for instance, or index for first record and page size). Usually API documentation would be clear about supporting or not pagination.

If the API really does not support pagination... You can still use the List_Navigation as before. Given that your API call always fetches all the records, you can simply skip the Data Refresh you would do if you were using an Aggregate or SQL.

There are two concerns here however:

  • your open-source API can be slow because it always returns all the data, and the only solution I can think of is for the API to allow for pagination directly.
  • your data may become stale if the source data is constantly changing... in this case you can always re-execute the API call and assign its output to the variable used as Source Record List of the Table Records.

Hope this helps!