API On Point
Actual coverage
What an API is; HTTP requests; HTTP responses; RESTful design; response structure; MongoDB; Node.js; Express; CORS; authentication; next steps.
Durable knowledge
- An API is a contract and boundary, not merely a URL.
- Requests combine method, path, headers, query, and body; responses combine status, headers, and representation.
- Use resource-oriented URLs and HTTP semantics consistently, but model domain actions honestly when CRUD is insufficient.
- Status codes and error bodies should let clients distinguish invalid, unauthenticated, forbidden, missing, conflicting, and failed operations.
- Validate every external input and authorize access at the resource/action level.
- CORS is a browser permission mechanism, not authentication or server-side access control.
- Stable APIs require pagination, idempotency, rate limits, timeouts, version/evolution strategy, documentation, and observability.
See API Design.