Skip to course content
Free FastAPI backend course

FastAPI for AI Backend Development

Module 04 Knowledge Check

5 questions. Pass mark 4 out of 5. Answer every question before checking the answer key below, then retry after reading the feedback.

1. An optional value belongs in…

2. A pagination limit without a maximum is…

3. Body constraints declared on the model…

4. Reading a header from the raw request object…

5. A ?user_id= parameter used as identity is…

---

Answer Key and Explanations

Check these only after attempting every question.

1. B - the query string

An optional path parameter forces two routes or a sentinel value in the URL.

2. B - a denial-of-service vector in your own code

A caller can ask for a million rows and your database will try.

3. B - run before the handler and appear in the docs

That is validation you did not write and cannot forget to call.

4. B - makes it invisible to the schema and validation

Declare it in the signature so it reaches the contract.

5. B - the caller asking to be trusted

Identity must be derived from a credential you verified.

Practical Check

Apply this module to your own work: complete the module activity for *Path, Query and Body Parameters*, then write one sentence naming what your result shows and one naming what it does not.

Strong Answer Pattern

A strong answer names the task, the evidence used, the check performed, and the remaining limitation. It avoids "proved", "guaranteed", or "always" unless the evidence genuinely supports it.