Skip to content
← Back to projects

Api

Workout Plan API

#Workout Plan API

Scrutinizer Code Quality

#About

This is a generic REST API for workout plans.


#How to use?

#Authentication

#Auth - User Authentication

POST

http://localhost:8000/api/v1/auth

BODY

email example@email.com

password **********


#Users

#Users - Create a new User

POST

http://localhost:8000/api/v1/users

HEADERS

Authorization Bearer + token generated in auth route

BODY

first_name examplefirstName

last_name examplelastName

email example@email.com

password **********

#Users - Show User data

GET

http://localhost:8000/api/v1/users/{id_user}

HEADERS

Authorization Bearer + token generated in auth route

#Users - Update a User's data

PUT

http://localhost:8000/api/v1/users/{id}

HEADERS

Authorization Bearer + token generated in auth route

Content-Type application/json

BODY

first_name examplefirstName

last_name examplelastName

email example@email.com

password **********

#Users - Delete a User

DELETE

http://localhost:8000/api/v1/users/{id}

HEADERS

Authorization Bearer + token generated in auth route

#Workout Types

#Workout Types - Create a new Workout Type

POST

http://localhost:8000/api/v1/workout_types

HEADERS

Authorization Bearer + token generated in auth route

BODY

name exampleName

description description example

#Workout Types - Show a workout type

GET

http://localhost:8000/api/v1/workout_types/{id}

HEADERS

Authorization Bearer + token generated in auth route

#Workout Types - Update a workout type

PUT

http://localhost:8000/api/v1/workout_types/{id_workout_type}

HEADERS

Authorization Bearer + token generated in auth route

BODY

name exampleName

description description example

#Workout Types - Delete a workout type

DELETE

http://localhost:8000/api/v1/workout_types/{id}

HEADERS

Authorization Bearer + token generated in auth route

#Workout Plans

#Workout Plans - Create a new Workout Plan

POST

http://localhost:8000/api/v1/workout_plans

HEADERS

Authorization Bearer + token generated in auth route

BODY

fk_workout_type workout type

fk_user User

date Date

#Workout Plans - Show a Workout Plan

GET

http://localhost:8000/api/v1/workout_plans/{id}

HEADERS

Authorization Bearer + token generated in auth route

#Workout Plans - Update a Workout Plan

PUT

http://localhost:8000/api/v1/workout_plans/{id}

HEADERS

Authorization Bearer + token generated in auth route

Content-Type application/json

BODY

name exampleName

email example@email.com

password **********

#Workout Plans - Update a Workout Plan

PUT

http://localhost:8000/api/v1/workout_types/{id}

HEADERS

Authorization Bearer + token generated in auth route

BODY

fk_workout_type workout type

fk_user User

date Date

#Workout Plans - Delete a Workout Plan

DELETE

http://localhost:8000/api/v1/workout_plans/{id}

HEADERS

Authorization Bearer + token generated in auth route

New version available.