Alteryx Designer Desktop Discussions

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

API and NextPage/nextCursor

keith-barber
7 - Meteor
Hello Community! 
 
I am a new user working with API and need some guidance on how to account for an API call with multiple pages. I've been able to get the download tool to return a query, but I'm having trouble with the limitation of the number of users per page (1000 per page).  SAP Concur Developer Center | Introduction
 
I've come across some posts that suggest using an iterative batch macro, Batch Macro Control input from within Macro itself - Alteryx Community. After downloading the example workflows, I'm unsure if this is the right approach for me. Can anyone provide some guidance on how I can create an interactive macro to obtain all the data?
 
End of Json Example 1:

End of Json Example 2:

  • JSON_Name=continuationToken
  • JSON_ValueString=eyJjcmVhdGVkLWlkIjo.....(full value not shown)
  • JSON_Name=nextCursor
  • JSON_ValueString=eyJjcmVhdGVkLWlkIjo.....(full value not shown)
  •  
3 REPLIES 3
Felipe_Ribeir0
16 - Nebula

Hi @keith-barber 

 

It's hard to help specifically because there's a lot of trial and error to get the configuration of an api right, and unfortunately I don't know the details of the sap concur api.

 

But looking at the example json in your post, it seems to me that you are already able to make the first call and get results using an alteryx workflow, right? From the second call onwards you have to use the continuationToken of the current page to call the next page. The only way I know of dealing with this is indeed to use iterative macros. You need to configure the iterative macro to parse the continuationToken of the current iteration, manipulate it properly and then use it as an input for the next iteration. almost exactly the case of the post you referenced.

 

What specific error/difficulty are you experiencing when trying to adapt the workflows in the post you referenced?

 

keith-barber
7 - Meteor
 
I am having difficulty understanding how to trigger an interactive macro once I see NextPage/continuationToken, as shown in the screenshot.
 
I downloaded the SurveyGizmo example but did not understand how the next page part works within the MC_SURVEYGIZMO macro.  Do you have some suggestions on how I could start?
Felipe_Ribeir0
16 - Nebula

if you make a filter [JSON_Name] = "NextPage" on your macro, the field JSON_ValueString will contain the next URL to feedback the macro. Similar to this one that i have on the cvent case:

 

nextpage.png

 

 

*To get a better overall understanding about iterative macros, i suggest that you take a look at this: Creating an Iterative Macro - Alteryx Community

 

 

Labels