Handbooks / REST API Design / Chapter 4
Versioning and Pagination
7 pages · ~5 min✓ Reviewed
Builds on Authentication and Authorization. Next up: Rate Limiting and Idempotency.
API Design Mental Model
1. Three Tools, One Goal
- Versioning, pagination and caching all protect clients
- The contract stays stable while data and servers change
| Tool | Idea |
|---|---|
| Version | A named contract; bump only for breaking changes, never additive ones |
| Pagination | A bounded slice plus a way to ask for the next slice |
| Caching | Reuse while fresh, revalidate cheaply when stale |
2. Core Request Flow
- 1Client sendsversion + page position + validators
- 2Server returnsdata + next position + cache headers