a simple IoT Data Exchange application using Rest API backend using the Vert.x framework
- RESTful CRUD APIs
- MongoDB Client for Vert.x
- Basic Auth Layer for all routes
- Different Verticles for HTTP requests and DB access
These endpoints route to http://localhost:8881/server/:id
PUT requires additional info in the http request
body, namely currentLevel
, observationDateTime
, measuredDistance
, and referenceLevel
This endpoint routes to http://localhost:8881/server/
It also requires currentLevel
, observationDateTime
, measuredDistance
, and referenceLevel
in the http request body.
All endpoint require an AUTH_TOKEN header
-
Clone this repo
-
Run mongo and execute following steps : i.
use iot-data
ii.db.coll.insert(sample_data)
//sample_data should be in json If you don't have mongo, you can install it from the official page -
Run the
com.dataexchange.vertx.App
instance in an IDE of your choice -
Make calls to the endpoints from postman. Here's a sample collection which can be imported in Postman.