The Smart Attendance System provides a robust and fast API via FastAPI. Below are the core endpoints provided by the backend.
Base URL: http://localhost:8000/api
Analyzes an uploaded image, detects faces, extracts embeddings, and returns the results.
- Request Body:
multipart/form-datacontaining thefile(image). - Response:
{ "status": "success", "count": 3, "faces": [ { "bbox": [100, 150, 200, 250], "confidence": 0.98, "embedding_preview": [...] } ] }
Registers a new student to the system and adds their facial embedding to the FAISS index.
- Request Body:
multipart/form-datawith:student_id: String (e.g., "S12345")name: Stringsection: Stringfile: Image file showing the student's face clearly.
- Response:
201 Created
Retrieves a list of all registered students.
- Response: list of student objects.
Retrieves details of a specific student.
Creates a new attendance session after a successful face detection/recognition run.
- Request Body: JSON containing the section ID, date, and lists of present/absent students.
- Response:
{ "status": "success", "session_id": "123..." }
Retrieves history records of all attendance sessions.
(More detailed API schema is available interactively via Swagger UI directly at http://localhost:8000/docs while the backend is running).