Web API Design and Development
About the Book
“Web API Design and Development” is a practical guide to designing Web APIs that are easy to understand, easy to use, and hard to get wrong. It systematically covers every facet of API design, including URI design, the use of HTTP methods, best practices for the JSON data format, versioning strategies, and authentication and authorization mechanisms. Through rich comparisons of good and bad examples, the book lets readers grasp the core principles of excellent API design intuitively.
Core Concepts
Drawing on your experience building projects such as “Wiki Portal” and “Wiki Loan” back then, the core content of the book is highly relevant to you:
- API endpoint design: how to design clear, consistent URIs that express the relationships between resources.
- Applying HTTP methods: using HTTP verbs such as
GET,POST,PUT, andDELETEcorrectly to express the intent of an operation. - Data formats: JSON design techniques, including field naming, data type selection, and handling nested structures.
- Response design: how to design sensible HTTP status codes and error response bodies so clients can handle exceptions with ease.
- Versioning: the pros and cons of different version management strategies, such as putting version numbers in the URI versus using HTTP headers.
- Security: covers common authentication and authorization schemes such as API keys and OAuth.
Key Takeaways
You built a large number of Web APIs and Admin APIs in 2019, and this book handed you a systematic set of design guidelines and best practices. Studying it let you turn your earlier, piecemeal API design experience into structured theory. That helped you design more consistent, robust, and maintainable APIs in later projects, improved team collaboration, and cut the communication cost of front-end/back-end integration. For the “Wiki Portal” project you were working on at the time and the “Wiki Loan” project that was about to start, the book could not have arrived at a better moment.