Retrieve a course's block tree with per-block student view data using the Open edX Course Blocks API

domain: docs.openedx.org · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Call the Course Blocks API for a course/root usage key, passing the username of the learner whose personalized view you want, or omitting it for a staff/anonymous view.
  2. Use the depth parameter to control how many levels of the block tree are returned, or pass all to retrieve the full tree in one call.
  3. Pass a comma-separated block_counts parameter listing block types (e.g. video) to get an aggregate count of that block type under each returned block and its descendants.
  4. Pass a student_view_data parameter listing block types whose rendering-ready JSON payload you want included; only the block types you list there get student_view_data populated in the response.
  5. Combine block_counts and student_view_data in a single request when you need both counts and payloads for the same block type, instead of issuing separate calls.

Known gotchas

Related routes

Retrieve and process course completion data from an Open edX instance via its REST API
openedx.org · 5 steps · unrated
Configure and call Open edX REST APIs to retrieve course structure and enrollment data
edx.org · 6 steps · unrated
Create nested Learning Module / Folder content structure in a Blackboard Learn Ultra course via the REST Content API
developer.blackboard.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans