curl --request GET \
--url http://localhost:5000/api/attendance/student/64b8f1a2c3d4e5f678901234
[
{
"_id": "64c9a3b7d2e1f0a987654321",
"studentId": "64b8f1a2c3d4e5f678901234",
"date": "2026-03-18T00:00:00.000Z",
"status": "PRESENT",
"__v": 0
},
{
"_id": "64c9a3b7d2e1f0a987654322",
"studentId": "64b8f1a2c3d4e5f678901234",
"date": "2026-03-17T00:00:00.000Z",
"status": "LATE",
"__v": 0
},
{
"_id": "64c9a3b7d2e1f0a987654323",
"studentId": "64b8f1a2c3d4e5f678901234",
"date": "2026-03-16T00:00:00.000Z",
"status": "ABSENT",
"__v": 0
}
]
Attendance
Get attendance
Retrieve all attendance records for a specific student.
GET
/
api
/
attendance
/
student
/
{id}
curl --request GET \
--url http://localhost:5000/api/attendance/student/64b8f1a2c3d4e5f678901234
[
{
"_id": "64c9a3b7d2e1f0a987654321",
"studentId": "64b8f1a2c3d4e5f678901234",
"date": "2026-03-18T00:00:00.000Z",
"status": "PRESENT",
"__v": 0
},
{
"_id": "64c9a3b7d2e1f0a987654322",
"studentId": "64b8f1a2c3d4e5f678901234",
"date": "2026-03-17T00:00:00.000Z",
"status": "LATE",
"__v": 0
},
{
"_id": "64c9a3b7d2e1f0a987654323",
"studentId": "64b8f1a2c3d4e5f678901234",
"date": "2026-03-16T00:00:00.000Z",
"status": "ABSENT",
"__v": 0
}
]
Returns all attendance records associated with a given student ID. Records are returned in the order they were inserted.
This endpoint requires no authentication.
Request
Path parameters
The MongoDB ObjectId of the student whose attendance records you want to retrieve. Must be a valid 24-character hex string.
Response
Returns an array of attendance record objects. Returns an empty array if no records exist for the given student.The MongoDB ObjectId of the attendance record.
The MongoDB ObjectId of the student.
The attendance date in ISO 8601 format.
The recorded attendance status (e.g.,
PRESENT, ABSENT, LATE).Mongoose internal version key.
curl --request GET \
--url http://localhost:5000/api/attendance/student/64b8f1a2c3d4e5f678901234
[
{
"_id": "64c9a3b7d2e1f0a987654321",
"studentId": "64b8f1a2c3d4e5f678901234",
"date": "2026-03-18T00:00:00.000Z",
"status": "PRESENT",
"__v": 0
},
{
"_id": "64c9a3b7d2e1f0a987654322",
"studentId": "64b8f1a2c3d4e5f678901234",
"date": "2026-03-17T00:00:00.000Z",
"status": "LATE",
"__v": 0
},
{
"_id": "64c9a3b7d2e1f0a987654323",
"studentId": "64b8f1a2c3d4e5f678901234",
"date": "2026-03-16T00:00:00.000Z",
"status": "ABSENT",
"__v": 0
}
]
⌘I