API to track data about plants in your garden. Store data like soil moisture, humidity, light levels and temperature.
ExpressJS & MongoDB.
This API is hosted free with now and uses a free mongo db with mLab. Now will randomly generate a URL for the API. Have the now CLI and NPM installed before running the below command.
- Step 1:
npm install - Step 2:
now -e MONGO_DB=<mongo connection string>
Use an arduino/genuino or raspberry pi to send data to this API. Here are my example scripts for arduino and raspberry pi. Then create a front end to read data from the API or clone my front-end that already works for this API.
- GET
/api/gardensReturns list of gardens - POST
/api/gardensReturns newly saved garden - PUT
/api/gardensReturns updated garden - DELETE
/api/gardensReturns message if deleted garden - GET
/api/gardens/:idReturns 1 garden
- GET
/api/potsReturns list of pots - POST
/api/potsReturns newly saved pot - PUT
/api/potsReturns updated pot - DELETE
/api/potsReturns message if deleted pot - GET
/api/pots/:idReturns 1 pot - GET
/api/pots/garden/:idReturns list of pots for a specific garden
- GET
/api/readingsReturns list of readings - POST
/api/readingsReturns newly saved reading - PUT
/api/readingsReturns updated readings - DELETE
/api/readingsReturns message if deleted reading - GET
/api/readings/:idReturns 1 reading - GET
/api/readings/pot/:idReturns list of readings for a specific pot
- name
Stringrequired - description
String
- name
Stringrequired - description
String - gardenId
Stringrequired
- date
Datedefault = Date.now - potId
Stringrequired - soilTemp
Float - soilMoisture
Float - humidity
Float - light
Float