Book description
The popularity of REST in recent years has led to tremendous growth in almost-RESTful APIs that don’t include many of the architecture’s benefits. With this practical guide, you’ll learn what it takes to design usable REST APIs that evolve over time. By focusing on solutions that cross a variety of domains, this book shows you how to create powerful and secure applications, using the tools designed for the world’s most successful distributed computing system: the World Wide Web.
You’ll explore the concepts behind REST, learn different strategies for creating hypermedia-based APIs, and then put everything together with a step-by-step guide to designing a RESTful Web API.
- Examine API design strategies, including the collection pattern and pure hypermedia
- Understand how hypermedia ties representations together into a coherent API
- Discover how XMDP and ALPS profile formats can help you meet the Web API "semantic challenge"
- Learn close to two-dozen standardized hypermedia data formats
- Apply best practices for using HTTP in API implementations
- Create Web APIs with the JSON-LD standard and other the Linked Data approaches
- Understand the CoAP protocol for using REST in embedded systems
Publisher resources
Table of contents
- Praise for RESTful Web APIs
- Dedication
- Foreword
- Introduction
- 1. Surfing the Web
- 2. A Simple API
- 3. Resources and Representations
- 4. Hypermedia
-
5. Domain-Specific Designs
- Maze+XML: A Domain-Specific Design
- How Maze+XML Works
- The Collection of Mazes
- Is Maze+XML an API?
- Client #1: The Game
- A Maze+XML Server
- Client #2: The Mapmaker
- Client #3: The Boaster
- Clients Do the Job They Want to Do
- Extending a Standard
- The Mapmakerâs Flaw
- Maze as Metaphor
- Meeting the Semantic Challenge
- Where Are the Domain-Specific Designs?
- If You Canât Find a Domain-Specific Design, Donât Make One
- Kinds of API Clients
- 6. The Collection Pattern
- 7. Pure-Hypermedia Designs
- 8. Profiles
-
9. The Design Procedure
- Two-Step Design Procedure
- Seven-Step Design Procedure
- Example: You Type It, We Post It
- Some Design Advice
- Adding Hypermedia to an Existing API
- Aliceâs Second Adventure
- 10. The Hypermedia Zoo
- 11. HTTP for APIs
- 12. Resource Description and Linked Data
- 13. CoAP: REST for Embedded Systems
-
A. The Status Codex
- Problem Detail Documents
- Families of Status Codes
- Four Status Codes: The Bare Minimum
- 1xx: Informational
- 2xx: Successful
- 3xx: Redirection
-
4xx: Client-Side Error
- 400 (Bad Request)
- 401 (Unauthorized)
- 402 (Payment Required)
- 403 (Forbidden)
- 404 (Not Found)
- 405 (Method Not Allowed)
- 406 (Not Acceptable)
- 407 (Proxy Authentication Required)
- 408 (Request Timeout)
- 409 (Conflict)
- 410 (Gone)
- 411 (Length Required)
- 412 (Precondition Failed)
- 413 (Request Entity Too Large)
- 414 (Request-URL Too Long)
- 415 (Unsupported Media Type)
- 416 (Requested Range Not Satisfiable)
- 417 (Expectation Failed)
- 428 (Precondition Required)
- 429 (Too Many Requests)
- 431 (Request Header Fields Too Large)
- 451 (Unavailable For Legal Reasons)
- 5xx: Server-Side Error
-
B. The Header Codex
- Custom HTTP Headers
-
The Headers
- Accept
- Accept-Charset
- Accept-Encoding
- Accept-Language
- Accept-Ranges
- Age
- Allow
- Authorization
- Cache-Control
- Connection
- Content-Disposition
- Content-Encoding
- Content-Language
- Content-Length
- Content-Location
- Content-MD5
- Content-Range
- Content-Type
- Cookie
- Date
- ETag
- Expect
- Expires
- From
- Host
- If-Match
- If-Modified-Since
- If-None-Match
- If-Range
- If-Unmodified-Since
- Last-Modified
- Link
- Link-Template
- Location
- Max-Forwards
- Pragma
- Prefer
- Preference-Applied
- Proxy-Authenticate
- Proxy-Authorization
- Range
- Referer
- Retry-After
- Set-Cookie
- Slug
- TE
- Trailer
- Transfer-Encoding
- Upgrade
- User-Agent
- Vary
- Via
- Warning
- WWW-Authenticate
- C. An API Designerâs Guide to the Fielding Dissertation
- Glossary
- Index
- Colophon
- Copyright
Product information
- Title: RESTful Web APIs
- Author(s):
- Release date: September 2013
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781449359737
You might also like
book
Microservice APIs
Strategies, best practices, and patterns that will help you design resilient microservices architecture and streamline your …
book
RESTful Web API Patterns and Practices Cookbook
Many organizations today orchestrate and maintain apps that rely on other people's services. Software designers, developers, …
book
Hands-On RESTful API Design Patterns and Best Practices
Build effective RESTful APIs for enterprise with design patterns and REST framework's out-of-the-box capabilities Key Features …
book
Designing Web APIs
Using a web API to provide services to application developers is one of the more satisfying …