# Wrapping Web iterate over Repeat

**URL:** <https://community.easymorph.com/t/wrapping-web-iterate-over-repeat/4413>\
**Category:** General Q&A\
**Created:** [April 10, 2023, 9:56am UTC](https://community.easymorph.com/t/wrapping-web-iterate-over-repeat/4413 "2023-04-10T09:56:40Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rykie](https://community.easymorph.com/user_avatar/community.easymorph.com/rykie/32/1255_2.png) [@Rykie](https://community.easymorph.com/u/Rykie)\
**Post date:** [April 10, 2023, 9:56am UTC](https://community.easymorph.com/t/wrapping-web-iterate-over-repeat/4413/1 "2023-04-10T09:56:40Z")

</div>

Hi @Olysak

You assisted me about 6 months ago in getting an API connection up and using Repeat Function  
[oAuth2 connection - Cornerstone(CSOD)](https://community.easymorph.com/t/oauth2-connection-cornerstone-csod/3976).  
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](https://community.easymorph.com/uploads/default/original/2X/c/c90f8ccbc2c2c694568bf6b2f622f996499332b3.png)

Any pointers are welcomed.  
Thanks

---

<div class="post-metadata">

**Author:** ![olysak](https://community.easymorph.com/letter_avatar_proxy/v4/letter/o/aeb1de/32.png) [@olysak](https://community.easymorph.com/u/olysak)\
**Post date:** [April 10, 2023, 11:15am UTC](https://community.easymorph.com/t/wrapping-web-iterate-over-repeat/4413/2 "2023-04-10T11:15:23Z")

</div>

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.?

---

<div class="post-metadata">

**Author:** ![Rykie](https://community.easymorph.com/user_avatar/community.easymorph.com/rykie/32/1255_2.png) [@Rykie](https://community.easymorph.com/u/Rykie)\
**Post date:** [April 10, 2023, 11:38am UTC](https://community.easymorph.com/t/wrapping-web-iterate-over-repeat/4413/3 "2023-04-10T11:38:50Z")

</div>

Thanks, @olysak.

1st Get the Token

![image](https://community.easymorph.com/uploads/default/original/2X/f/f71d928cb3ac0cddd0a17a902bb343d031f236c1.png)

1. Then use it here

 ![image](https://community.easymorph.com/uploads/default/original/2X/7/723178592779f51b3f420b77394e5505184dac71.png)

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

1. The Submodule  
 ![image](https://community.easymorph.com/uploads/default/original/2X/6/6a5ace71327db626ed823ef24642074f708a8a9f.png)

Now I want to replace step 2 in Do While not empty (one value):  
Currently 1 value:  
Path = "vw\_rpt1"  
With multiple values

R

---

<div class="post-metadata">

**Author:** ![olysak](https://community.easymorph.com/letter_avatar_proxy/v4/letter/o/aeb1de/32.png) [@olysak](https://community.easymorph.com/u/olysak)\
**Post date:** [April 10, 2023, 12:05pm UTC](https://community.easymorph.com/t/wrapping-web-iterate-over-repeat/4413/4 "2023-04-10T12:05:07Z")

</div>

> [@Rykie](#):
>
> I am trying to add multiple path’s, not sure how to go about it.

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?

---

<div class="post-metadata">

**Author:** ![Rykie](https://community.easymorph.com/user_avatar/community.easymorph.com/rykie/32/1255_2.png) [@Rykie](https://community.easymorph.com/u/Rykie)\
**Post date:** [April 10, 2023, 12:25pm UTC](https://community.easymorph.com/t/wrapping-web-iterate-over-repeat/4413/5 "2023-04-10T12:25:54Z")

</div>

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_123)  
[https://xxxx.csod.com/services/api/x/odata/xxx/vw\_rpt\_998](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](https://community.easymorph.com/uploads/default/original/2X/4/4355bc7234bf9d0314b48b910db735291d10d469.png)

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

---

<div class="post-metadata">

**Author:** ![olysak](https://community.easymorph.com/letter_avatar_proxy/v4/letter/o/aeb1de/32.png) [@olysak](https://community.easymorph.com/u/olysak)\
**Post date:** [April 11, 2023, 8:08am UTC](https://community.easymorph.com/t/wrapping-web-iterate-over-repeat/4413/6 "2023-04-11T08:08:59Z")

</div>

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](https://community.easymorph.com/uploads/default/original/2X/4/42cb72f51278cebfe4e1753b91e27b0cf9600a7c.png)

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](https://community.easymorph.com/uploads/default/original/2X/4/44fb3b8623f295b52a4332915e3637f295012ca6.png)

 ![image](https://community.easymorph.com/uploads/default/original/2X/7/715786b437e5dc9eea4422dfa3ac5ca877509014.png)

---

<div class="post-metadata">

**Author:** ![Rykie](https://community.easymorph.com/user_avatar/community.easymorph.com/rykie/32/1255_2.png) [@Rykie](https://community.easymorph.com/u/Rykie)\
**Post date:** [April 11, 2023, 11:16pm UTC](https://community.easymorph.com/t/wrapping-web-iterate-over-repeat/4413/7 "2023-04-11T23:16:31Z")

</div>

Thanks. I will try this out and let you know

---

<div class="post-metadata">

**Author:** ![Rykie](https://community.easymorph.com/user_avatar/community.easymorph.com/rykie/32/1255_2.png) [@Rykie](https://community.easymorph.com/u/Rykie)\
**Post date:** [August 23, 2023, 5:59am UTC](https://community.easymorph.com/t/wrapping-web-iterate-over-repeat/4413/8 "2023-08-23T05:59:14Z")

</div>

@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  

2. Module  

Now I am trying 2 endpoints

Main Module

 ![image](https://community.easymorph.com/uploads/default/original/2X/c/c5edc0201bfb03b9fc21e8ae26783e17862eb021.png)  
The Excel bring in the 2 endpoints - 2 rows

Module

 ![image](https://community.easymorph.com/uploads/default/original/2X/9/91c454ba3a2e6402c998a503b4a8785c9e4c6199.png)

Module 2

 ![image](https://community.easymorph.com/uploads/default/original/2X/1/12e4be045a301bf90b2ba6f34ee3b39656768da2.png)

I cannot get this to work

Error:  
 ![image](https://community.easymorph.com/uploads/default/original/2X/6/69820a7963534f82684ba569a4c6ccff536d89fb.png)

Any suggestions?

Thanks

---

<div class="post-metadata">

**Author:** ![olysak](https://community.easymorph.com/letter_avatar_proxy/v4/letter/o/aeb1de/32.png) [@olysak](https://community.easymorph.com/u/olysak)\
**Post date:** [August 23, 2023, 10:40am UTC](https://community.easymorph.com/t/wrapping-web-iterate-over-repeat/4413/9 "2023-08-23T10:40:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Rykie](https://community.easymorph.com/user_avatar/community.easymorph.com/rykie/32/1255_2.png) [@Rykie](https://community.easymorph.com/u/Rykie)\
**Post date:** [August 24, 2023, 12:59am UTC](https://community.easymorph.com/t/wrapping-web-iterate-over-repeat/4413/10 "2023-08-24T00:59:01Z")

</div>

Many thanks @olysak

---

<div class="post-metadata">

**Author:** ![Rykie](https://community.easymorph.com/user_avatar/community.easymorph.com/rykie/32/1255_2.png) [@Rykie](https://community.easymorph.com/u/Rykie)\
**Post date:** [August 24, 2023, 2:13am UTC](https://community.easymorph.com/t/wrapping-web-iterate-over-repeat/4413/11 "2023-08-24T02:13:03Z")

</div>

@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  
😀

---

<div class="post-metadata">

**Author:** ![olysak](https://community.easymorph.com/letter_avatar_proxy/v4/letter/o/aeb1de/32.png) [@olysak](https://community.easymorph.com/u/olysak)\
**Post date:** [August 24, 2023, 1:00pm UTC](https://community.easymorph.com/t/wrapping-web-iterate-over-repeat/4413/12 "2023-08-24T13:00:28Z")

</div>

Nice to hear that, @Rykie !
