Skip to main content
POST
/
api
/
v1
/
school
/
sessions
/
{session_pk}
/
exam-sessions
/
{exam_session_pk}
/
exams
/
auto-create-teacher-exams
Auto-create exams for teacher
curl --request POST \
  --url https://test-api.afrainity.com/api/v1/school/sessions/{session_pk}/exam-sessions/{exam_session_pk}/exams/auto-create-teacher-exams/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "success": true,
  "message": "Successfully processed 8 class-subject assignments",
  "summary": {
    "total_assignments": 8,
    "newly_created": 5,
    "already_existed": 3,
    "created_by_you": 2,
    "created_by_others": 1
  },
  "details": {
    "created_exams": [
      {
        "id": "660e8400-e29b-41d4-a716-446655440001",
        "subject": "Mathematics",
        "subject_code": "MATH101",
        "academic_class": "Form 4A",
        "created": true
      }
    ],
    "existing_exams": [
      {
        "id": "770e8400-e29b-41d4-a716-446655440002",
        "subject": "Physics",
        "subject_code": "PHY101",
        "academic_class": "Form 4B",
        "created_by": "John Doe",
        "created_by_you": true
      }
    ]
  },
  "teacher": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Jane Smith"
  },
  "exam_session": {
    "id": "880e8400-e29b-41d4-a716-446655440003",
    "name": "End of Term 1",
    "term": "1"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

exam_session_pk
string<uuid>
required

Exam Session ID

id
string<uuid>
required

Exam UUID

session_pk
string<uuid>
required

Academic Session ID

Body

{key}
any

Response

{key}
any