Deployed on Kubernetes cluster on IBM cloud: http://159.122.174.163:31175
- Create a
.env
file containing the following values and put it in the project's root folder.sk
: The django secret keydb_user
: The username for the database admin/userdb_password
: The password for the databse admin/user
- Start a pipenv shell
$ pipenv shell
- Install all the python requirements with pip
$ pip install -r requirements.txt
- Make any necessary migrations
$ python manage.py makemigrations $ python manage.py migrate
- Start the server
$ python manage.py runserver
API used to interface between database, mobile app and hardware device for our smart irrigation system.
For the full documentation go here
Retrieves plant from database
By passing the plant name in the you can search for and retrieve the desired plant from the database.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
plant_name | path | the plant name being searched for | Yes | string |
Code | Description |
---|---|
200 | Search results matching criteria |
404 | No plant matching criteria |
405 | Method not allowed |
Get user
Get most up-to-date information of logged in user.
Code | Description |
---|---|
200 | user retrieved |
401 | Unauthorized |
405 | Method not allowed |
Adds a user to the system
Creates a user and adds them to the system
Code | Description |
---|---|
201 | new user created |
400 | Incomplete request |
405 | Method not allowed |
409 | User conflict |
creates a user and adds them to the system
creates a session for the user
Code | Description |
---|---|
200 | Login successful |
400 | Incomplete request |
401 | Unauthorized |
403 | Already logged in |
405 | Method not allowed |
Add a plant to user's grid
Add a plant that exists in the database to the logged-in user's grid.
Code | Description |
---|---|
200 | Login successful |
400 | Incomplete request |
401 | Unauthorized |
404 | No plant matching criteria |
405 | Method not allowed |
Change certain plant's moisture.
Change the moisture of the specified plant for the logged-in user
Code | Description |
---|---|
200 | moisture updated successfully |
400 | Incomplete request |
404 | No plant matching criteria |