Readplace

What Is a REST API, and Why Yours Probably Isn’t One

fagnerbrack.com 9 min read
View original
Summary (TL;DR)
Roy Fielding's 2000 dissertation defines REST as an architectural style with six constraints: client-server, stateless, cacheable, uniform interface (including HATEOAS), layered system, and code on demand (optional). Most APIs only satisfy two or three, skipping cacheability and HATEOAS. HATEOAS lets servers tell clients what actions are available via hypermedia, reducing hardcoded logic and breaking changes. Without it, teams reinvent pagination, versioning, and discoverability. Skipping constraints is fine for small internal APIs but costly for public ones. The style describes the web, not JSON APIs, and applying it requires real media types like Siren.