REST service (JSON/HTTP) for storing information about gateways and their associated devices.
- Programming language: Java
- Framework: Spring Boot
- Database: In-memory
- Automated build: Apache Maven
- To build open a console and execute ./build.sh
- To run open a console and execute ./run.sh
POST http://localhost:8080/gateways
body: {
"serial": "string", //a unique serial number ex: AbC123
"name": "string", //a human-readable name ex: Gateway A
"ip": "string" //an IPv4 address ex: 10.0.0.1
}
DELETE http://localhost:8080/gateways/{serial} // ex: http://localhost:8080/gateways/AbC123
GET http://localhost:8080/gateways
GET http://localhost:8080/gateways/{serial} // ex: http://localhost:8080/gateways/AbC123
POST http://localhost:8080/gateways/{serial}/device
body: {
"vendor": "string", // ex: Vendor A
"status": "online|offline" // ex: online
}
DELETE http://localhost:8080/gateways/{serial}/device/{device_uid} // ex: http://localhost:8080/gateways/AbC123/device/1