gabrielrolfsen / webservice-iot Goto Github PK
View Code? Open in Web Editor NEWDebaisu's Webservice
Debaisu's Webservice
POST /logout
Status:
200 - OK: logout successfully
Users:
id - PRIMARY KEY
username - PRIMARY KEY text
name text
password text
access int
creation_date text (date)
Devices:
id - PRIMARY KEY int
name text
type text
status int
last_active_time text (date)
Device Permissions:
user_id - FOREIGN KEY (users -> id) int
device_id - FOREIGN KEY (devices -> id) int
access_level int
Authentication endpoint
POST /login
{
"username": "fulano",
"password": "segredo"
}
Response
Status:
200 - OK: logged successfully
401 - FORBIDDEN: invalid credentials
Payload:
{
"name”: “Fulano de Tal”
"username": "fulano",
"password": "segredo"
}
GET /devices
Status:
200 - OK: available devices
401 - FORBIDDEN: no available devices
[
{
"id”: “1”,
"name": "Device Name I",
"type": "LIGHT_BULB",
"status": "ONLINE",
"last_active_time": "2017-10-01T00:00:00Z"
},
{
"id”: “2”,
"name": "Device Name II",
"type": "DOOR_LOCK",
"status": "ONLINE",
"last_active_time": "2017-10-01T00:00:00Z"
}
]
POST /sign-up
{
"name": "Fulano De Tal",
"username": "fulano",
"password": "segredo",
"pin_code": "123"
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.