Learning Engine API Documentation
RESTful API for managing courses, modules, lessons and tracking learning metrics.
Course Structure
Courses → Modules → Lessons Hierarchy
{
"course": {
"id": "string",
"title": "string",
"description": "string",
"modules": [
{
"id": "string",
"title": "string",
"lessons": [
{
"id": "string",
"title": "string",
"exercises": [
{
"id": "string",
"type": "speaking|listening|vocabulary|grammar|speak-brave"
}
]
}
]
}
]
}
}
API Endpoints
GET
/api/courses
Retrieve all available courses
// Response
[
{
"id": "course-123",
"title": "Beginner English",
"description": "Basic English for beginners",
"language": "en",
"difficulty": "beginner"
}
]
POST
/api/courses
Create a new course (Admin only)
// Request Body
{
"title": "Advanced English",
"description": "Advanced English course",
"language": "en",
"difficulty": "advanced"
}
// Response
{
"id": "course-456",
"status": "created"
}
Progress Tracking
PATCH
/api/lessons/{lessonId}/progress
Update lesson progress metrics
// Request Body
{
"speaking": {
"score": 75,
"timeSpent": 120,
"attempts": 3
},
"listening": {
"score": 80,
"timeSpent": 90,
"attempts": 2
},
"vocabulary": {
"score": 90,
"timeSpent": 60,
"attempts": 1
},
"grammar": {
"score": 70,
"timeSpent": 150,
"attempts": 4
},
"speakBraveScore": {
"confidence": 85,
"clarity": 80,
"fluency": 75,
"emotionalImpact": 90
},
"confidence": 85,
"completionStatus": "completed",
"masteryPercentage": 78.75
}
// Response
{
"lessonId": "lesson-789",
"updated": true,
"report": {
"totalTime": 420,
"totalAttempts": 10,
"weakestArea": "grammar",
"nextSteps": [
"Review past tense exercises",
"Practice with audio drills",
"Complete bonus vocabulary quiz"
]
}
}