Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to define pagination in the Qlik rest connector

I defined a rest connector to a rest api.

I only give me the first page of the data.  The pagination URL is defined in the header

The 'link' header in the response will hold the next page url if exists. If you have reached the last page of objects, then the link header will not be set.

Headers:
"link":< https://domain.freshdesk.com/api/v2/tickets?filter=all_tickets&page=2>;rel="next"

I my connector I selected

pagination Type ; Next url

next Url field path: "link"

Is field header : Checked

When I run load data only the first 100 record are loaded. and the next page is not executed.

Can someone help?

1 Reply
Anonymous
Not applicable
Author

You can use the custom option and use a loop to walk through the next pages:

Let total = Round(FieldValue('X-Total-Count',1)/100);

Let startAt = 1;

for startAt = 1 to total step

WITH CONNECTION(Url "https://doaj.org/api/v1/search/journals/page=$(startAt)");