API design introduction
easy 24 minAn API is a contract: it says what a program may ask for and what it gets back, and it hides how the work is done.
What each level should show
The same question is judged differently for mid, senior and staff.
Mid
Must show
- Resources as nouns
- Right method and status
- Explains stateless
Will be probed on
- 401 or 403
- PUT or PATCH
Stands out
Adds a limit to every list without being asked.
Senior
Must show
- Errors, paging and idempotency
- Where auth is checked
- How it changes without breaking
Will be probed on
- Lost replies
- Round trips on mobile
- Caching
Stands out
Designs from the caller's screens, not from the tables.
Staff
Must show
- Contract ownership across teams
- Style guide and review
- Deprecation with data
Will be probed on
- Public or internal boundary
- Cost of a wrong name
- Governance that does not block
Stands out
Keeps the surface small on purpose and can say what was left out.