Now that it's live, don't forget to accept your certification badge on Credly today! Learn more here.
We are currently experiencing an issue with Email verification at this time and working towards a solution. Should you encounter this issue, please click on the "Send Verification Button" a second time and the request should go through. If the issue still persists for you, please email support@alteryx.com for assistance.

Alteryx Designer Discussions

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

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
16 - Nebula

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.

danilang
18 - Pollux
18 - Pollux

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