Skip to content

Rest API Design Textbook

A free, self-paced textbook in 7 chapters. Read a chapter, then drill it with the 50 companion flashcards using spaced repetition.

7 chapters · 50 cards · Updated

Chapters

  1. 1Foundations of REST

    REST, or Representational State Transfer, is an architectural style for designing scalable web APIs that leverages the standard HTTP protocol. At its heart, a REST API exposes reso...

  2. 2HTTP Methods and Their Semantics

    HTTP methods express the intended action on a resource, and choosing the right one is central to a clean REST design. GET retrieves a representation of a resource, POST creates a n...

  3. 3URI Design and Resource Modeling

    Well-designed URIs make an API feel intuitive to navigate. The dominant convention is hierarchical, noun-based paths that use plural nouns for collections, such as /users/123/order...

  4. 4Status Codes and Error Handling

    Status codes are the API's primary vocabulary for outcomes, and using them precisely saves clients from parsing message bodies to understand what happened. The 2xx range covers suc...

  5. 5Data Formats, Content Negotiation, and Hypermedia

    JSON has become the de facto response format for REST APIs thanks to its compactness, readability, and near-universal language support. While XML and other formats are still possib...

  6. 6Performance Patterns

    Most APIs eventually have to handle large collections, expensive operations, or many small requests, and a handful of patterns cover these needs. Pagination splits a large result s...

  7. 7Security, Authentication, and Cross-Cutting Concerns

    REST APIs inherit the same threat landscape as any web service, and security must be designed in from the start. The foundation is HTTPS, which protects credentials and payloads in...

← Back to the Rest API Design deck