Lesson Complete!
List and Filter Expenses
What you learned
- How query parameters pass optional filters in the URL without changing the endpoint path
- How to build a GET endpoint that returns all stored expenses as a list
- How to add an optional category filter using a default value of
None - How to use a list comprehension to filter expenses server-side before returning them
Next up
You can list and filter expenses, but you cannot look up a single expense or remove one. In the next lesson, you will add endpoints to get and delete individual expenses by their identifier, with proper error handling for missing resources.