Course contentsShow
← Web Development
Lesson 1481 of 2,98227. REST API Design for FrontendFree lesson

RESTful vs REST-ish APIs

Recognizing the difference between strictly RESTful APIs and pragmatic HTTP APIs in practice.

RESTful vs REST-ish APIs

You'll learn the practical distinction between APIs that fully honor REST principles and those that borrow REST conventions without strict adherence.

The Reality Gap

In theory, a RESTful API implements all of REST's architectural constraints: statelessness, uniform interface, HATEOAS, resource-based URIs, proper HTTP method semantics, and self-descriptive messages. These APIs achieve Level 3 on the Richardson Maturity Model, including hypermedia controls.

In practice, most APIs are REST-ish (or "HTTP APIs")—they use HTTP methods and resource-oriented URLs but skip the stricter requirements. They might violate statelessness by requiring sessions, ignore HATEOAS entirely, or use HTTP methods inconsistently.

Common REST-ish Patterns

  • Missing HATEOAS: Clients must know all endpoints upfront instead of discovering them through links
  • Custom actions in URLs: /api/users/123/activate instead of a state change via PATCH
  • RPC-style endpoints: /api/calculate or /api/sendEmail instead of resource manipulation
  • Ignoring HTTP status codes: Returning 200 OK for errors with error details in the body
  • Session state: Using cookies or server-side sessions instead of pure token-based authentication

Does It Matter?

For most frontend development, a pragmatic REST-ish API works perfectly well. Full RESTful APIs offer discoverability and flexibility but add complexity. Understanding the difference helps you recognize what style you're working with and set appropriate expectations.

Key Takeaway: Most real-world APIs are REST-ish—they use HTTP conventions and resource-oriented design without strictly following all REST constraints. This pragmatic approach balances simplicity with RESTful principles.