This API is now offline. A fix for the auth-link-portal has been implemented, therefore this API is no longer needed.
A Node.js Express server with MongoDB for managing student records and link records.
- checkPrnExists: Check if a PRN exists in the link records
- studentRecordCreateOrUpdate: Create or update student records
- linkRecordCreate: Create link records between users and PRNs
All endpoints require authentication with Bearer banana token in the Authorization header.
Check if a PRN exists in the link records.
Response:
{
"success": true,
"data": {
"prn": "PES1UG20CS123",
"exists": true
}
}Create or update a student record.
Request Body:
{
"prn": "PES1UG20CS123",
"branch": {
"full": "Computer Science and Engineering",
"short": "CSE"
},
"year": "2020",
"campus": {
"code": 1,
"short": "RR"
}
}Create a link record between a user and PRN.
Request Body:
{
"userId": "user123",
"prn": "PES1UG20CS123"
}-
Install dependencies:
yarn install
-
Update the MongoDB connection string in
.envfile -
Start the server:
yarn dev
The server will run on port 3000 by default.
All API endpoints require the following header:
Authorization: Bearer banana