API Routes - Ollebacx/FOR8-Back GitHub Wiki
API ROUTES
Please note that all routes in this API should be called with the /api prefix before the endpoint:
POST http://localhost:3000/api/auth/signup
NOTE: All these endpoints below require a token to be sent within the HTTP Headers.
Authentication endpoints
| METHOD |
URL |
What does it do |
PARAMS |
RETURNS |
| POST |
auth/signup |
Create a new account |
name, email, password |
name, email, token |
| POST |
auth/login |
Authenticates a user |
email, password |
name, email, token |
Exercise endpoints
| METHOD |
URL |
What does it do |
PARAMS |
RETURNS |
| GET |
exercises |
Get All Exercise |
|
[exercises] |
Workouts endpoints
| METHOD |
URL |
What does it do |
PARAMS |
RETURNS |
| GET |
workouts |
Get All Default Workouts |
|
[ workouts ] |
| GET |
workouts/:workoutId |
Get One Workout |
|
{ workout } |
| GET |
me/workouts |
Get User's Workouts |
|
[ workouts ] |
| POST |
me/workouts |
Create new workout |
|
|
WorkoutsLogs endpoints
| METHOD |
URL |
What does it do |
PARAMS |
RETURNS |
| GET |
me/workoutsLog |
Get All User Workouts Logs |
|
[ workoutsLogs ] |
| GET |
me/workoutsLog/:workoutLogId |
Get One Workout Log |
|
{ workoutLog } |
| POST |
me/workoutsLog |
Create new Workout Log |
|
|