cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Call an API to multiple tables in a Single Job

lalatendujena
Deputy Chef II
Deputy Chef II

I want to call multiple GET APIs from my recipe. In Step 6, I am currently calling one GET API, but I need to retrieve data from multiple data stores using the same step/API. Essentially, I want to pass the name of the data store (API endpoint) at runtime.

Let's say I have the API like this -> xyz.com/api/data/DatastoreTable1

So in runtime it can be DatastoreTable1, DatastoreTable2, DatastoreTable3...

I created a variable for this purpose, but it did not work.

Appreciate any assistance.

 

Screenshot 2026-02-16 at 9.50.40โ€ฏAM.png

2 ACCEPTED SOLUTIONS

Hello @lalatendujena ,

In order to access the variable as a list in the for loop, it should be created in the way shown in the below images.

However, my suggestion would be to use a lookup or datatable, as that will be easier and more maintainable. If we go with a variable approach, then all the Request URLs need to be added to a list and accessed inside the loop, which can be a bit of a hassle.

  • If you already have the list, it will be easy to pass it at runtime.

  • If the list is not already available, creating and maintaining it using variables can be a hassle.

  • A separate list/loop again is required to add and store all those Request URLs.

  • If any endpoint needs to be updated in the future, it has to be changed at the recipe level.

  • Updating endpoints directly in the recipe is not a good practice and can be difficult to maintain.

according to me keeping all the endpoints in another location (like a lookup or datatable) and retrieving them when needed would be a better and more manageable approach.

Screenshot 2026-02-17 084927.pngScreenshot 2026-02-17 084910.png

View solution in original post

francbaviello
Deputy Chef III
Deputy Chef III

Hi @lalatendujena , you can create a list with a specific schema and a fixed list of items "DataTable1, DataTable2...". You can see the correct solution:
VarList.png

โ€ƒ

View solution in original post

8 REPLIES 8

I am able to solve this issue now, thank you again @Bhagya_pola  for your inputs.

Glad itโ€™s resolved. Happy to help ๐Ÿ™‚

francbaviello
Deputy Chef III
Deputy Chef III

Hi @lalatendujena , you can create a list with a specific schema and a fixed list of items "DataTable1, DataTable2...". You can see the correct solution:
VarList.png

โ€ƒ

I am able to solve this now, thank you for your assistance @francbaviello