RESTful Routing Activity: Create a RESTful Routing Chart
Let’s apply what you have just learned to a new resource!
Create a RESTful Routing Chart
10 minObjective
Apply what you’ve learned about RESTful routing by designing a routing chart for a new resource such as “songs” or “recipes”.
Instructions
-
Choose your resource:
Feel free to be creative. -
Identify the CRUD operations:
Think about the operations you would need to perform on your resource:- Create: Add new data.
- Read: Retrieve existing data (all songs or a specific song).
- Update: Modify existing data.
- Delete: Remove data.
-
Map CRUD to routes:
For each operation, define:- The HTTP method (
GET,POST). - The endpoint or path (
/songs,/songs/:id). - A brief description of the route’s purpose.
- The HTTP method (
-
Create your chart:
- Option 1: Draw the chart by hand.
- Option 2: Use a diagramming tool such as Whimsical, Lucidchart, or even a spreadsheet application.