Read One and Read Many Endpoints
Return a single item or a collection.
Two Shapes of Read
A REST resource needs two read endpoints: one that returns a single item by id, and one that returns the whole collection. 📚
List Route for Many
The collection lives at a plain path like /users. A GET there should answer with every matching record.
@app.route("/users")
def list_users():
...All lessons in this course
- Create Records and Commit Sessions
- Read One and Read Many Endpoints
- Update Existing Records Safely
- Delete and Handle Missing Rows