Is there an API call to retrieve list of all courses with orgUnitId's?
I am looking for a specific non-course and I need a way to dynamically retrieve the orgUnitIds.
Answers
-
Hi @Bobby Ross I dont think we have one. We will have to use the data sets in Data Hub.
-
Thank you for the response Naren. I'll look into that.
-
May be this: http://docs.valence.desire2learn.com/res/orgunit.html#get--d2l-api-lp-(version)-orgstructure-, you can filter by typeID = 3 (I think this is for Course Offering).
Notice the result is paged and you'll need "Can Create and Edit Org Units" permission in "Org Unit Editor" tool for your user-api rol.
-
Hi @Sergio Sepúlveda : That is correct and a good find. The reason I did not mention that was because of the complexity around taking the information you want as it gives the properties of all the org units. Compared to this, Data Hub is a lot easier. Again, a good find.😊
-
@Phyllis Shen might have some advice as well.
-
Call several APIs:
- Find your organization orgUnitId: /d2l/api/lp/1.9/organization/info
- Retrieve orgstructure: /d2l/api/lp/1.9/orgstructure/
- Retrieve outypes: /d2l/api/lp/1.9/outypes/
- Retrieve a list of all semesters: /api/lp/1.9/orgstructure/6606/descendants/?ouTypeId=5 (for example, root organization orgUnitId 6606, semester ouTypeId )
- List courses during a particular semester: /d2l/api/lp/1.9/orgstructure/41207/children/ (semester Winter 2017 Identifier: 41207)
Additionally, list courses from Department, course template structure:
- List department: /api/lp/1.9/orgstructure/6606/descendants/?ouTypeId=101 (department ouTypeId 101)
- Retrieve the course templates within a department: /d2l/api/lp/1.9/orgstructure/6607/children/ (Administration department 6607)
- List the courses listed within a department, a course template: /d2l/api/lp/1.9/orgstructure/6607/descendants/?ouTypeId=3 (by specifying the ouTypeId for a course template)