← All Learning Paths

REST API Design

A focused path on HTTP semantics, resource validation, pagination, server implementations, templates, and request verification for robust REST APIs.

technicalintermediate14 nodes14.75h total

A focused REST API design learning path covering HTTP methods, resource modeling, status codes, pagination, versioning, security, documentation, and testing for robust APIs.

  1. Reconstruct the reasoning behind "API Design Principles for Long-lived Systems" by tracing "Versioning: Make Breaking Changes Explicit" to the failure it prevents in rest systems.

    Completion criteria: Record a short walkthrough of "API Design Principles for Long-lived Systems" with timestamps at "Idempotency: Retries Must Not Duplicate Work" and "Errors That Tell the Consumer What to Do", plus the commit that applies it.

    Next step: FastAPI Form Validation with Pydantic

    ⏱ 1h

  2. Run the rest snippet "FastAPI Form Validation with Pydantic", capture stdout, and show which line demonstrates the documented behavior: "the UserForm entry point".

    Prerequisites: API Design Principles for Long-lived Systems

    Completion criteria: Attach the terminal transcript for "FastAPI Form Validation with Pydantic": command, exit code, and the printed result you used to confirm "the UserForm entry point".

    Next step: Opaque Cursor Encoding And Decoding

    ⏱ 0.75h

  3. Adapt "Opaque Cursor Encoding And Decoding" to a second input and compare the new output with the behavior described in "the toBase64Url entry point".

    Prerequisites: FastAPI Form Validation with Pydantic

    Completion criteria: Paste the command, the exit code, and the output line matching "A cursor codec that encodes and decodes opaque cursors so API clients never depend on"; then show a second run with a changed parameter.

    Next step: Go HTTP Server with Middleware

    ⏱ 0.75h

  4. Run the rest snippet "Go HTTP Server with Middleware", capture stdout, and show which line demonstrates the documented behavior: "the loggingMiddleware entry point".

    Prerequisites: Opaque Cursor Encoding And Decoding

    Completion criteria: Attach the terminal transcript for "Go HTTP Server with Middleware": command, exit code, and the printed result you used to confirm "Create a production-ready HTTP server in Go with middleware chaining, graceful shutdown,".

    Next step: Rust HTTP Server with Axum

    ⏱ 0.75h

  5. Run the rest snippet "Rust HTTP Server with Axum", capture stdout, and show which line demonstrates the documented behavior: "Build a type-safe HTTP server in Rust using Axum with extractors, JSON responses, error".

    Prerequisites: Go HTTP Server with Middleware

    Completion criteria: Change one constant in "Rust HTTP Server with Axum", rerun, and attach both stdout captures plus a one-line diff explaining what moved.

    Next step: Next.js API Route Handler

    ⏱ 0.75h

  6. Adapt "Next.js API Route Handler" to a second input and compare the new output with the behavior described in "the bodySchema entry point".

    Prerequisites: Rust HTTP Server with Axum

    Completion criteria: Attach the terminal transcript for "Next.js API Route Handler": command, exit code, and the printed result you used to confirm "the bodySchema entry point".

    Next step: Fastify

    ⏱ 0.75h

  7. Stand up "Fastify" for a rest task, confirm "route app.route(opts: RouteOptions): FastifyInstance" holds, and document one failure you triggered.

    Prerequisites: Next.js API Route Handler

    Completion criteria: Run a request against "Fastify", paste the response, and add one deliberately invalid call with its error.

    Next step: Hono

    ⏱ 1h

  8. Wire "Hono" into a scratch rest project, following "Middleware app.use(path: string, ...middleware: MiddlewareHandler): void", and record one working request/response pair.

    Prerequisites: Fastify

    Completion criteria: Attach one successful call and one invalid call against "Hono", citing "c.req.param c.req.param(key): string" as the documented surface.

    Next step: Express + Prisma REST API

    ⏱ 1h

  9. Use "Express + Prisma REST API" for a rest starter, adapting "Express, Prisma, TypeScript, Zod" without breaking the entry point.

    Prerequisites: Hono

    Completion criteria: Attach the scaffold command for "Express + Prisma REST API", the diff of the module you replaced, and the output showing "Express, Prisma, TypeScript, Zod" still works.

    Next step: Rust + Axum High-Performance REST API

    ⏱ 1.5h

  10. Compare "Rust + Axum High-Performance REST API"'s Async SQLx queries with compile-time SQL validation preventing runtime errors design with your rest stack and list the trade-off "JWT authentication with tower middleware and typed extractor for type-safe auth" implies.

    Prerequisites: Express + Prisma REST API

    Completion criteria: List each Async SQLx queries with compile-time SQL validation preventing runtime errors component of "Rust + Axum High-Performance REST API", its responsibility, and one trade-off, citing "JWT authentication with tower middleware and typed extractor for type-safe auth".

    Next step: HTTP Request Builder & cURL

    ⏱ 1.5h

  11. Feed a representative input into "HTTP Request Builder & cURL" and verify "Build HTTP requests with method, URL, headers, and body, then generate the equivalent cURL" by hand.

    Prerequisites: Rust + Axum High-Performance REST API

    Completion criteria: Run two inputs through "HTTP Request Builder & cURL", record both outputs, and show one case where "Build HTTP requests with method, URL, headers, and body, then generate the equivalent cURL" changes as expected.

    Next step: HTTP Status Code Explorer

    ⏱ 0.25h

  12. Use "HTTP Status Code Explorer" on a rest sample, then check "http-status-code to status-info" against your manual result.

    Prerequisites: HTTP Request Builder & cURL

    Completion criteria: Run two inputs through "HTTP Status Code Explorer", record both outputs, and show one case where "http, status, web" changes as expected.

    Next step: Rank Route Patterns by Specificity

    ⏱ 0.25h

  13. Build "Rank Route Patterns by Specificity" for rest code and verify /users/me against both samples.

    Prerequisites: HTTP Status Code Explorer

    Completion criteria: Submit a solution for "REST API Design" that passes both samples ({paths:[/users/me,/users/:id,/files/*],requestPath:/users/me to /users/me) and attach the failing case you fixed.

    Next step: Capstone: REST API Design

    ⏱ 0.5h

  14. Deliver the "Build a Cursor-Pagination REST API" blueprint with "Guarantee stable ordering with an id tie-breaker so pages never overlap." working and "Enforce a maximum page size and default when none is supplied." recorded as evidence.

    Prerequisites: HTTP Status Code Explorer, Rank Route Patterns by Specificity

    Completion criteria: Run the project's test command for "Build a Cursor-Pagination REST API", paste the passing output, and attach the acceptance note for "Guarantee stable ordering with an id tie-breaker so pages never overlap." with the test name.

    Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.

    ⏱ 4h