Manning Publications, 2021. — 481 p. — ISBN: 9781617295850.
Modern software systems are composed of many servers, services, and other components that communicate through APIs. As a developer, your job is to make sure these APIs are stable, reliable, and easy to use for other developers. API Design Patterns provides you with a unique catalog of design standards and best practices to ensure your APIs are flexible and user-friendly. Fully illustrated with examples and relevant use-cases, this essential guide covers patterns for API fundamentals and real-world system designs, along with quite a few not-so-common scenarios and edge-cases.
About the technologyAPI design patterns are a useful set of best practice specifications and common solutions to API design challenges. Using accepted design patterns creates a shared language amongst developers who create and consume APIs, which is especially critical given the explosion of mission-critical public-facing web APIs. API Patterns are still being developed and discovered. This collection, gathered and tested by Google API expert JJ Geewax, is the first of its kind.
Introduction to APIs
Introduction to API design patterns
GENERAL DESIGN PRINCIPLESNaming
Resource scope and hierarchy
Data types and defaults
FUNDAMENTALSResource identification
Standard methods
Partial updates and retrievals
Custom methods
Long-running operations
Rerunnable jobs
RESOURCE RELATIONSHIPSSingleton subresources
Cross references
Association resources
Add and remove custom methods
Polymorphism
COLLECTIVE OPERATIONSCopy and move
Batch operations
Criteria-based deletion
Anonymous writes
Pattern template
Filtering
Importing and exporting
SAFETY AND SECURITYVersioning and compatibility
Soft deletion
Request deduplication
Request validation
Resource revisions
Request retrial
Request authentication