API құжаттамасы
Smrt English Client API
Білім алушылар мен топтар туралы деректерді оқу орныңыздың жүйелеріне беретін, тек оқуға арналған API. Әр API кілті (API key) тек өз оқу орнының деректеріне қол жеткізеді.
Қалай жұмыс істейді
Сұрау қалай жұмыс істейді
Жүйеңіз білім алушы немесе топ деректерін өз API кілтімен (API key) сұрайды, ал API деректерді тек оқу режимінде қайтарады.
Smrt English API
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.