API Endpoints
Get All Subjects
GETReturns list of all active subjects with their icons and display order.
Test EndpointGet Chapters by Subject
GETReturns all chapters for a specific subject along with question counts.
Test EndpointGet Questions by Subject (Study Mode)
GETReturns ALL questions for a subject in study mode (unlimited). Optional: &chapter=ChapterName to filter by chapter.
Test EndpointGet Questions by Subject (Mock Test Mode)
GETReturns EXACTLY 10 random questions for mock test. Optional: &chapter=ChapterName to filter by chapter.
Test EndpointGet Questions by Subject and Chapter
GETReturns all questions for a specific subject and chapter. Chapter name must match exactly.
Test EndpointSubmit Test Result
POSTSubmit test results with scores and statistics. Requires JSON body: {"subject_id": 1, "total_questions": 10, "correct_answers": 7, "wrong_answers": 3}
Get Dashboard Statistics
GETReturns dashboard statistics including total subjects, questions, chapters, and recent test results.
Test Endpoint🔗 Flutter Integration
Update your Flutter app's base URL:
class ApiService { static const String baseUrl = 'https://gk.apsterminal.com/api/'; // For Android Emulator: http://10.0.2.2/gk_quiz_backend/api/ // For Real Device: http://192.168.1.X/gk_quiz_backend/api/ }
⚠️ Default Admin Credentials
Username: admin
Password: admin123
Please change the password after first login!