FreeCodeCamp Backend Certification
Exercise Tracker Microservice API
Track workouts and monitor fitness progress. Create users, log exercises, and retrieve comprehensive workout history.
Create User
Add Exercise
Get Exercise Log
All Users
No users yet
API Endpoints
POST
/api/users
Create a new user with username
{ "username": "john_doe" }
GET
/api/users
Get all users
[{ "username": "john", "_id": "abc123" }]
POST
/api/users/:_id/exercises
Add exercise for a user
{ "description": "Run", "duration": 30 }
GET
/api/users/:_id/logs
Get user's exercise log. Optional: from, to, limit
?from=2023-01-01&to=2023-12-31&limit=10