Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
dbernal_007
Partner - Contributor II
Partner - Contributor II

Can't get data from an API, pagination problem

Hi everyone, I tried with page, and Token pagination types and it doesn't works. Get the first 100 records and is not possible to get 1600 rows, the total quantity of rows.

This is an example of the raw rows that I get in postman:

{
"limit": 100,
"page": 1,
"prevPageToken": "CN653AEaCSnDt9zXmgEAABoOWgxpLQVNWO19uYEB8jMiDloMaS0FTVjtfbmBAfIz",
"nextPageToken": "CPab5gEaCSluwYbZmgEAABoOWgxpLXJejfJHRHYorGciDloMaS1yXo3yR0R2KKxn",
"totalDocs": 6124,
"totalPages": 62,
"hasNextPage": true,
"hasPrevPage": false,
"nextPage": 2,
"prevPage": null,
"pagingCounter": 1
}

But you know that Qlik starts from docs table, not from the raw. 

What is the exact parameter configuration that I should put into the REST connector?

Thanks for your replies.

 

Labels (3)
11 Replies
marksouzacosta

Thanks @dbernal_007,

This is how you can do pagination for this case:

marksouzacosta_0-1766463588695.png

 

One quick note:
Your API uses next page token, however, your next page token contains URL-encoded values (example: CNcLGgkpwlknFJsBAAAaDloMaTx0f8FZbtPDkIF0Ig5aDGk8dH%2FBWW7Tw5CBdA%3D%3D) and Qlik REST Data Connector throws an error when that happens - it does not know how to deal with those URL-encoded values. You could implement a loop in your Load Script to deal with that but I believe setting the pagination like I did in the Data Connection is a better approach.

 

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com