Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
laurenwagner
Contributor
Contributor

Setting up a "Next Page" Pagination Type through the REST Connector

I am trying to set up pagination for an API from Reviews.io. 

The information I have from them is this:

  • The maximum per page size is 250 (per_page)
  • there is a property at the top level of the json object for Total Pages (total_pages)
  • There is also a page identifier (page)

pagination.PNG

Here is a sample of the URL I am using:

https://api.reviews.co.uk/merchant/reviews?store=-StoreName&min_date=2019-01-01&max_date=2019-08-05&...

After selecting the data, this is how it is formatted

data format.PNG

The reviews section holds the actual data, and from what I've seen about Page type pagination I need to find out where the total_pages is being held. I've looked into the stats section, but these are the only fields available:

Stat columns:

stat columns.PNG

I'm assuming that I need to change the format of my URL. Can anyone help me figure this out?

Labels (2)
2 Replies
treysmithdev
Partner Ambassador
Partner Ambassador

The total_pages field should exist in the 'root' level. If it doesn't exist you can Data Indicator Path instead and point it at a field you know should not be empty, like review_id or similar.

Blog: WhereClause   Twitter: @treysmithdev
laurenwagner
Contributor
Contributor
Author

That seemed to work. I found all of the variables exist at the root level, so I referenced them in the pagination section. It looks like the script will begin to load, but it never executes. I've let it run multiple times for over an hour (the example I pasted was only running for ~10 minutes), but nothing ever happens. Any thoughts?