Learn how to design web APIs that are a delight to use and maintain.
Thousands of developers have followed renowned API expert Arnaud Lauret’s guidance to create APIs that are flexible, secure, and easily integrated. This new edition of the bestselling The Design of Web APIs covers the latest updates to the OpenAPI standard, teaches you to streamline and standardize API design decisions with rationale and automation, and gives you insights you can apply to other API styles, such as gRPC. You’ll quickly see how a well-designed and properly-documented API gives your users autonomy—and saves you from constant explanations and hand-holding.
This fully revised second edition of The Design of Web APIs teaches you the principles and techniques you need to design easy-to-consume public and private web APIs. In it, you’ll learn how requirements to identify API capabilities for versatile, reusable designsCreate HTTP-based REST APIs with CRUD, batch/bulk, or long operationsDesign interoperable, user-friendly APIs with seamless operations and data flowEnsure secure, efficient APIs while overcoming limitations and constraintsModify APIs without breaking compatibility, evaluating consequences carefullyFuture-proof your APIs and choose effective versioning strategiesDocument REST APIs using OpenAPI and JSON Schema for seamless implementationStreamline and standardize API design decisions with rationale and automation The Design of Web APIs, Second Edition teaches vital skills for gathering requirements, balancing business and technical goals and constraints, and adopting a consumer-first mindset. Each chapter is packed full of hands-on examples, including designing an Online Shopping API and user-friendly banking operations, and over seventy exercises to help your new skills stick. Plus, you’ll explore paradigms applicable beyond REST APIs, and fully describe and document your APIs with OpenAPI and JSON Schema. Your web APIs will soon be easier to consume and your clients—internal and external—will be happier than ever!
About the technology
Web APIs open up your software to developers, exposing features, and capabilities to other programs. Well-designed web APIs are a joy. The bad ones are a nightmare, with endless impact on system performance, developer productivity, and end-user experience. This book shows you how to design APIs your fellow developers will love to use.
About the book
The Design of Web APIs, Second Edition teaches you to design efficient and adaptable REST APIs. This revised and rewritten second edition contains the latest updates to the OpenAPI standard, along with insights you can apply to other API styles such as GraphQL. Learn vital skills for gathering requirements, creating easy-to-consume public and private web APIs, and handling non-backward compatible modifications and versioning.
What's insideDesign reusable, user-friendly and interoperable APIsDocument your APIs with OpenAPI and JSON SchemaCreate secure and efficient APIs by designStreamline and standardize API design decisions About the reader
Written for developers with experience building and consuming APIs.
About the author
Arnaud Lauret runs the API Handyman blog and is a frequent speaker at API conferences. He currently works as an API Industry Researcher at Postman.
Table of Contents
1 What is API design? Part 1 2 Identifying API capabilities 3 Observing operations from the REST angle 4 Representing operations with HTTP 5 Modeling data 6 Describing HTTP operations with OpenAPI 7 Describing data with JSON Schema in OpenAPI Part 2 8 Designing user-friendly, interoperable data 9 Designing user-friendly, interoperable operations 10 Designing user-friendly, interoperable operation flows 11 Designing user-friendly, interoperable APIs Part 3 12 Designing a secure API 13 Designing an efficient API 14 Adapting the API design to the context 15 Modifying an API Part 4 16 Facilitating API design decision-making 17 Optimizing an OpenAPI document 18 Automating API design guidelines 19 Enriching API design artifacts A Solutions to the exercises
The second edition of The Desgin of Web APIs is a welcome update to a very useful first edition. Arnaud Lauret has thoroughly updated the information to align with current best practices, as well as the latest specification of OpenAPI. The first section, Fundamentals of API design, introduces the reader to API concepts and architecture options, laying the groundwork for actual implementations later in the book. The second section, User-friendly, interoperable API design, is concerned with creating an API that is intuitive for users to interact with, while being reliable and providing appropriate responses. This section abounds with practical tips to help create a robust API that satisfies users' needs. Section three, Constrained API design, covers important topics such as security, data integrity, design optimization, caching, and contextual limitations. The section closes with a discussion of how to best modify an API, and ensure that backward compatibility is preserved when introducing new versions. The final section, Scaled and simplified API design, is a useful discussion of the full lifecycle of an API. It includes advice for optimization, automation, and up-to-date documentation. Overall, this book contains the information that developers need to create APIs that are secure, well-designed, and robustly available to all users. Highly recommended.
Among Manning books on the topic of APIs, Lauret's book stands as both a starting point and an everyday reference.
Besides the basics on API design, for me there is a lot of value and expertise in the chapters that cover versioning and guidelines. These two topics, in my experience, are often overlooked even when they can help in achieving a streamlined API design experience, and are especially valuable if you're working in an organization planning to or already having APIs.
For teams looking to establish consistent, maintainable API practices, the expertise in these sections makes this book particularly worthwhile.