Skip to content

a simple IoT Data Exchange application using Rest API backend using the Vert.x framework

Notifications You must be signed in to change notification settings

pranavrd/vert.x-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

vert.x-api

a simple IoT Data Exchange application using Rest API backend using the Vert.x framework

Highlights

  • RESTful CRUD APIs
  • MongoDB Client for Vert.x
  • Basic Auth Layer for all routes
  • Different Verticles for HTTP requests and DB access

GET, PUT and DELETE

These endpoints route to http://localhost:8881/server/:id PUT requires additional info in the http request body, namely currentLevel, observationDateTime, measuredDistance, and referenceLevel

POST

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

How to Deploy

  1. Clone this repo

  2. 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

  3. Run the com.dataexchange.vertx.App instance in an IDE of your choice

  4. Make calls to the endpoints from postman. Here's a sample collection which can be imported in Postman.

About

a simple IoT Data Exchange application using Rest API backend using the Vert.x framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages