Wrapping Web iterate over Repeat

Hi @Olysak

You assisted me about 6 months ago in getting an API connection up and using Repeat Function
oAuth2 connection - Cornerstone(CSOD).
It is working like a charm. Thank you

I am trying to add multiple path’s, not sure how to go about it.
I tried to add Web Iterate before the Repeat, but that did not work.

image

Any pointers are welcomed.
Thanks

Hi @Rykie , nice to hear that!

Generally, the Iterate web request should work.

Could you please show me how your project looks like now, e.g. the overview - what actions are there, modules, who calls whom etc.?

Thanks, @olysak.

1st Get the Token

image

  1. Then use it here

image

The rename table - I used as the fields from Import Web has headers that start with {*}

  1. The Submodule
    image

Now I want to replace step 2 in Do While not empty (one value):
Currently 1 value:
Path = “vw_rpt1”
With multiple values

R

I apologize, but based solely on the screenshots you provided, it's still unclear what you are trying to achieve.

In our previous discussion, you were creating a workflow to retrieve a paginated response from the API. Can you provide more information about what you mean when you say "I am trying to add multiple paths" in this context? Are you attempting to send multiple requests to the same API endpoint but with different parameters, such as "GET /api?q=vw_rpt_123" to retrieve all data, followed by "GET /api?q=vw_rpt_998" to retrieve all data from the second response, and then consolidate the rows from both responses into one table?

My apologies.

This is what I am trying to achieve.

I have multiple endpoints.
https://xxxx.csod.com/services/api/x/odata/xxx/vw_rpt_123
https://xxxx.csod.com/services/api/x/odata/xxx/vw_rpt_998

Up to now, I developed an EasyMorph for each endpoint.
I prefer not to build a separate endpoint for each one.
This is for initial data extraction.
I have about 128 endpoints to read, and extract data.

This is what I want to achieve:
image

I want to iterate through path vw_rpt_123 and get the results and save the file as dset.
Then I want the Easymorph to go to the next path vw_rpt_998 and retrieve the information and save it to a dset

Placing the EasyMorph file with 1 path on the server worked perfectly.
I will attempt to do all 128 endpoints in one EasyMorph but would like to combine some of the Endpoints to reduce the EasyMorphs I have to build.

Hope this makes more sense

Oh, now I think I understand.

Modifying the ‘Repeat’ action so that it could somehow consume multiple paths is tricky, as it would conflict with the logic of the Repeat action itself (in particular, that the output of each iteration is the input of the next iteration).

My advice would be to further encapsulate the above, so that if you had a table that retrieves the data by calling the Repeat action and passing a path and token to it, you will now move that table into a separate module, and call that module from a table containing multiple paths (just like in your screenshot) using the Iterate action in ‘Iterate and append results’ mode.

You can pass the path and token to this module as parameters:

image

You will also need to create the aforementioned ‘path’ and ‘token’ parameters in this new module, and to pass these parameters as a table to your already existing ‘Repeat’ action, you could use the ‘Parameter table’ action in this new module.

image

image

Thanks. I will try this out and let you know

@olysak

I hope you are well.

I am back at trying to extract multiple end points with one EasyMorph. I do not totally understand your last bit about using a parameter table.

This works on a single end point:

  1. Main
    image

  2. Module
    image

Now I am trying 2 endpoints

Main Module


The Excel bring in the 2 endpoints - 2 rows

Module

Module 2
image

I cannot get this to work

Error:
image

Any suggestions?

Thanks

Hi @Rykie ! I’ve sent you a presonal message

Many thanks @olysak

@olysak

Thank you for your patience.
I re-read your post and made changes and test, and made more changes.

It works 100%.

I appreciate that you and the rest of the EM team always support us.

Really happy now
:grinning:

1 Like

Nice to hear that, @Rykie !