Hello @arkiboys ,
Thanks for the question and using MS Q&A platform.
As we understand the ask here is how is it different calling a API with just an ID vs calling out all of them together with a IN clause , please do let us know if its not accurate.
When we call a API , we have an agreement with the API owner as to what are the inputs(parameter ) , which we need pass and what will be response .
In your use case , if there are two API one whch takes only the id and then other which takes more then one ID , you can always use use both of them . But the API are designed to be as granular and as fast as possible , so API with a bunch of ID does not look to be a good in general but I agree we may have exceptions .
You are right in foreach loop you call the API and it looks like they all are called in a parallel ( FYI you can change this behaviour by setting the sequential to "yes") .
Going back to the ask if calling the API with individual ID is effecient . The API are designed we do not as granular as possible , so thats a good design .
Please do let me if you have any queries.
Thanks
Himanshu
- Please don't forget to click on
or upvote
button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
- Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators