الانتقال إلى المحتوى

توثيق API

واجهة برمجة التطبيقات للعملاء من Smrt English

واجهة برمجة تطبيقات للقراءة فقط ترسل سجلات الطلاب والفصول إلى أنظمة مؤسستكم. ولا يصل كل مفتاح API إلا إلى بيانات مؤسسته.

فتح مركز الاختبار

آلية العمل

كيف يعمل الطلب.

يطلب نظامكم بيانات طالب أو فصل بمفتاح API المخصص له، وتعيد واجهة برمجة التطبيقات السجلات للقراءة فقط.

نظامكمنظام معلومات الطلاب أو أداة التقارير لديكم.
مفتاح API لديكميُرسل مع كل طلب ويرتبط بمدرستكم.
واجهة Smrt English APIنقاط وصول للقراءة فقط لبيانات الطلاب والفصول.
سجلاتكمالدرجات والحضور وقوائم طلاب الفصول بصيغة JSON.
keyboard_arrow_up

Smrt English API

school Get Single Class Endpoint

Endpoint Details

Endpoint: GET /smrtapi/v1/class/{class_id}

Purpose: Retrieve comprehensive class data including student roster, teacher information, course details, and class-level statistics.

URL Parameters

Parameter Type Description
class_id integer Unique class identifier (required)

Headers Required

X-API-Key: your_institution_api_key

Example Request

curl -H "X-API-Key: your_institution_api_key" \
  https://smrtenglish.com/smrtapi/v1/class/456

Response Example (abbreviated):

{
  "success": true,
  "data": {
    "class": {
      "class_id": 456,
      "class_title": "English 101 - Section A",
      "class_code": "ENG101-A",
      "class_status": 1,
      "class_room": "Room 204",
      "class_dateadded": "2024-01-10",
      "course": {
        "course_id": 12,
        "course_name": "General English",
        "course_subtitle": "Beginner Level"
      },
      "teacher": {
        "teacher_id": 78,
        "name": "Jane Smith",
        "email": "[email protected]"
      }
    },
    "summary": {
      "student_count": 25,
      "average_completion_rate": 82.5,
      "average_assignment_score": 78.3,
      "total_engagement_minutes": 1250.5
    },
    "students": [
      {
        "id": 12345,
        "email": "[email protected]",
        "name": "John Student",
        "enrollment_date": "2024-01-15",
        "progress": {
          "assignments": {
            "total_count": 15,
            "completed_count": 12,
            "completion_rate": 80.0,
            "average_score": 85.5
          }
        }
      }
    ]
  }
}

Use Cases

  • Class Roster Management - Get complete list of students enrolled in a class
  • Teacher Dashboards - Display class performance metrics and student progress
  • Class Performance Analysis - Analyze how students are performing in a specific class
  • Attendance Integration - Cross-reference with attendance systems using enrollment data
  • Progress Reports - Generate detailed class progress reports for administrators

Response Format

Returns comprehensive class information with student roster and statistics:

Response Fields - Class Object

Field Type Description
class_id integer Unique class identifier
class_title string Class name/title
class_code string Class code/section identifier
class_status integer Status (0=inactive, 1=active)
course.course_id integer Course identifier
teacher.name string Primary teacher name
teacher.email string Primary teacher email

Response Fields - Summary Object

Field Type Description
student_count integer Number of enrolled students
average_completion_rate float Average assignment completion rate (0-100)
average_assignment_score float Average assignment score (0-100, null if none)
total_engagement_minutes float Total learning time for all students

Response Fields - Students Array

Each student object in the students array includes:

Field Type Description
id integer Student user ID
name string Student full name
email string Student email address
enrollment_date string Date enrolled in class (YYYY-MM-DD)
progress.* object Student's progress statistics in this class

Note: Only registered students are included. The student progress statistics are class-specific.