Hello all,
I'm working with the Schoox API (Schoox API Docs) to pull data from our LMS, and I'm running into a challenge with pagination. Here’s what I’m trying to do:
Get Learning Paths: First, I make an API call to retrieve a list of all Learning Paths, which gives me their IDs. Here’s the API for that:
https://api.schoox.com/v1/dashboard/curriculums?role=employee&apikey=9d3419535b0c8d76f7f6f72800f62f9...
(API Docs: Learning Paths)
Get Enrolled Users for Each Learning Path: For each Learning Path ID, I need to make a second API call to fetch all users enrolled in that Learning Path. Here’s the API for that:
https://api.schoox.com/v1/dashboard/curriculums/{id}?role=employee&apikey=9d3419535b0c8d76f7f6f72800...
(API Docs: Enrolled Users)
The Challenge:
Issue with Iterative Macro:
I’m new to macros in Alteryx, so I’m unsure how to correctly structure this. Could someone guide me on how to set up the iterative macro to loop through the start parameter until all users are retrieved for each Learning Path? Do I need to use a Batch macro instead - if yes how will the logic work?
Any help would be appreciated!
Thanks!
Solved! Go to Solution.
hi!
try this link!
https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Iterative-Macro-to-loop-API-ca...
hope this helps you a bit!
enjoy building WFs!
You may need a batch macro that calls an iterative macro.
Batch by Learning Path ID, then each batch will iterate to get all of the students/users.
Guessing that the students from the Learning Paths API is the same as the "number of users", to tell you how many times you'll need to iterate (students/1000) = number of iterations?
Macros are just about the most difficult thing to learn in Alteryx. The user interface doesn't make it easy to understand, test, or debug macros.
A few suggestions to learn: search for Batch and Iterative here:
Also try: workflow configuration option (checkbox) for "Show All Macro Messages"
See: Debugging Alteryx Analytic Apps
https://www.altertricks.com/how-to/debugging-alteryx-analytic-apps/
These two options are helpful to debug macros:
1) Designer > View > Interface Designer > Test View (the magic wand icon on the left hand side) > input your values > Open Debug.
This will create a new standard workflow with the actual values coming from your inputs.
A copy of the workflow will open called Debug Workflow# (# being some number)
You can use the Debug mode to test what values are passed from the app interface to the workflow
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Random-results-while-renaming-fields/t...
2) Community > Blogs > Engine Works Blog > The X-Ray Browse: Macro Debugging Made Easier
Designed primarily for developing & debugging macros, the X-Ray Browse enables you to pick a location within a macro under development, to view the data passing through said macro at said location. The effect is similar to a Browse tool, but the data is made viewable through the encapsulating "skin" of the macro being developed.
Chris
Thank you everyone for responding! I was able to get this done using Python tool!