Endpoints
Courses, lessons, exercises and checks, progress, explanations, offers and settings.
Courses and lessons
| Method and path | Does |
|---|---|
GET /courses | Courses you can take, with your progress |
GET /courses/{id} | A course, its lessons and checkpoints |
POST /courses | Publish a course folder, or a new version (admin) |
DELETE /courses/{id} | Take a course down (admin); progress is kept |
GET /lessons/{id}?level=&language=&project= | A lesson rendered for a level and language, with the items chosen from the project |
GET /next | The next lesson of your path |
Exercises and checks
| Method and path | Does |
|---|---|
POST /lessons/{id}/exercises | { project } → 201 the exercise, its branch and state |
GET /exercises, GET /exercises/{id} | Your exercises; one of them |
POST /exercises/{id}/check | Run the checks on the branch’s last commit → 202 a run |
GET /exercises/{id}/checks | The runs and the result of each check |
POST /exercises/{id}/hint | One hint, at your level |
POST /exercises/{id}/finish | { keep: true } opens a pull request; { keep: false } deletes the branch |
POST /questions/{lesson}/{question}/answer | Answer a question (a person only) |
Progress
| Method and path | Does |
|---|---|
GET /progress | What you have done |
GET /progress/export | All of it, as JSON |
DELETE /progress | Delete all of it, and the memory notes Learn wrote (a person only) |
Explanations, offers and settings
| Method and path | Does |
|---|---|
POST /explain | { item: { kind, ref }, level?, language? } → an explanation and the lessons that cover it. kind: diff, case, failure, trace, problem, table, column, log, code |
GET /offers | Lessons offered to you right now |
POST /offers/{id}/dismiss | { forever: true } never offers it again |
GET /settings, PATCH /settings | offers, offers_projects, teach_default, language, captions |
The engine
| Method and path | Does |
|---|---|
GET /health | { "status": "ok" } |
/mcp | the MCP server (MCP) |
The OpenAPI document is in the engine’s repository, at spec/openapi.yaml.