What is a best practice when building System APIs?
What is a best practice when building System APIs?
Documenting the API using an easily consumable asset like a RAML definition is a best practice when building System APIs. This approach ensures that the API is well-documented and accessible for developers, facilitating ease of use, onboarding, and maintenance. Other options, such as tightly coupling the API design to backend operations or exposing internal technical details, can lead to maintenance challenges and reduced flexibility. Building an Enterprise Data Model for each backend system is also not practical for System APIs, as it can be overly complex and not necessary for API consumers.
Feels like it should be A... (but I could be wrong). If you go for B, "Model all API resources", it's time-consuming approach, as some assets might have 100s or 1000s of assets. And there might be assets you don't want to expose... I'll go for A, just clearly document what you using
Model all API resources and methods to closely mimic the operations of the backend system
A is correct
Model all API resources and methods to closely mimic the operations of the backend system A is correct but here, the concern is system API and we don't have an enterprise data model in place
Creating a Enterprise Data Model is good practice to hide the actual backend system data model.
Keyword - "building". So B it is.
Answer: B
It could be either A or B. B is not defined as best practice by Mulesoft. However, A is best practice. Not only for System API but for all APIs.