Auth API
[POST] /auth/login
Logins with ID. Returns JWT token and user data, feeding statistics.
URL Parameters
NoneData Parameters
id: [integer]
Required Headers
NoneResponse
- Success:
- Code:
200
- Content:
{ stat: "success", msg: [JWT TOKEN], data: { user: { ID: [integer], name: [string], role: [string] }, semister: [string], statistics: [Array] } }
- Code:
- Error:
- Code:
400
- Content:
{ stat: "error", msg: "등록되지 않은 학번입니다.", data: "ERR_NOT_REGISTERED" }
- Code:
- Success:
[POST] /auth/autologin
Logins with JWT Token. Returns user data and feeding statistics.
URL Parameters
NoneData Parameters
NoneRequired Headers
x-access-token: [JWT TOKEN]
Response
- Success:
- Code:
200
- Content:
{ stat: "success", msg: null, data: { user: { ID: [integer], name: [string], role: [string] }, semister: [string], statistics: [Array] } }
- Code:
- Error:
- Code:
400
- Content:
{ stat: "error", msg: "등록되지 않은 학번입니다.", data: "ERR_NOT_REGISTERED" }
- Code:
- Success:
Record API
[GET] /record
Returns feeding application records between startDate
and endDate
.
URL Parameters
startDate: [yyyy-mm-dd]
endDate: [yyyy-mm-dd]
Data Parameters
NoneRequired Headers
NoneResponse
- Success:
- Code:
200
- Content:
{ stat: "success", msg: [{ UPDATE_TIME: [update time] }], data: [Array] }
- Code:
- Success:
[POST] /record
Makes new feeding application record.
URL Parameters
NoneData Parameters
ID: [integer]
name: [string]
date: [string]
course: [string]
Required Headers
x-access-token: [JWT TOKEN]
Response
- Success:
- Code:
201
- Content:
{ stat: "success", msg: null, data: { affectedRows: [integer], insertId: [integer], warningStatus: [integer] } }
- Code:
- Error:
- Code:
400
- Content:
{ stat: "error", msg: "이미 신청되었습니다.", data: "ERR_DUP_ENTRY" }
- Code:
- Success:
[DELETE] /record
Deletes existing feeding application record.
URL Parameters
NoneData Parameters
ID: [integer]
name: [string]
date: [string]
course: [string]
Required Headers
x-access-token: [JWT TOKEN]
Response
- Success:
- Code:
204
- Content:
{ stat: "success", msg: null, data: { affectedRows: [integer], insertId: [integer], warningStatus: [integer] } }
- Code:
- Success:
[GET] /record/statistics
Returns statistics data of total activities.
URL Parameters
type: [ summary | this_feeding | this_total | prev_feeding | total_total | custom_total ]
value: [yyyy-mm-dd|yyyy-mm-dd]
value
is required only when type iscustom_total
. Start date and end date separated with|
Data Parameters
NoneRequired Headers
NoneResponse
- Success:
- Code:
200
- Content:
{ stat: "success", msg: null, data: [Array] }
- Code:
- Error:
- Code:
400
- Content:
{ stat: "error", msg: "유효하지 않은 통계 유형입니다.", data: "ERR_INVALID_TYPE" }
- Code:
- Success:
[GET] /record/log
Returns log data of server activities.
URL Parameters
level: [string]
type: [string]
level
andtype
is string separated with|
Data Parameters
NoneRequired Headers
x-access-token: [JWT TOKEN]
Response
- Success:
- Code:
200
- Content:
{ stat: "success", msg: null, data: [Array] }
- Code:
- Success:
Verify API
[GET] /verify
Returns feeding application records and activity verification records between startDate
and endDate
.
URL Parameters
startDate: [yyyy-mm-dd]
endDate: [yyyy-mm-dd]
Data Parameters
NoneRequired Headers
x-access-token: [JWT TOKEN]
Response
- Success:
- Code:
200
- Content:
{ stat: "success", msg: [Array], data: [Array] }
- Code:
- Success:
[POST] /verify
Makes new activity verification record.
URL Parameters
None- Data Parameters
data: [string]
data
is a stringified Array ofpayload
s.
payload: { ID: [integer], date: [string], name: [string], course: [string], score: [string] }
Required Headers
x-access-token: [JWT TOKEN]
- Response
- Success:
- Code:
201
- Content:
{ stat: "success", msg: null, data: [Array] }
- Code:
- Success:
[DELETE] /verify
Deletes existing activity verification record.
URL Parameters
None- Data Parameters
data: [string]
data
is a stringified Array ofpayload
s.
payload: { ID: [integer], date: [string], name: [string], course: [string] }
Required Headers
x-access-token: [JWT TOKEN]
- Response
- Success:
- Code:
204
- Content:
{ stat: "success", msg: null, data: [Array] }
- Code:
- Success:
[GET] /verify/latest
Returns latest verification’s date.
URL Parameters
NoneData Parameters
NoneRequired Headers
x-access-token: [JWT TOKEN]
Response
- Success:
- Code:
200
- Content:
{ stat: "success", msg: null, data: [string] }
- Code:
- Success:
[GET] /verify/1365
Returns generated 1365 verification pdf document.
URL Parameters
month: [yyyy-mm]
namelist: [string]
Data Parameters
NoneRequired Headers
x-access-token: [JWT TOKEN]
Response
stream
Settings API
[GET] /settings/:name
Returns value of requested settings.
URL Parameters
name: [string]
Data Parameters
NoneRequired Headers
NoneResponse
- Success:
- Code:
200
- Content:
{ stat: "success", msg: null, data: [string] }
- Code:
- Success:
[PUT] /settings/:name
Updates value of settings.
URL Parameters
name: [string]
Data Parameters
data: [string]
Required Headers
x-access-token: [JWT TOKEN]
Response
- Success:
- Code:
200
- Content:
{ stat: "success", msg: null, data: { affectedRows: [integer], insertId: [integer], warningStatus: [integer] } }
- Code:
- Success:
Users API
[GET] /users/list
Returns list of members that matches semister
parameter.
If semister
value is all, returns list of namelist tables.
URL Parameters
semister: [string]
Data Parameters
NoneRequired Headers
x-access-token: [JWT TOKEN]
Response
- Success:
- Code:
200
- Content:
{ stat: "success", msg: null, data: [Array] }
- Code:
- Success:
[GET] /users/name
Returns info of single user by name.
URL Parameters
query: [string]
Data Parameters
NoneRequired Headers
x-access-token: [JWT TOKEN]
Response
- Success:
- Code:
200
- Content:
{ stat: "success", msg: null, data: [Array] }
- Code:
- Success:
[POST] /users/id
Add new user.
URL Parameters
NoneData Parameters
단과대학: [string]
학과: [string]
학번: [string]
이름: [string]
전화번호: [string]
생년월일: [string]
1365 아이디: [string]
가입 학기: [string]
직책: [string]
new: [bool]
Required Headers
NoneResponse
- Success:
- Code:
201
- Content:
{ stat: "success", msg: null, data: { affectedRows: [integer], insertId: [integer], warningStatus: [integer] } }
- Code:
- Error:
- Code:
400
- Content:
{ stat: "error", msg: "지난 학기에 가입한 적이 있습니다.<br>기존 회원으로 등록해 주세요.", data: "ERR_REGISTERED_BEFORE" }
- Code:
400
- Content:
{ stat: "error", msg: "기존 회원이 아닙니다.<br>신입 회원으로 등록해 주세요.", data: "ERR_NEVER_REGISTERED" }
- Code:
400
- Content:
{ stat: "error", msg: "이미 이번 학기 회원으로 등록되셨습니다.'", data: "ERR_ALREADY_REGISTERED" }
- Code:
- Success:
[PUT] /users/id
Updates user info.
URL Parameters
NoneData Parameters
college: [string]
department: [string]
name: [string]
phone: [string]
birthday: [string]
1365ID: [string]
role: [string]
register: [string]
ID: [integer]
Required Headers
x-access-token: [JWT TOKEN]
Response
- Success:
- Code:
200
- Content:
{ stat: "success", msg: null, data: { affectedRows: [integer], insertId: [integer], warningStatus: [integer] } }
- Code:
- Success:
[DELETE] /users/id
Deletes user info.
URL Parameters
NoneData Parameters
ID: [integer]
Required Headers
x-access-token: [JWT TOKEN]
Response
- Success:
- Code:
204
- Content:
{ stat: "success", msg: null, data: { affectedRows: [integer], insertId: [integer], warningStatus: [integer] } }
- Code:
- Error:
- Code:
400
- Content:
{ stat: "error", msg: "No matching ID", data: "ERR_NO_MATCHING_ID" }
- Code:
- Success:
[GET] /users/register
Returns list of register applications that matches semister
parameter.
If semister
value is all, returns list of register namelist tables.
URL Parameters
semister: [string]
Data Parameters
NoneRequired Headers
x-access-token: [JWT TOKEN]
Response
- Success:
- Code:
200
- Content:
{ stat: "success", msg: null, data: [Array] }
- Code:
- Success:
[POST] /users/register
Add new register application.
URL Parameters
NoneData Parameters
단과대학: [string]
학과: [string]
학번: [string]
이름: [string]
전화번호: [string]
생년월일: [string]
1365 아이디: [string]
가입 학기: [string]
직책: [string]
new: [bool]
Required Headers
NoneResponse
- Success:
- Code:
201
- Content:
{ stat: "success", msg: null, data: { affectedRows: [integer], insertId: [integer], warningStatus: [integer] } }
- Code:
- Error:
- Code:
400
- Content:
{ stat: "error", msg: "이미 가입 신청하셨습니다!<br>조금만 기다리시면 임원진이 연락을 드릴 거에요.", data: "ERR_ALREADY_REGISTERED" }
- Code:
- Success: