Dokumentasi API
Smrt English Client API
API hanya-baca (read-only) yang mengirimkan data siswa dan kelas ke sistem institusi Anda. Setiap kunci API (API key) hanya dapat mengakses data institusinya sendiri.
Cara kerjanya
Cara kerja sebuah permintaan.
Sistem Anda meminta data seorang siswa atau sebuah kelas dengan kunci API miliknya sendiri, dan API mengembalikan data tersebut dalam mode hanya-baca.
Smrt English API
Get Student Data Endpoint
Endpoint Details
Endpoint: GET /smrtapi/v1/student/{identifier}
Purpose: Retrieve comprehensive student data including courses, assignments, assessments, and engagement metrics
URL Parameters
{identifier}- Either:- Student ID (numeric, e.g.,
428704) - Student Email (e.g.,
[email protected])
- Student ID (numeric, e.g.,
Headers Required
X-API-Key: your_institution_api_key
Example Requests
# By Student ID curl -H "X-API-Key: your_institution_api_key" \ https://smrtenglish.com/smrtapi/v1/student/12345 # By Email curl -H "X-API-Key: your_institution_api_key" \ https://smrtenglish.com/smrtapi/v1/student/[email protected]
Use Cases
- Individual Student Lookup - Get detailed progress for a specific student
- Parent Portal Integration - Display student progress to parents
- Advisor Dashboard - Monitor advisee performance
- Transcript Generation - Pull complete academic history
- Student Support - Identify areas where student needs help
Response Format
The response includes comprehensive, hierarchical student data:
Response Structure
{
"success": true,
"data": {
"student": {
"id": 12345,
"email": "[email protected]",
"name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"profile_image": "https://example.com/profile.jpg",
"registration_date": "2024-01-15"
},
"summary": {
"assignments": {
"total_count": 45,
"completed_count": 40,
"completion_rate_percentage": 88.9,
"average_score_percentage": 85.5
},
"quizzes": {
"total_count": 12,
"completed_count": 10,
"completion_rate_percentage": 83.3,
"average_score_percentage": 82.0
},
"engagement": {
"total_time_minutes": 450.5,
"skill_breakdown_minutes": {
"grammar": 120.5,
"listening": 85.2,
"reading": 150.3,
"speaking": 45.1,
"writing": 49.4
}
}
},
"courses": [
{
"course_id": 1,
"course_name": "General English",
"classes": [
{
"class_id": 456,
"class_title": "English 101 - Section A",
"teacher": {
"name": "Jane Smith",
"email": "[email protected]"
},
"assignments": [
{
"assignment_id": 789,
"exercise_title": "Grammar Exercise 5",
"score_percentage": 85,
"completion_date": "2024-09-20"
}
],
"assessments": [
{
"assessment_id": 101,
"exam_title": "Mid-Term Assessment",
"overall_score_percentage": 82.5,
"is_student_complete": 1
}
]
}
]
}
]
}
}
Data Hierarchy
- student - Basic profile information
- summary - Aggregate statistics across all courses:
assignments- Assignment metricsquizzes- Quiz/exam metricsengagement- Time spent by skill area
- courses[] - Array of enrolled courses:
classes[]- Classes within each courseassignments[]- Completed assignmentsassessments[]- Quizzes and examsengagement- Course-specific time spent
Response Fields
Student Object
| Field | Type | Description |
|---|---|---|
id |
integer | Unique student user ID |
email |
string | Student email address |
name |
string | Full name |
first_name |
string | Given name |
last_name |
string | Family name |
profile_image |
string | URL to profile photo (if available) |
registration_date |
string | Date student registered (YYYY-MM-DD) |
Summary Object
| Field | Type | Description |
|---|---|---|
assignments.total_count |
integer | Total assignments assigned to student |
assignments.completed_count |
integer | Number of completed assignments |
assignments.completion_rate_percentage |
float | Assignment completion percentage (0-100) |
assignments.average_score_percentage |
float | Average score on completed assignments (0-100, null if none) |
quizzes.total_count |
integer | Total quizzes/exams assigned |
quizzes.completed_count |
integer | Number of completed quizzes/exams |
engagement.total_time_minutes |
float | Total learning time across all courses (minutes) |
engagement.skill_breakdown_minutes |
object | Time spent per skill (grammar, listening, reading, speaking, writing) |
Course Object
| Field | Type | Description |
|---|---|---|
course_id |
integer | Unique course identifier |
course_name |
string | Course name |
classes[] |
array | Array of classes within this course |
Class Object
| Field | Type | Description |
|---|---|---|
class_id |
integer | Unique class identifier |
class_title |
string | Class name/title |
teacher.name |
string | Teacher's full name |
teacher.email |
string | Teacher's email address |
assignments[] |
array | Array of completed assignments for this class |
assessments[] |
array | Array of assessments for this class |
Assignment Object
| Field | Type | Description |
|---|---|---|
assignment_id |
integer | Unique assignment identifier |
exercise_title |
string | Exercise/assignment title |
score_percentage |
integer | Score achieved (0-100) |
completion_date |
string | Date assignment was completed (YYYY-MM-DD) |
Assessment Object
| Field | Type | Description |
|---|---|---|
assessment_id |
integer | Unique assessment identifier |
exam_title |
string | Quiz/exam title |
overall_score_percentage |
float | Overall score (0-100) |
is_student_complete |
integer | Whether student completed assessment (0 or 1) |
Note: Empty or zero-value fields may be omitted from the response to keep it concise.