Skip to course content
Free FastAPI backend course

FastAPI for AI Backend Development

Module 03 Activity

Scenario

Design the HTTP surface so a client that did not read your source can still behave correctly.

What you build

An endpoint set with correct methods, meaningful status codes, and documented idempotency.

Steps

  1. For every operation, choose the method from what it promises about safety and idempotency. Justify any POST used for a read.
  2. Assign a status code to every outcome, including the error paths. State which are worth retrying.
  3. Find anything returning 200 with an error inside the body and fix it.
  4. Type any monetary value as a decimal and confirm what arrives on the wire.
  5. For every creating POST, design the idempotency key the client supplies and you store.
  6. Read the generated documentation and list what it cannot express about your endpoints.

Evidence to hand in

Review checklist