1 What is API design?
This chapter covers
- What are web APIs
- Why web API design matters
- When to design web APIs
- Who designs web APIs
- How to design web APIs
Think about your past experiences with web APIs. Have you struggled with cryptic or inconsistent naming and typing, poor data organization, or missing data or operations? Spent hours debugging a failed call that returned a vague "Bad Request"? Have you dealt with crashes due to data being removed in API responses? Maybe end-users complained about slow performance, only for you to find an API call returning an entire database table. Or worse, have you discovered an API exposed sensitive data inappropriately? The root cause is often the same: poor API design.
The design of any web API is crucial, whether it is used by thousands of third parties or a few internal developers. Poorly designed APIs can negatively impact developers' productivity, an IT system’s performance and integrity, end users' experience, and an organization’s revenue. Well-designed APIs give developers and IT systems superpowers and make end users happy, helping individuals, teams, departments, or organizations achieve their IT-system-dependent goals faster and more efficiently. In this book, we’ll introduce you to techniques and tools that will help you design web APIs that developers will love to use.