Hands-On Practice
Use the API Explorer below to practice every concept from this course. Work through the exercises in order — or freestyle and explore. If you break something, hit Oopsie Reset.
Quick Reference
GET
GET /api/training/users
GET /api/training/users/:id
GET /api/training/users?limit=5&offset=0
GET /api/training/users?search=alice
POST
POST /api/training/users
POST /api/training/posts
POST /api/training/todos
PUT
PUT /api/training/users/:id (replace all fields)
PATCH
PATCH /api/training/users/:id (update some fields)
PATCH /api/training/todos/:id (toggle completed)
DELETE
DELETE /api/training/users/:id
DELETE /api/training/posts/:id
DELETE /api/training/todos/:id
OTHER
GET /api/training/status
POST /api/training/reset
Exercises
0 / 10 doneList All Users
Make a GET request to list all users. Look at the meta object to see how many users exist.
Get a Specific User
Fetch the user with ID 3. Try IDs 1–10 and also try ID 99 to see what a 404 looks like.
Filter & Paginate
Get 3 users at a time. Then change offset to 3, then 6. Try ?search=alice to filter by name.
Get Posts by User
Fetch all posts written by user 1. Then try userId=2, userId=3.
Create a New User
Create a new user. Then try creating one with the same email — observe the 409 Conflict response. Also try sending invalid JSON or leaving out the email field.
Update a User (PATCH)
Update only the city of user 1. Then GET user 1 again to confirm the change. Notice that only city changed — everything else is preserved.
Toggle a Todo
Mark todo #3 as completed. Then GET /api/training/todos?userId=1 to see the updated state. Toggle it back to false.
Create a Post
Create a new blog post. Then GET /api/training/posts to see your post in the list. Try creating one with a userId that doesn't exist (e.g. 999).
Delete a Resource
Delete user 10. Then try to GET user 10 — you should get a 404. Notice what happens to their posts and todos (they remain, with a userId that no longer exists).
Chain Multiple Calls
A real-world workflow: 1) GET user 1, 2) GET their posts (?userId=1), 3) Create a new post for them, 4) PATCH the post title, 5) DELETE the post. Check /api/training/status at any point.