Getting the content of the html using Brightspace API
Zuzanna.G.8744
Posts: 2 🔍
in Development
Dear Community,
I am working with the Brightspace API and using the following call to get the structure of the course content:
{{BrightspaceDomain}}/d2l/api/le/{{leversion}}/{{OrgUnitId}}/content/root/
In the description of the modules, from the HTML, I can extract information about whether the module contains an image, text, video, or specific learning activities.
However, when I use the following call:
{{BrightspaceDomain}}/d2l/api/le/{{leversion}}/{{OrgUnitId}}/content/topics/{{TopicId}}
I see that the description text and HTML fields are empty. Is this normal? Is there a setting that can be enabled to display the content? Or do I need to use the URL or ActivityId to retrieve the content somehow? I've tried making other calls but have been unable to retrieve the content of the page.
Use case for accessing the content (not just structure and titles):
A page in Brightspace (i.e., a topic) can include multiple learning activities. For example, for the title "Introduction," the student might need to read the content of the page, watch a video, and view a link. Without access to either the HTML or the files, I cannot determine what the student needs to do on the page.
Any guidance on how to retrieve this content would be greatly appreciated.
I am working with the Brightspace API and using the following call to get the structure of the course content:
{{BrightspaceDomain}}/d2l/api/le/{{leversion}}/{{OrgUnitId}}/content/root/
In the description of the modules, from the HTML, I can extract information about whether the module contains an image, text, video, or specific learning activities.
However, when I use the following call:
{{BrightspaceDomain}}/d2l/api/le/{{leversion}}/{{OrgUnitId}}/content/topics/{{TopicId}}
I see that the description text and HTML fields are empty. Is this normal? Is there a setting that can be enabled to display the content? Or do I need to use the URL or ActivityId to retrieve the content somehow? I've tried making other calls but have been unable to retrieve the content of the page.
Use case for accessing the content (not just structure and titles):
A page in Brightspace (i.e., a topic) can include multiple learning activities. For example, for the title "Introduction," the student might need to read the content of the page, watch a video, and view a link. Without access to either the HTML or the files, I cannot determine what the student needs to do on the page.
Any guidance on how to retrieve this content would be greatly appreciated.
Tagged:
Answers
-
Hi Zuzanna,
I believe this API call that allows you to retrieve the content topic file for a content topic should help.
GET /d2l/api/le/(version)/(orgUnitId)/content/topics/(topicId)/file
See
Hope that helps!