How to choose the right API style
Choosing the right API style for a system requires carefully considering the system’s unique requirements and technical constraints and the nature of its interactions with your API consumers. This decision-making framework provides a guide for selecting between function-based, resource-based, query-based, and event-based API families. By understanding the system’s goals and addressing key factors, you can make informed choices to align the API with both technical and business objectives.
Understanding the core requirements
The first step in selecting the most suitable API style is to thoroughly understand the system’s core requirements. You can ensure that the API design aligns with the overall goals and use cases of the project by addressing the following questions:
- What is the API’s primary function?
In addition to what you’ve learned in Chapter 1 about the why of API development, you...