-
POST
/api/auth/register- Description: Register a new user.
- Request Body:
username: stringpassword: stringemail: string
- Response:
201 Created: User registered successfully.400 Bad Request: Validation errors.
-
POST
/api/auth/login- Description: Log in an existing user.
- Request Body:
username: stringpassword: string
- Response:
200 OK: Login successful, returns user data and token.401 Unauthorized: Invalid credentials.
-
POST
/api/auth/refresh-token- Description: Refresh the authentication token.
- Request Body:
refreshToken: string
- Response:
200 OK: Returns new access token.401 Unauthorized: Invalid refresh token.
-
GET
/api/students- Description: Retrieve a list of students.
- Response:
200 OK: Returns an array of student objects.
-
POST
/api/students/submit- Description: Submit a new student record.
- Request Body:
name: stringage: integerclass: string
- Response:
201 Created: Student record created successfully.400 Bad Request: Validation errors.
-
GET
/api/parents- Description: Retrieve a list of parents.
- Response:
200 OK: Returns an array of parent objects.
-
POST
/api/parents/submit- Description: Submit a new parent record.
- Request Body:
name: stringrelationship: string
- Response:
201 Created: Parent record created successfully.400 Bad Request: Validation errors.
-
GET
/api/medical- Description: Retrieve medical records.
- Response:
200 OK: Returns an array of medical records.
-
POST
/api/medical/submit- Description: Submit a new medical record.
- Request Body:
studentId: stringmedicalCondition: string
- Response:
201 Created: Medical record created successfully.400 Bad Request: Validation errors.