02-25-2022 11:30 AM
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
Solved! Go to Solution.
02-25-2022 12:14 PM
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.
02-25-2022 11:52 AM
I need to invoke 5 api . so , need to create 5-http connection .Is there any way to do that
02-25-2022 12:11 PM
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.
02-25-2022 12:14 PM
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.
02-25-2022 12:47 PM
02-25-2022 01:31 PM
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.