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.1

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.1
File Size Uploaded Provenance Actions
ol_openedx_course_structure_api-0.3.1.tar.gz 4.5 kB Without provenance Details for ol_openedx_course_structure_api-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 11.6 kB

Release files / ol_openedx_course_structure_api-0.3.1.tar.gz

Download URL ol_openedx_course_structure_api-0.3.1.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
55f53c152f0b9b60c114e237eded46114b40ffcedefdd8fbdfdfa854bdde7af7
BLAKE2b-256 checksum
How to use checksums
46c51bec964eb67b7a035a4f76b81aee97f684b05664654828808ed7ed53fd65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

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

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

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

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