Skip to content
Workout Plan API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.data
app
bootstrap
config
database
public
routes
storage
tests
.env.example
.gitattributes
.gitignore
README.md
artisan
composer.json
composer.lock
docker-compose.yml
phpunit.xml
run.sh
server.php

README.md

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

You can’t perform that action at this time.