REST API Design, Validation & Errors
3. APIs & Data
3. APIS & DATA
REST API Design, Validation & Errors
Modelling resources, choosing verbs and status codes, paginating collections, validating input at the edge and returning consistent, safe error responses.
5 resources 0 labs
Seven concrete design rules — naming, resource granularity, error shape, versioning — illustrated with real APIs done right and wrong.
VIDEOENFREE 6 min4.5 (71)
How Express distinguishes error middleware, why async handlers need next(err), and how to centralise error responses for the whole app.
TEXTENFREE 15 min4.5 (66)
Which verbs are safe and idempotent, and what that means for retries, caching and PUT vs PATCH in your own endpoints.
TEXTENFREE 15 min4.3 (64)
The full status-code list with when to use 201/204/400/401/403/409/422/429 — the vocabulary your API contract is written in.
TEXTENFREE 15 min4.2 (42)
Declare request schemas once and get runtime validation plus static types — parse bodies, query strings and env vars safely.
TEXTENFREE 25 min4.1 (41)