Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
SilviyaK
Contributor III
Contributor III

REST Connection, next token

Hi all,

Has anyone used the pagination option in the Qlik Sense REST connection? I am trying to use the Next Token pagination type in order to be able to get all the rows I need from the data instead of the 100 rows I get without using pagination. 

The problem I have is that I am not completely sure how this works, what I need to put in the fields in the rest connection and also if I need to add something in my script. 

Any sample of a Qlik Sense script/screenshots of the connection or anything related to this might be useful. 

Thanks! 

Labels (1)
1 Solution

Accepted Solutions
Meghann_MacDonald

Hi all, not sure if you still need this but I am working with CVENT in the same way.

Next token path should be

root/paging/nextToken

the paging tokens are not stored in root like other apis, they are stored in root/paging. and the path requires the field title too. and uncheck both.

Meghann_MacDonald_0-1712845114969.png

 

View solution in original post

6 Replies
Vishal_Gupta
Partner - Creator
Partner - Creator

@SilviyaK i would recommend running the API URL on postman and look at the output, you should be getting a token key: value pair at the very last.

If a post helps to resolve your issue, please accept it as a SOLUTION and leave a LIKE!
SilviyaK
Contributor III
Contributor III
Author

Hi Vishal,

I have a "currentToken" and "nextToken" fields in the root folder inside the connection from Qlik to Cvent. I think I should somehow use these two fields to load every time the next data, but I am not sure how to implement it. 

I tried some options I found in the community (mainly WITH CONNECTION), but they don't seem to work, as I am still loading only the first 100 rows. 

I am attaching a screenshot of how the pagination settings look now in the REST connection. 

Vishal_Gupta
Partner - Creator
Partner - Creator

Can you try unchecking 'pass in header option'

If a post helps to resolve your issue, please accept it as a SOLUTION and leave a LIKE!
SilviyaK
Contributor III
Contributor III
Author

Hi Vishal,

If I uncheck it, it seems to be doing something, but I notice that it still doesn't load more than 100 lines, which to me looks as if it does not get the next token. 

Do you know if maybe I should put something in my script related to the next token, instead of only adding the path in the REST connection itself?

SilviyaK
Contributor III
Contributor III
Author

Sorry, I made a mistake in my previous comment. Some more details on this: I can see that there are 599 records. I experimented with the options and these are the results:

1. both not ticked - I think it gets stuck, it starts loading crazy amount of lines that don't make sense and it can continue for up to an hour until my authorization token expires and it crashes.
2. pass via header ticked - same as the first one
3. look in header ticked - same as the first one 
4. both ticked - loads only 100 records

Meghann_MacDonald

Hi all, not sure if you still need this but I am working with CVENT in the same way.

Next token path should be

root/paging/nextToken

the paging tokens are not stored in root like other apis, they are stored in root/paging. and the path requires the field title too. and uncheck both.

Meghann_MacDonald_0-1712845114969.png