Coder Social home page Coder Social logo

webservice-iot's People

Contributors

brunohideki avatar gabrielrolfsen avatar ra138274 avatar tiagodepalves avatar

Watchers

 avatar  avatar  avatar

Forkers

ra138274

webservice-iot's Issues

Define and create tables in the database

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

[Webserver] Implement Login endpoint

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"
}

[Webserver] Implement List Devices endpoint

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"
}
]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.