Skip to content

Latest commit

 

History

History
183 lines (140 loc) · 9.45 KB

README.md

File metadata and controls

183 lines (140 loc) · 9.45 KB

NISROOM API for Lambda

Contributors

Contributors
kogepanh tayoon RSugimoto2017 cotaroo uzumal SioCon

Overview

NISLAB Room Monitor API for AWS Lambda

Frontend

nisroom nisplan

Architecture

nisroom-architecture

API Documentation

API List

No. API Function No. Type API Name Overview
0 NISROOM-000 API nisroom-api Production Environment
1 NISROOM-001 API nisroom-api-dev Test Environment

Resource Types

students


HTTP Method Access URI Objective
GET /v1/students Get all information about members
  • GET Data (JSON)
Category JSON Key Type Description
None
  • Response Data (JSON)
Category JSON Key Type Description
ID id Value ID
Image avatar URL Image of Slack
First Name (En) e_first_name String First Name in English
Last Name (En) e_last_name String Last Name in English
Grade grade String Grade of member
Status of stay is_stay Boolean Whether the member is in the Lab or not
First Name (Ja) j_first_name String First Name in Japanese
Last Name (Ja) j_last_name String Last Name in Japanese
Student ID student_id Value Student ID
Scheduled date of visit schedule Array Scheduled date of visit

id


HTTP Method Access URI Objective
PATCH /v1/students/{id} Update information about the member
  • PATCH Data (JSON)
Category JSON Key Type Description
Status of stay is_stay Boolean Whether the member is in the Lab or not (true or false)
Scheduled date of visit schedule Array Scheduled date of visit ({YYYY-MM-DD, YYYY-MM-D'D', ...})
If the value is an empty array, it will be null.
  • Response Data (JSON)
Category JSON Key Type Description
Status of stay is_stay Boolean Whether the member is in the Lab or not (Same data as PATCH Data)
Scheduled date of visit schedule Array Scheduled date of visit (["YYYY-MM-DD", "YYYY-MM-D'D', ...])

Database Design and Structure

students Table

Primary Key Attributes
Partition Key
id avater e_first_name e_last_name grade is_stay j_first_name j_last_name student_id schedule
{Integer} {String} {String} {String} {Integer} {Boolean} {String} {String} {Integer} {StringSet}

Status Code

Status Code Description
200 OK Standard response for successful HTTP requests. The actual response will depend on the request method used.
403 Forbidden The request was a legal request, but the server is refusing to respond to it. Unlike a 401 Unauthorized response, authenticating will make no difference.
502 Bad Gateway The server was acting as a gateway or proxy and received an invalid response from the upstream server.

For Developers

How To Use Repository

  1. Fork and Clone
  2. git remote add upstream https://github.com/Kenny-NISLab/nisroom-api.git
  3. git pull upstream develop

Setup

  1. npm install

Format before Commit

  1. npm run format