Provide front page and etc (like *.js, *.css).
Provide card reader connection. Response
{
"IsCard":true,
"CardID":"Detect card ID",
"SID":"User ID associated with the card ID",
"IsNew":false
}
If the card is not registered, return info with SID="" and IsNew=true.
Get user info by user ID. Request http://localhost:3000/api/user?sid={{UserID}}
Response
{
"SID":"UserID",
"UserName":"UserName",
"IsEnter":true
}
When users enter, IsEnter=true.
Register card info with given user ID. Request
{
"SID":"UserID",
"CardID":"CardID"
}
Response
{
"Success":true,
"Reason":""
}
Add enter/leave log. Request
{
"SID":"UserID",
"IsEnter":0,
"Ext":"{...}"
}
If the log contains answer of question, the data is given as json string in Ext.