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

multiple HTTP connection endpoints within 1 recipe

shruti-2-sharma
Deputy Chef I
Deputy Chef I

I am trying to create recipe to call more than 1 http connector.

But facing issue while using multiple HTTP connection endpoints within 1 recipe.

only one connection work at a time.

please suggest me how to do it.

Thanks in advance

1 ACCEPTED SOLUTION

max-knutsson
Workato employee
Workato employee

So all of these are totally different systems/APIs?

If answer is Yes, then I see 2 options

1. Use a callable function (go to next step => search callable recipe by workato) because if using callable function you will not hit the HTTP connector limit, basically you can have as many callables as you want.

a) Create a callable function for API 1 - use whatever authentication method required for this API, create parameters that you need to push to this callable recipe, call the API then return the result back to the MAIN recipe

b) repeat the same steps 4 more times until you have 5 callable functions, each calling their own api, accepting their own Parameters and return Result


2. Second option is to use HTTP to 5 different APIs but create a "generic" http connector which has "Authentication" NONE and authentication using HTTP headers manually for each call. This will be messy as its not very reusable. For reusability/Best practice I recommend option 1, use this option only as last resort, as pointed out by Joseph above.






View solution in original post

11 REPLIES 11

I need to invoke 5 api . so , need to create 5-http connection .Is there any way to do that

jblanchett
Deputy Chef III
Deputy Chef III

You can use the HTTP and HTTP Secondary connections to support 2 separate systems. Keep in mind that you can store the base URLs and auth credentials in the connection and hit different endpoints within each action by appending to the base URL.

If you truly need to hit 5 different base URLs, you might consider breaking your recipe into multiple recipes by leveraging callable recipes. Alternatively, you can use an empty HTTP connection as a shell and set the base URLs and authentication within each action. I am NOT recommending you hard-code auth creds in your actions, thatโ€™s bad practice, but you can fill those in via other ways depending on the auth mechanism, such global property variables or calls to synchronous callable recipes to get oauth tokens.

max-knutsson
Workato employee
Workato employee

So all of these are totally different systems/APIs?

If answer is Yes, then I see 2 options

1. Use a callable function (go to next step => search callable recipe by workato) because if using callable function you will not hit the HTTP connector limit, basically you can have as many callables as you want.

a) Create a callable function for API 1 - use whatever authentication method required for this API, create parameters that you need to push to this callable recipe, call the API then return the result back to the MAIN recipe

b) repeat the same steps 4 more times until you have 5 callable functions, each calling their own api, accepting their own Parameters and return Result


2. Second option is to use HTTP to 5 different APIs but create a "generic" http connector which has "Authentication" NONE and authentication using HTTP headers manually for each call. This will be messy as its not very reusable. For reusability/Best practice I recommend option 1, use this option only as last resort, as pointed out by Joseph above.






vinny-sosa
Deputy Chef I
Deputy Chef I
This is one of the reasons why some apps have a 2 designation. Like Marketo and Marketo 2. So you can use different connections for each. 

If there isnโ€™t a duplicate connector available you might consider using a custom auth and custom http setup. 

Another way to do this is to use a callable recipe so you can have different auth in each recipe even though they are using the same connector. 

--

mroldanvega
Executive Chef I
Executive Chef I

A third option could be to set a generic http connector with not authorization. This way you can configure all the different endpoints within the recipe with a single connector, BUT it depends on the type of authorization each endpoint users. This is not ideal, or a best practice, but just a workaround for the time being.