REST API for the Smart Campus Project
Deployed at https://scapi.now.sh
Endpoints:
Registers a new user.
"Created"
Name | Type | Required | Default | Description |
---|---|---|---|---|
id |
Number |
yes | Student ID | |
name |
String |
yes | Name | |
fatherName |
String |
yes | Father's name | |
createdDate |
Date |
yes | Registered date of student card | |
expireDate |
Date |
yes | Expiry date of student card |
Lists all users.
[userObject1, userObject2,...]
None
Updates the properties of a user specified by searchid
.
"Updated"
Name | Type | Required | Default | Description |
---|---|---|---|---|
searchid |
Number |
yes | (unchanged) | ID of the user to be updated |
name |
String |
no | (unchanged) | Name |
fatherName |
String |
no | (unchanged) | Father's name |
createdDate |
Date |
no | (unchanged) | Registered date of student card |
expireDate |
Date |
no | (unchanged) | Expiry date of student card |
fileToWrite |
Boolean |
no | (unchanged) | If true , user will be queued to be written to next card. Must be set to false after being written |
log |
Date |
no | (unchanged) | Time when card was scanned |
Deletes a user specified by searchid
.
"Deleted"
Name | Type | Required | Default | Description |
---|---|---|---|---|
searchid |
Number |
yes | ID of the user to be deleted |
Finds a user specified by searchid
.
If user exists, returns the user object. Else, returns ""
.
Name | Type | Required | Default | Description |
---|---|---|---|---|
searchid |
Number |
yes | ID of the user to be searched for |
Finds a user with fileToWrite
set to true
. Used for writing to cards.
If user exists, returns the user object. Else, returns ""
.
None