API
A REST API for JomBeelajar is on the roadmap.
Placeholder: the API is not public yet. The endpoints marked live exist because the web app uses them, but they only accept a signed-in session, are not documented as stable, and may change without notice. API keys do not exist yet.
Authenticating (planned)
Once API keys ship, requests will send the key as a bearer token.
curl -H "Authorization: Bearer jb_..." https://jombeelajar.taufikhamid.com/api/v1/subjectsSubjects and topics
- GET
/api/subjectsLiveList subjects.
Auth: signed-in session cookie only
Response: application/json
- GET
/api/subjects/{slug}LiveGet one subject.
Auth: signed-in session cookie only
Response: application/json
- GET
/api/subjects/{slug}/chaptersLiveList a subject's chapters.
Auth: signed-in session cookie only
Response: application/json
- GET
/api/subjects/{slug}/chapters-with-topicsLiveList a subject's chapters with their topics.
Auth: signed-in session cookie only
Response: application/json
- GET
/api/topics/{topicId}LiveGet one topic.
Auth: signed-in session cookie only
Response: application/json
- GET
/api/topics/randomLiveGet a random topic.
Auth: signed-in session cookie only
Response: application/json
Quizzes
- GET
/api/quizzes-listLiveList quizzes. Optional ?topicId filters by topic.
Auth: signed-in session cookie only
Response: application/json
- GET
/api/quizzes/randomLiveGet a random quiz.
Auth: signed-in session cookie only
Response: application/json
- GET
/api/quiz/{quizId}LiveGet a quiz.
Auth: signed-in session cookie only
Response: application/json
- POST
/api/quiz/{quizId}/submitLiveSubmit answers for a quiz attempt.
Auth: signed-in session cookie only
Response: application/json
- GET
/api/quiz/{quizId}/commentsLiveList comments on a quiz.
Auth: signed-in session cookie only
Response: application/json
- POST
/api/quiz/{quizId}/commentsLiveComment on a quiz.
Auth: signed-in session cookie only
Response: application/json
Leaderboard and schools
- GET
/api/leaderboardLiveStudent leaderboard. ?timeFrame=daily|weekly|allTime.
Auth: signed-in session cookie only
Response: application/json
- GET
/api/leaderboard/schoolsLiveSchool leaderboard.
Auth: signed-in session cookie only
Response: application/json
- GET
/api/schoolsLiveList schools.
Auth: signed-in session cookie only
Response: application/json
- GET
/api/schools/{id}LiveGet one school.
Auth: signed-in session cookie only
Response: application/json
Profile and progress
- GET
/api/profile/{userId}LiveGet a user's public profile.
Auth: signed-in session cookie only
Response: application/json
- GET
/api/profile/{userId}/achievementsLiveList a user's achievements.
Auth: signed-in session cookie only
Response: application/json
- GET
/api/dashboardLiveDashboard data for the signed-in user.
Auth: signed-in session cookie only
Response: application/json
- GET
/api/me/progressLiveThe signed-in user's learning progress.
Auth: signed-in session cookie only
Response: application/json
- PATCH
/api/meLiveUpdate the signed-in user's profile.
Auth: signed-in session cookie only
Response: application/json
Planned
- GET
/api/v1/subjectsPlannedVersioned, API-key-authenticated list of subjects.
- GET
/api/v1/quizzesPlannedVersioned, API-key-authenticated list of quizzes.
- GET
/api/v1/me/progressPlannedYour progress, readable with an API key.
- GET
/api/keysPlannedList your API keys (without their secret values).
- POST
/api/keysPlannedCreate a new API key.
- DELETE
/api/keys/{id}PlannedRevoke an API key.