API to download course content

Alistair.Y.947
Alistair.Y.947 Posts: 4 🌱

I have used the BDS API to get as far as Content Object schema Plugin extracts to download a CSV file of content:

ContentObjectId,OrgUnitId,Title,ContentObjectType, …
11111111,222222,File,Topic, …

Is there a way to programmatically download, via an API, the ContentObjectId from the OrgUnitId?

Tagged:

Answers

  • Ashwin.R.60
    Ashwin.R.60 Posts: 89 🤝🏼 image

    Hello @Alistair.Y.947

    Thankyou for reaching out to the Brightspace Community.

    To programmatically retrieve ContentObjectId values for a given OrgUnitId, you can use the Brightspace Content API:

    GET /d2l/api/le/(version)/{orgUnitId}/content/root/

    and

    GET /d2l/api/le/(version)/(orgUnitId)/content/modules/(moduleId)/structure/

    These endpoints return all content modules, topics, and their ContentObjectIds.

    You’ll find these under:

    Valence API > Learning Environment (LE) > Content
    https://docs.valence.desire2learn.com/reference.html

    • Get root-level modules
      GET /d2l/api/le/(version)/{orgUnitId}/content/root/
    • Get the structure of a module (children, topics, submodules)
      GET /d2l/api/le/(version)/{orgUnitId}/content/modules/{moduleId}/structure/
    • Get topic details (files, links, metadata)
      GET /d2l/api/le/(version)/{orgUnitId}/content/topics/{topicId}

    These endpoint returns the entire hierarchical content structure including:

    Id → ContentObjectId
    Title
    Type (Module, Topic, Link, etc.)
    Child objects

    From this response you can extract Id → ContentObjectId

    Alternatively, you mentioned you're already pulling the Content Object Schema Plugin (BDS).
    BDS is not a live API — it is an asynchronous data export — but it does provide:

    ContentObjectId
    OrgUnitId
    Title
    ContentObjectType
    etc.

    >How to use BDS:

    Call Data Hub API to request the dataset download link
    Download the CSV
    Filter rows by OrgUnitId

    Hope this helps.

    Regards,

    Ashwin Ravi

  • Alistair.Y.947
    Alistair.Y.947 Posts: 4 🌱

    thanks Ashwin, does that allow me to download the actual content?