Skip to main content

Course Structure API Plugin

A django app plugin to add a new API to Open edX to retrieve the JSON representation of course structure

Version Compatibility

For this plugin’s compatibility with Open edX, see the Open edX Release Compatibility table.

Installation

For detailed installation instructions, please refer to the plugin installation guide.

Installation required in:

  • LMS

How To Use

The API supports a GET API call with two optional query parameters
  • inherited_metadata : include inherited metadata at course level (default to false)

  • inherited_metadata_default: include default values of inherited metadata (default to false)

To call the API, it requires superuser account for GET request to <LMS_BASE>/api/courses/v0/<course_id>/:

The successful response for http://local.openedx.io:8000/api/course-structure/v0/course-v1:edX+DemoX+Demo_Course/ would look like:

 {
        "block-v1:edX+DemoX+Demo_Course+type@chapter+block@1414ffd5143b4b5": {
            "category": "chapter"
            "children": [
                         "block-v1:edX+DemoX+Demo_Course+type@chapter+block@d8a6192ade314473a78242dfeedfbf5b",
                         "block-v1:edX+DemoX+Demo_Course+type@chapter+block@interactive_demonstrations",
                         "block-v1:edX+DemoX+Demo_Course+type@chapter+block@graded_interactions"
                        ]
             "metadata": {"display_name":"Example Week 1: Getting Started"}
       },
        "block-v1:edX+DemoX+Demo_Course+type@chapter+block@d8a6192ade314473a": {
            "category": "chapter"
            "children": ["block-v1:edX+DemoX+Demo_Course+type@sequential+block@edx_introduction"]
            "metadata": {"display_name":"Example Week 2: Get Interactive"}
       },
}

The successful response for http://local.openedx.io:8000//api/course-structure/v0/course-v1:edX+DemoX+Demo_Course/?inherited_metadata=true&inherited_metadata_default=true would look like:

{
       "block-v1:edX+DemoX+Demo_Course+type@chapter+block@1414ffd5143b4b5": {
           "category": "chapter"
           "children": [
                        "block-v1:edX+DemoX+Demo_Course+type@chapter+block@d8a6192ade314473a78242dfeedfbf5b",
                        "block-v1:edX+DemoX+Demo_Course+type@chapter+block@interactive_demonstrations",
                        "block-v1:edX+DemoX+Demo_Course+type@chapter+block@graded_interactions"
                        ]
            "inherited_metadata": {
                      "name":null,
                      "course_edit_method":"Studio",
                      "graceperiod":"18000 seconds",
                      "graded": false,
                       ----
                      "self_paced":false,
                      "start":"2013-02-05T05:00:00Z",
                      "xqa_key":"qaijS3UatK020Wc0sfCtFe0V6jpB4d64"
                      }
            "metadata": {"display_name":"Example Week 1: Getting Started"}
        },
       "block-v1:edX+DemoX+Demo_Course+type@chapter+block@d8a6192ade314473a": {
           "category": "chapter"
           "children": ["block-v1:edX+DemoX+Demo_Course+type@sequential+block@edx_introduction"]
           "inherited_metadata": {
                      "name":null,
                      "course_edit_method":"Studio",
                      "graceperiod":"18000 seconds",
                      "graded": false,
                       ----
                      "self_paced":false,
                      "start":"2013-02-05T05:00:00Z",
                       "xqa_key":"qaijS3UatK020Wc0sfCtFe0V6jpB4d64"
                      }
           "metadata": {"display_name":"Example Week 2: Get Interactive"}
      },
}

Metadata

Release files for ol-openedx-course-structure-api 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ol-openedx-course-structure-api 0.3.0
File Size Uploaded Provenance Actions
ol_openedx_course_structure_api-0.3.0.tar.gz 4.4 kB Without provenance Details for ol_openedx_course_structure_api-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ol-openedx-course-structure-api 0.3.0
File Interpreter ABI Platform Actions
ol_openedx_course_structure_api-0.3.0-py3-none-any.whl Python 3 none any Details for ol_openedx_course_structure_api-0.3.0-py3-none-any.whl

Total release size: 11.5 kB

Release files / ol_openedx_course_structure_api-0.3.0.tar.gz

Download URL ol_openedx_course_structure_api-0.3.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
df622dae547cbaf23bb71e0467ab238b39557217ddadb4f1dca728c3a4adcee3
BLAKE2b-256 checksum
How to use checksums
55b4dd59b2dfac0bb4747080bcaf855da779acd04ba4a979cb2856f1b866d9b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / ol_openedx_course_structure_api-0.3.0-py3-none-any.whl

Download URL ol_openedx_course_structure_api-0.3.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb23ba83160fa3a4b83cdb18bee799ea4988870a8ba9c465969fe55ec391d350
BLAKE2b-256 checksum
How to use checksums
02047f23942c5b8ba9f6977cf4d10daa5b255fae972459081600ecb7f392df23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for ol-openedx-course-structure-api 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page