Skip to main content

Book Exercise Lanes

This module's exercise system is book-driven. Use these local chunks for targeted volume after you have already learned the concept from the guide.

How To Use This Page​

  1. Finish the relevant concept page first.
  2. Design one endpoint or change of your own from memory.
  3. Only then open the matching exercise lane.
  4. Keep a mistake log with tags such as GET with body, overloaded POST, version-by-copy, offset pagination, no idempotency key, mixed error envelopes, enum added for input field, sunset without headers, deep hierarchy, or breaking type change.

Lane 1: Resource Modeling and URL Design​

Use this lane when the issue is "where does this thing live and what do I call it?"

Target outcomes:

  • 4 complete resource models for unfamiliar domains
  • 3 URL designs with deliberate nesting decisions, flattened where appropriate
  • 2 "this was nested, should be flat" before-and-after redesigns
  • 1 written naming audit with fixes on an existing API

Lane 2: Standard Methods, Verbs, Status, Idempotency​

Use this lane when the issue is "which verb and which status code."

Target outcomes:

  • 8 endpoints with verb, success status, and idempotency mechanism written out
  • 3 written defenses of PUT vs PATCH vs POST for specific cases
  • 3 idempotency-key flows end-to-end (first call, safe retry, conflict, TTL)
  • 2 "wrong status code fixed" diagnoses of existing APIs

Lane 3: Pagination, Filtering, Partial Responses​

Use this lane when list endpoints are slow, unstable, or wasteful.

Target outcomes:

  • 5 list endpoints with complete pagination, filter, sort, field-mask designs
  • 2 migrations from offset- to cursor-based pagination with rationale
  • 1 filter-grammar decision memo (pick one and defend)
  • 1 sparse-fieldset design with a documented mask syntax

Lane 4: Custom Actions, LRO, Webhooks, Batch​

Use this lane when CRUD won't fit the operation.

Target outcomes:

  • 4 custom actions across two domains, each with body and error responses
  • 2 LRO designs including progress, cancel, and failure responses
  • 1 webhook system end-to-end (register, event, retry, sign, replay)
  • 2 batch endpoints with explicit atomicity contract
  • 1 file-based import/export LRO design

Lane 5: RPC, GraphQL, Event-Driven​

Use this lane for non-REST styles and event-driven contracts.

Target outcomes:

  • 2 APIs restated in gRPC (.proto) from a REST starting point
  • 2 GraphQL schemas for existing REST APIs with DataLoader plan
  • 2 AsyncAPI specs for event topics with delivery semantics documented
  • 1 integration-style decision memo for a real upcoming integration

Lane 6: Versioning, Compatibility, Deprecation​

Use this lane for evolution work.

Target outcomes:

  • 15 change classifications (safe / breaking) with reasoning, for a realistic change set
  • 3 compatible paths invented for proposed breaking changes
  • 2 full deprecation plans with headers, dates, outreach, and removal behavior
  • 1 written defense of a versioning strategy for an API you own

Self-Curated Problem Set​

Build a custom set with these minimums:

  • 5 resource-modeling problems (different domains)
  • 5 verb/status/idempotency designs
  • 3 pagination/filter designs including at least one migration
  • 3 async or batch designs across different patterns
  • 2 RPC or GraphQL restatements of REST APIs
  • 2 AsyncAPI specs with delivery-semantics prose
  • 5 compatibility classifications for changes drawn from real open-source projects
  • 2 full deprecation plans

Completion Checklist​

  • Completed at least three lanes in full
  • Retained actual mistakes, their evidence and corrections; if none occurred, label a deliberately faulty example and show how to detect it. No minimum personal-error count.
  • Produced at least 3 OpenAPI specs that pass a linter (Spectral)
  • Produced at least 1 .proto that compiles and 1 GraphQL schema that validates
  • Produced at least 1 AsyncAPI 3.0 document covering two event types
  • Written a personal API style guide you actually use