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 to:
• Analyze requirements to identify API capabilities for versatile, reusable designs
• Create HTTP-based REST APIs with CRUD, batch/bulk, or long operations
• Design interoperable, user-friendly APIs with seamless operations and data flow
• Ensure secure, efficient APIs while overcoming limitations and constraints
• Modify APIs without breaking compatibility, evaluating consequences carefully
• Future-proof your APIs and choose effective versioning strategies
• Document REST APIs using OpenAPI and JSON Schema for seamless implementation
• Streamline 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 inside
• Design reusable, user-friendly and interoperable APIs
• Document your APIs with OpenAPI and JSON Schema
• Create secure and efficient APIs by design
• Streamline 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
About the Author
Arnaud Lauret is a software architect with 15 years of experience in the banking industry. He has spent a decade using, designing, and building APIs. He's known on the web as the API Handyman (http: //apihandyman.io) and is the creator of the API Stylebook (http: //apistylebook.com), a collection of resources for API designers
Ebook License
End-User Warranty And License Agreement
1. Grant Of License
Manning Has Authorized The Download By You Of An Unrestricted Number Of Copies Of The Electronic Book (Ebook) In Any Of The Available Formats. Manning Grants You A Nonexclusive, Nontransferable License To Use The Ebook According To The Terms And Conditions Herein. This License Agreement Permits You To Install The Ebook On Any And All Your Devices For Your Personal Use Only.
2. Restrictions
You Shall Not: (1) Share, Resell, Rent, Assign, Timeshare, Distribute, Or Transfer All Or Part Of The Ebook Or Any Rights Granted Hereunder To Any Other Person; (2) Duplicate The Ebook, Except For A Single Backup Or Archival Copy; (3) Remove Any Proprietary Notices, Labels, Or Marks From The Ebook; (4) Transfer Or Sublicense Title To The Ebook To Any Other Party.
3. Intellectual Property Protection
The Ebook Is Owned By Manning And Is Protected By United States And International Copyright And Other Intellectual Property Laws. Manning Reserves All Rights In The Ebook Not Expressly Granted Herein. This License And Your Right To Use The Ebook Terminate Automatically If You Violate Any Part Of This Agreement. In The Event Of Termination, You Must Remove The Original And Any Copies Of The Ebook From All Your Devices.
4. Source Code Supplementary Material
Any Source Code Files Provided As A Supplement To The Book Are Freely Available To The Public For Download. Reuse Of The Code Is Permitted, In Whole Or In Part, Including The Creation Of Derivative Works, Provided That You Acknowledge That You Are Using It And Identify The Source: Title, Publisher And Year.
5. Limited Warranty
Manning Warrants That The Ebook Files, A Copy Of Which You Are Authorized To Download, Are Free From Defects In The Operational Sense That They Can Be Read By A Pdf Reader Or Epub Reader, Or Other. Except For This Express Limited Warranty, Manning Makes And You Receive No Warranties, Express, Implied, Statutory Or In Any Communication With You, And Manning Specifically Disclaims Any Other Warranty Including The Implied Warranty Of Merchantability Or Fitness Or A Particular Purpose. Manning Does Not Warrant That The Operation Of The Ebook Will Be Uninterrupted Or Error Free. If The Ebook Was Purchased In The United States, The Above Exclusions May Not Apply To You As Some States Do Not Allow The Exclusion Of Implied Warranties. In Addition To The Above Warranty Rights, You May Also Have Other Rights That Vary From State To State.
6. Limitation Of Liability
In No Event Will Manning Be Liable For Any Damages, Whether Arising For Tort Or Contract, Including Loss Of Data, Lost Profits, Or Other Special, Incidental, Consequential, Or Indirect Damages Arising Out Of The Use Or Inability To Use The Ebook.
7. General
This Agreement Constitutes The Entire Agreement Between You And Manning And Supersedes Any Prior Agreement Concerning The Ebook. This Agreement Is Governed By The Laws Of The State Of New York