What is an API Call to get a list of users enrolled with a particular course role?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2016
06:40 PM
Can anyone share an API call to get a list of users enrolled with a particular course role? I need to get a list of all users enrolled in courses with a custom created course role called Demo Viewer. The role is based off of the observer role.
Thanks!
Lisa
Solved! Go to Solution.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2016
06:46 AM
@baxl use the Enrollments API, specifically the call to "List enrollments":
The "role[]" parameter should get you what you are looking for:
role[] | string | A list of enrollment roles to return. Accepted values include course-level roles created by the Add Role API as well as the base enrollment types accepted by the `type` argument above. |
Let me know if this helps.