Skip to content

LambdaBW-Water-My-Plants3/Back-End

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WATER MY PLANTS API

Swagger Docs

https://watermyplantunit4.herokuapp.com/swagger-ui.html#/

Description

App that will Streamline plant watering for Users

Base Url

https://watermyplantunit4.herokuapp.com/

Documentation For Models/Objects

All endpoints That do not require authorization.

Method HTTP request Object Expected
POST /signup User or UserMinimum
POST /login username & password

ALL endpoints That NEED authorization

PLANT API

All URIs are relative to baseUrl

Method HTTP request Description
POST /plants/plant addNewPlant
DELETE /plants/plant/delete/{plantid} deletePlantById
GET /plants/plant/withname/{plantname} findPlantByNameLike
GET /plants/plant/id/{plantid} getPlantById
GET /plants/plant/{plantname} getPlantByName
GET /plants/plant/withspecies/{species} getPlantBySpeciesLike
GET /plants/plant/species/{species} getPlantBySpecies
GET /plants/plants listAllPlants
PUT /plants/plant/{plantid} updateFullUser

USERAPI

All URIs are relative to baseUrl

Method HTTP request Description
POST /users/user addNewUser
DELETE /users/user/{id} deleteUserById
GET /users/getuserinfo returns the currently authenticated user
GET /users/user/{userId} getUserById
GET /users/user/name/{userName} getUserByName
GET /users/user/name/like/{userName} getUserLikeName
GET /users/users listAllUsers
PUT1 /users/user/{userid} updateFullUser
PATCH /users/user/{id} updateUser

JSON

Sample Json User Object

{
        "userid": 500,
        "username": "doggy",
        "primaryemail": "[email protected]",
        "useremails": [
            {
                "useremailid": 11,
                "useremail": "[email protected]"
            },
            {
                "useremailid": 12,
                "useremail": "[email protected]"
            }
        ],
        "roles": [
            {
                "role": {
                    "roleid": 1,
                    "name": "ADMIN"
                }
            }
        ],
        "plants": [
            {
                "plantid": 5,
                "nickname": "Bunny Ears Cactus",
                "species": "Cactus",
                "waterfrequency": "1x weekly",
                "imgurl": "https://images.unsplash.com/photo-1573692822546-99d57af10a33?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=634&q=80"
            }
        ]
    }

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published