Fine-Grained vs. Coarse-Grained APIs in MuleSoft

API design is a fascinating topic. One important aspect of API design is determining the right 'size' of an API in terms of its features and functionality. All architects must have grappled with this issue at some point or the other. In this article, I will try and give some insights into the various parameters that we need to think through before arriving at the 'right' grained API:

  • Maintainability: The first aspect that comes to mind is the maintainability of APIs. Coarse-grained APIs are difficult to maintain. As the API consumer needs grow, it will be difficult to add more implementation variations or parameters.