GradeBook Management API Documentation

1. GetMarkSheetsByClassId

This API endpoint is used to create or update a GradeBook.

cURL Command:

curl -X POST https://yourdomain.com/academic/gradebook/marksheeet \
-H "Content-Type: application/json" \
-d '{
    "exam_id": 1,
    "class_id": 1
}'

1. Save GradeBook

This API endpoint is used to create or update a GradeBook.

cURL Command:

curl -X POST https://yourdomain.com/academic/gradebook/save \
-H "Content-Type: application/json" \
-d '{
    "exam_id": 1,
    "class_id": 1,
    "subject_id": 2,
    "staff_id": 31,
    "section": "A"
}'

Sample Response:

{"status": 1, "message": "Grade book saved successfully"}

2. Delete GradeBook

This API endpoint is used to delete a GradeBook.

cURL Command:

curl -X POST https://yourdomain.com/academic/gradebook/delete \
-H "Content-Type: application/json" \
-d '{
    "grade_book_id": 1
}'

Sample Response:

{"status": 1, "message": "Grade book deleted successfully"}

3. List GradeBooks

This API endpoint is used to list GradeBooks based on class IDs.

cURL Command:

curl -X POST https://yourdomain.com/academic/gradebook/list \
-H "Content-Type: application/json" \
-d '{
    "class_ids": [1, 2],
    "offset": 0,
    "limit": 10
}'

Sample Response:

{ "status": 1, "totalRecords": 2, "data": [ { "grade_book_id": 1, "exam_id": 1, "class_id": 1, "subject_id": 2, "staff_id": 31, "section": "A", "exam_name": "Aug 2024", "subject_name": "English" } ] }

4. Get Specific GradeBook

This API endpoint is used to retrieve details of a specific GradeBook.

cURL Command:

curl -X POST https://yourdomain.com/academic/gradebook/get \
-H "Content-Type: application/json" \
-d '{
    "grade_book_id": 1
}'

Sample Response:

{ "status": 1, "data": { "grade_book_id": 1, "exam_id": 1, "class_id": 1, "subject_id": 2, "staff_id": 31, "section": "A", "exam_name": "Aug 2024", "subject_name": "English" } }

5. Generate Grades

This API endpoint is used to generate grades for students in a GradeBook.

cURL Command:

curl -X POST https://yourdomain.com/academic/gradebook/generate_grades \
-H "Content-Type: application/json" \
-d '{
    "grade_book_id": 1
}'

Sample Response:

{"status": 1, "message": "Grades generated successfully"}

6. Save or Update Student Marks

This API endpoint is used to save or update student marks in a GradeBook.

cURL Command:

curl -X POST https://yourdomain.com/academic/gradebook/student_marks/save \
-H "Content-Type: application/json" \
-d '{
    "grade_book_id": 1,
    "student_id": 20,
    "marks_obtained": 85,
}'

Sample Response:

{"status": 1, "message": "Student marks saved successfully"}

7. List Marks by exam_id, class_id, subject_id

This API endpoint lists marks based on exam, class, and subject.

cURL Command:

curl -X POST https://yourdomain.com/academic/gradebook/marks/list_by_exam_class_subject \
-H "Content-Type: application/json" \
-d '{
    "exam_id": 1,
    "class_id": 1,
    "subject_id": 2
}'

Sample Response:

{ "status": 1, "data": [ { "grade_id": 1, "grade_book_id": 1, "student_id": 20, "marks_obtained": 85, "first_name": "Whiter", "last_name": "Blue" } ] }

8. List Marks by student_id and academic_year_id

This API endpoint lists marks for a student based on academic year.

cURL Command:

curl -X POST https://yourdomain.com/academic/gradebook/marks/list_by_student_year \
-H "Content-Type: application/json" \
-d '{
    "student_id": 20,
    "academic_year_id": 1
}'

Sample Response:

{ "status": 1, "data": [ { "grade_id": 1, "grade_book_id": 1, "exam_id": 1, "class_id": 1, "subject_id": 2, "grade": "A", "exam_name": "Aug 2024", "subject_name": "English" } ] }