API to download course content

Alistair.Y.947
Alistair.Y.947 Posts: 4 🌱
edited April 13 in Higher Ed / Postsecondary

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: 92 🤝🏼 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?

  • Victor.B.4864
    Victor.B.4864 Posts: 17 🤝🏼 image

    Hi Alistair,

    Brightspace APIs typically return JSON responses containing metadata and references (such as content IDs or URLs). They do not directly provide bulk downloads of the underlying content files.

    For a Content TopicHere, is an example of a JSON response:

    {
    "ActivityId": "https://ids.brightspace.com/activities/contenttopic/Brightspace-357754",
    "IsExempt": false,
    "DueDate": null,
    "Description": {
    "Text": "",
    "Html": ""
    },
    "ParentModuleId": 244219,
    "OpenAsExternalResource": null,
    "TopicType": 1,
    "Url": "/content/victor-folder/Media Library image as Iframe.html",
    "StartDate": null,
    "EndDate": null,
    "IsHidden": false,
    "IsLocked": false,
    "IsBroken": false,
    "ActivityType": 1,
    "ToolId": null,
    "ToolItemId": null,
    "GradeItemId": null,
    "AssociatedGradeItemIds": [],
    "Id": 284475,
    "Title": "Media Library image as Iframe?",
    "ShortTitle": "",
    "Type": 1,
    "LastModifiedDate": "2026-03-23T13:01:55.363Z"
    }

    I hope this meets your needs. Please let me know if you have any further questions or concerns.

    Best regards,

    Victor