Complete API reference for Study Planet Education Consultancy
Base URL: http://localhost:8001
/api/test
Returns API status and basic statistics.
{
"message": "API is working!",
"status": "success",
"timestamp": "2024-01-01T12:00:00.000000Z",
"data": {
"courses_count": 8,
"mock_tests_count": 6,
"users_count": 4
}
}
/api/courses
Returns a list of all active courses.
{
"status": "success",
"data": [
{
"id": 1,
"course_name": "IELTS Academic Preparation",
"description": "Comprehensive IELTS preparation...",
"exam_type": "IELTS",
"price": "15000.00",
"is_active": true,
"created_at": "2024-01-01T12:00:00.000000Z",
"updated_at": "2024-01-01T12:00:00.000000Z"
}
]
}
/api/courses/{id}
Returns details of a specific course.
id (integer, required) - Course ID/api/mock-tests
Returns a list of all active mock tests.
{
"status": "success",
"data": [
{
"id": 1,
"title": "IELTS Academic Full Mock Test",
"description": "Complete IELTS Academic mock test...",
"exam_type": "IELTS",
"price": "500.00",
"total_time": 180,
"is_active": true,
"created_at": "2024-01-01T12:00:00.000000Z",
"updated_at": "2024-01-01T12:00:00.000000Z"
}
]
}
/api/mock-tests/{id}
Returns mock test details along with all questions.
id (integer, required) - Mock Test ID/db-test
Returns comprehensive database statistics and sample data.
{
"status": "success",
"database": "connected",
"tables": {
"courses": 8,
"mock_tests": 6,
"users": 4
},
"sample_data": {
"courses": [...],
"mock_tests": [...]
}
}