๐Ÿ”Œ API Patterns and Practices: REST
Home Chapters Examples Diagrams Bibliography GitHub โ†—
Home / HTTP semantics done right
Part 3 2 chapters

HTTP semantics done right

Return correct status codes, headers and representations, and do partial updates two correct ways: JSON Patch and Merge Patch.

Chapter 6

Content negotiation & status codes

Serve the representation the client's Accept names, reject the wrong Content-Type, and return the status code the spec defines: 406, 415, and the 2xx, 4xx and 409 set.

28 minRead โ†’
Chapter 7

Partial updates: JSON Patch vs Merge Patch

Two standard ways to change part of a resource, RFC 7396 JSON Merge Patch and RFC 6902 JSON Patch: their media types, trade-offs and when each fits.

28 minRead โ†’
โ† Previous part Designing resources with a contract Next part โ†’ Collections at scale

API Patterns and Practices: REST

Designing REST APIs well, with runnable examples in Quarkus and Python/FastAPI.

Site

  • Chapters
  • Examples
  • Bibliography

Reference

  • OpenAPI 3.1 โ†—
  • AsyncAPI 3 โ†—
  • View on GitHub โ†—
  • Issues โ†—
Open source ยท MIT Last built 2026-11-11