Skip to content
Pebellslearn by building

The course

API Design

Learn how web APIs work from the network up, then design one properly. You will pick methods and status codes, shape resources and URLs, handle paging, retries and errors, and secure it all with sessions, tokens and OAuth — on one small library API.

Ready to learn

Your path through the ideas

Inside the course

7 modules · 24 lessons
CLI tools & setup · Start here

Install your tools, choose your setup and verify a local run.

02Learn the Basics5 lessons

Meet APIs as published promises, follow a request through DNS and TCP/IP, read raw HTTP messages, place details in the path or query, and let client and server agree on formats.

  1. 01What an API Is10 min
  2. 02TCP/IP and DNS — Reaching the Server12 min
  3. 03HTTP — One Request, One Response12 min
  4. 04URLs, Path and Query Parameters12 min
  5. 05Content Negotiation14 min
03HTTP in Depth5 lessons

Choose methods by their meaning, answer with the right status code, carry metadata in headers and cookies, cache responses safely, and let browsers call your API across origins.

  1. 01HTTP Methods12 min
  2. 02HTTP Status Codes14 min
  3. 03Headers and Cookies12 min
  4. 04HTTP Caching14 min
  5. 05CORS — Cross-Origin Requests15 min
04API Styles3 lessons

See what makes an API truly RESTful, let clients choose their fields with GraphQL, and compare the contract-first RPC styles SOAP and gRPC.

  1. 01REST and JSON APIs14 min
  2. 02GraphQL APIs14 min
  3. 03SOAP and gRPC — Contract-First Calls14 min
05Designing RESTful APIs4 lessons

Choose the nouns your API is about, name them so developers can guess the URLs, change the API without breaking callers, and map create, read, update and delete onto HTTP.

  1. 01Resource Modeling14 min
  2. 02URI Design and Naming12 min
  3. 03Versioning Strategies14 min
  4. 04CRUD Operations14 min
06Robust Endpoints3 lessons

Slice big collections with filters, sorting and pagination, make retries harmless with idempotency, and return errors in one clear, standard shape.

  1. 01Pagination, Filtering and Sorting15 min
  2. 02Idempotency14 min
  3. 03Error Handling and Problem Details15 min
07Authentication Methods4 lessons

Compare Basic auth, server-side sessions and tokens, check JWTs in the right order, and let other apps act for a user with OAuth 2.0 and OpenID Connect.

  1. 01Basic Auth12 min
  2. 02Session-Based Auth12 min
  3. 03Token-Based Auth and JWT15 min
  4. 04OAuth 2.0 and OpenID Connect16 min
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.