← All Learning Paths

API Designer

A practical path through API design principles, validation, pagination, server implementations, HTTP semantics, and real REST services.

roleintermediate14 nodes15h total

A focused learning path for API designers covering REST, GraphQL, gRPC, API documentation, versioning, security, and developer experience for building world-class 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 api systems.

    Completion criteria: Attach a one-page summary that quotes "Versioning: Make Breaking Changes Explicit", lists two trade-offs, and links the commit where you applied it.

    Next step: Typed Result Type Instead Of Throwing

    ⏱ 1h

  2. Run the api snippet "Typed Result Type Instead Of Throwing", capture stdout, and show which line demonstrates the documented behavior: "A Result union with map, mapErr and andThen combinators that makes error paths explicit and".

    Prerequisites: API Design Principles for Long-lived Systems

    Completion criteria: Attach the terminal transcript for "Typed Result Type Instead Of Throwing": command, exit code, and the printed result you used to confirm "A Result union with map, mapErr and andThen combinators that makes error paths explicit and".

    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 "A cursor codec that encodes and decodes opaque cursors so API clients never depend on".

    Prerequisites: Typed Result Type Instead Of Throwing

    Completion criteria: Change one constant in "Opaque Cursor Encoding And Decoding", rerun, and attach both stdout captures plus a one-line diff explaining what moved.

    Next step: FastAPI Form Validation with Pydantic

    ⏱ 0.75h

  4. Execute "FastAPI Form Validation with Pydantic", change one constant, and describe how the output diverges from "Validate form data in FastAPI using Pydantic models with custom validators, field".

    Prerequisites: Opaque Cursor Encoding And Decoding

    Completion criteria: Paste the command, the exit code, and the output line matching "Validate form data in FastAPI using Pydantic models with custom validators, field"; then show a second run with a changed parameter.

    Next step: Go HTTP Server with Middleware

    ⏱ 0.75h

  5. Run the api snippet "Go HTTP Server with Middleware", capture stdout, and show which line demonstrates the documented behavior: "Create a production-ready HTTP server in Go with middleware chaining, graceful shutdown,".

    Prerequisites: FastAPI Form Validation with Pydantic

    Completion criteria: Save two runs of "Go HTTP Server with Middleware" side by side — the original input and one changed value — and annotate the line where the output diverges.

    Next step: Rust HTTP Server with Axum

    ⏱ 0.75h

  6. Adapt "Rust HTTP Server with Axum" to a second input and compare the new output with the behavior described in "Build a type-safe HTTP server in Rust using Axum with extractors, JSON responses, error".

    Prerequisites: Go HTTP Server with Middleware

    Completion criteria: Attach the terminal transcript for "Rust HTTP Server with Axum": command, exit code, and the printed result you used to confirm "Build a type-safe HTTP server in Rust using Axum with extractors, JSON responses, error".

    Next step: Express

    ⏱ 0.75h

  7. Exercise express() express(): Express and Router express.Router(options?: RouterOptions): Router from "Express", documenting request, response, and failure.

    Prerequisites: Rust HTTP Server with Axum

    Completion criteria: Attach the request, response, and error code from "Express"; annotate which field caused the failure.

    Next step: FastAPI

    ⏱ 1h

  8. Call FastAPI() FastAPI(title: str, description: str = None, version: str = '0.1.0') -> FastAPI from "FastAPI" and capture both a successful response and one validation error.

    Prerequisites: Express

    Completion criteria: Attach a request/response pair for FastAPI() FastAPI(title: str, description: str = None, version: str = '0.1.0') -> FastAPI and one failing call with the returned error code and message.

    Next step: Hono

    ⏱ 1h

  9. Read "Hono"'s documented surface around "new Hono() new Hono<Environment>(options?: HonoOptions): Hono", then build a minimal endpoint and log the response.

    Prerequisites: FastAPI

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

    Next step: Rust + Axum High-Performance REST API

    ⏱ 1h

  10. Compare "Rust + Axum High-Performance REST API"'s Rust, Axum, SQLx, PostgreSQL design with your api stack and list the trade-off "Async SQLx queries with compile-time SQL validation preventing runtime errors" implies.

    Prerequisites: Hono

    Completion criteria: Draw the responsibility table for "Rust + Axum High-Performance REST API" and mark one place where your api stack would choose differently.

    Next step: HTTP Status Code Explorer

    ⏱ 1.5h

  11. Feed a representative input into "HTTP Status Code Explorer" and verify "http-status-code to status-info" by hand.

    Prerequisites: Rust + Axum High-Performance REST API

    Completion criteria: Run two inputs through "HTTP Status Code Explorer", record both outputs, and show one case where "Browse and explore HTTP status codes with their meanings, categories, and common use cases." changes as expected.

    Next step: Security Boundaries in Modern Web Applications

    ⏱ 0.25h

  12. Compare "The Same-Origin Policy" with "Content Security Policy" in "Security Boundaries in Modern Web Applications" and state which trade-off you would accept in api code.

    Prerequisites: HTTP Status Code Explorer

    Completion criteria: Attach a one-page summary that quotes "The Same-Origin Policy", lists two trade-offs, and links the commit where you applied it.

    Next step: Rank Route Patterns by Specificity

    ⏱ 1h

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

    Prerequisites: Security Boundaries in Modern Web Applications

    Completion criteria: Submit a solution for "API Designer" 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: API Designer

    ⏱ 0.5h

  14. Deliver the "Build a Cursor-Pagination REST API" blueprint with "Serve items using an opaque cursor that encodes the last seen sort key." working and "Guarantee stable ordering with an id tie-breaker so pages never overlap." recorded as evidence.

    Prerequisites: Security Boundaries in Modern Web Applications, 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 "Serve items using an opaque cursor that encodes the last seen sort key." with the test name.

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

    ⏱ 4h