We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

API and Paging Problem

Jeff13
7 - Meteor

I have an API call that by default limits the number of pages/records for each API call. The API call creates a Paging.Next record with a unique API GET address. This address changes each time the GET is called. I am trying to figure out how to retrieve records 5001 and greater. The first screenshot below will retrieve records 1-5000. The paging next address has an address to retrieve records 5001 and above.  Any help is appreciated. Thanks in advance. API newbie with Alteryx so I maybe need a little bit of extra TLC with the steps or suggestions.

 

Below are the instructions from the company of the API.

 

Execute the Report API call. Get first page and new URL + cursor combination for the next page.
Execute API call using the URL + cursor in step 1 to return the next page. Obtain page 2, and new URL + cursor for page 3.
Make API call using URL + cursor in step 2 to return page 3. Obtain page 3 data, and new URL + cursor for next page.
Repeat steps until the end of the report.

 

Jeff13_1-1755198731676.png

 

 

Jeff13_0-1755198583452.png

 

2 REPLIES 2
KGT
13 - Pulsar

The way to do this is through an iterative macro. If you are not sure about macros, iterative macro is the last to get your head around, but it's basically a while loop. It will continue executing while there is still records going to the Iterative output (configured in Interface designer).

 

You want the output on the Iterative macro output to match the Input to the workflow, as that's where it's going to loop to. This is the hardest part of the config, getting the input right, that the iterative output will match it.

 

I recommend, designing it for the first iteration, and then trying to turn that into repeatable (think being able to copy paste it for the next one), then make that part the macro. It varies slightly per API and so it's rare that a downloaded macro will "just work", but you may find one that's very close.

 

Examples:

https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Iterative-Macro-with-API-pagin...

https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Iterative-macro-for-API-pagina...

 

apathetichell
20 - Arcturus

@Jeff13 -- share your api specs --- this is probably public. It is exceedingly unlikely that your API documentation is private. I don't need your host/your credentials --- just the api specs.

Labels
Top Solution Authors