본문 바로가기

API 문서

Smrt English Client API

학생과 클래스 기록을 기관의 시스템으로 제공하는 읽기 전용 API입니다. 각 API 키(API key)는 해당 기관의 데이터에만 접근할 수 있습니다.

테스트 허브 열기

작동 방식

요청 처리 방식

기관의 시스템이 자체 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.