
2 Identifying API capabilities
This chapter covers
- Analyzing use cases
- Identifying unique and versatile operations
- Ensuring alignment with user needs
- Avoiding integrating overly specific consumer requirements
- Avoiding exposing the provider’s inner workings
API design begins by analyzing users’ needs and identifying the API capabilities required to fulfill them. Identifying the appropriate API capabilities is crucial. As seen in section 1.2, an API with incorrect capabilities can make developing applications that consume it complex or impossible, wasting time and resources and potentially jeopardizing the API provider, even when the faulty API is private.
We’ll describe capabilities using plain English or any other natural language rather than programming interface language. This is because form follows function, a design principle that applies to buildings, kitchen appliances, applications, and APIs. An effective API design requires analyzing users’ use cases and identifying the generic operations to fulfill them and yet-to-be-discovered use cases before choosing the appropriate programming representations and data modeling. This simplifies discussions, streamlines the design process, and avoids creating complex or incomplete APIs that don’t meet user needs.