Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Update Endpoint with Pagination

Dennisklad1
8 - Asteroid

Hi,

 

my API Call with the Download tool returns 300 rows and I have to use pagination.

I am new to macros and need help in developing a workflow that updates the endpoint. For our api it goes like this:

"https://endpoint.com?$top=300&$skip=300", where I want to update the last value to go from 0 to 300 to 600 to 900 and so forth. This would give me all the data but I dont know how I could update the value with an interative macro if one is needed.


Thanks in advance.

3 REPLIES 3
mceleavey
17 - Castor
17 - Castor

Hi @Dennisklad1 ,

 

I've used the Generate Rows tool for this, which allows the number to increment in values of 300:

 

mceleavey_1-1620212032741.png

 

 

mceleavey_0-1620212022068.png

 

Workflow attached.

 

Hope this helps.

 

M.



Bulien

danilang
19 - Altair
19 - Altair

hi @Dennisklad1 

 

There is a very good example of using an iterative macro to call a paging API here.  It will have to be updated since the pagination details are different, but you should be able to use this as a start.

 

Dan

Dennisklad1
8 - Asteroid

Hi, thanks for the reply.

I have a similar problem where I want to paginate my request per 300 request. I though the best way to go through all my results is to break the loop when the returned records are less than 300, meaning its the last page.

 

Dennisklad1_0-1620640207665.png

 

 

This is my macro, but I am not sure if its working correctly. I want per iteration the field parameter to increase by 300 and then as update the input url.

Labels