Curriculum
Phase 2
Routing and CRUD APIs
Build and fix an in-memory resource API, working through the full flow of path parameters, query parameters, request bodies, and CRUD.
- Topics
- 9
- topic groups
- Ready
- 105
- implemented tasks
- Total
- 105
- planned tasks
Topic 2-1
Path parameters
Extract an ID from part of a URL and safely handle a single resource.
- Implemented
- 12
- Passed
- 0
- Planned
- 12
- Environment
- node:http / in-memory array
- Goal
- Memo, task, and product APIs
Required Tasks
Exercises
- 01Extract id in GET /memos/:id and return a single recordAuto grading / FeedbackSign in
- 02Separate the list `/memos` from the detail `/memos/:id`Auto grading / FeedbackSign in
- 03Return 400 for a non-numeric idAuto grading / FeedbackSign in
- 04Return 400 for zero and negative idsAuto grading / FeedbackSign in
- 05Do not treat `/memos/` as the detail APIAuto grading / FeedbackSign in
- 06Return 404 for a nonexistent idAuto grading / FeedbackSign in
- 07Do not return a deleted memo from the detail fetchAuto grading / FeedbackSign in
- 08Return 404 for extra path segmentsAuto grading / FeedbackSign in
- 09Handle path parameters in GET /users/:id tooAuto grading / FeedbackSign in
- 10Return product details in GET /products/:idAuto grading / FeedbackSign in
- 11Fix the bug that treats `12abc` as id=12Auto grading / FeedbackSign in
- 12Do not return internal fields from the detail APIAuto grading / FeedbackSign in