Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pagination Restful Api

Hi everyone

i have an question about the pagination in the restful connector!

I can't pagination and i dont know why

source:

Paginated Responses - Eventbrite Developer Center

data structure

"object_count",
"page_number",
"page_size",
"page_count",
"__FK_pagination"
FROM "pagination"

there is also link to next url but that still not work  and i dont know why

should i take offset? or next url?

Maybe someone can help me

Thanks 

4 Replies
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)");

mstoler
Partner - Specialist
Partner - Specialist

Hello,

I have used the custom pagination with a Rest API.

What I did was create a loop and loop through the records.  I keep track of when I am on the last call because the fields returned on the last call are different.

Michael

negovista
Contributor III
Contributor III

This was very useful.. thx

Anonymous
Not applicable
Author

Velthuisf hi

I´m trying to create a Rest Api Connection to qlik sense business but I have not been able to insert a variable into the url so I can set up a loop and get all the data.

The original url is: https://api.repsly.com/v3/export/clients/{lastTimestamp}

To get the first set of data you have to change the previos url into https://api.repsly.com/v3/export/clients/0

I´m trying to change the 0 for a variable so I can change the variable for different values, make different request and get all the data.

The problem comes when I´m creating the connection, I add https://api.repsly.com/v3/export/clients/$(Variable) the connection do not works.

and when i tried to use this part of the code from your example

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

Any ideas?