Group Enrollment Data Issue (Valence API)

Answers
-
Hi Jame,
For question 1: you don't need to perform two calls to join user attributes, you can call classlist or enrollment endpoints using groupID where endpoints documentation show orgUnitId:
/d2l/api/le/(version)/(orgUnitId)/classlist/
/d2l/api/le/(version)/(orgUnitId)/classlist/paged/
/d2l/api/lp/(version)/enrollments/orgUnits/(orgUnitId)/users/
this is because a group is a special organizational unit, a native one like course offering with all tools available (Content, Quizz, Surveys, Dropbox, etc..). Notice classlist attributes visibility depends on your environment configuration and API respects that configuration:
d2l.Tools.Classlist.DisplayEmail
d2l.Tools.Classlist.DisplayInactiveUsers
d2l.Tools.Classlist.DisplayLastAccessed
d2l.Tools.Classlist.DisplayOrgId
d2l.Tools.Classlist.DisplayProfileImage
d2l.Tools.Classlist.DisplayUsername
I hope it helps.
Best regards,
Sergio
-
Hi Sergio,
Thank you for the reply. When I try to use the groupID in place of the course ou in the classlist call (/d2l/api/le/(version)/(orgUnitId)/classlist/) I get a 403 error, both for my student account and my local admin account (not a top-level admin, but one with more access than a typical instructor account). The call works fine for both my student and local admin accounts with the course OU.
However, even if it returned data for the student account, would it only return data for other students on the same classlist?
The other route (/d2l/api/lp/(version)/enrollments/orgUnits/(orgUnitId)/users/) returns data for my local admin account, but is 403 for when executing in a student context.
-
Hi James,
403 means Forbidden, so I guess your application user is associated with a rol with no access to Classlist on group level, please check "Has Access to the Classlist" permission for your application rol:
There are Enrollment API and ClassList API because represents two things, here a brief summary:
Enrollment API:
- Associated to "User" menu in Admin GUI
- Associated to User Tool in "Roles and Permissions" Admin GUI
- Check "Search for 'xxxx'" permission under OU levels (CourseOffering, Groups, etc) to successfully call Enrollment API and retrieve information for users with role xxxx.
ClassList API:
- Associated to "Classlist" for a course
- Associated to ClassList Tool in "Roles and Permissions" Admin GUI
- Check for "Has Access to the Classlist" permission under OU levels to successfully call ClassList API and retrieve that list.
- Check "Edit Setting" for you learners rol and check those options under "Classlist Display Options" in order to be included in classlist . And, yes, /d2l/api/le/(version)/(orgUnitId)/classlist/ return data for all users which rol is included in ClassList.
So, when you enroll a user it doesn't imply they are included in classlist, it depends on your role configuration and role permission setting for User and ClassList tools, endpoints in valence respect yours environment configuration.
Best regards,
Sergio
-
Hi Sergio,
This setting does grant access to the data. Thanks for the help.
Categories
- All Categories
- 6 Thought Leadership
- 7 Known and Fixed Issues
- 6 Product Roadmap
- 553 Archived
- 10 Accessibility
- 27 Community Corner
- 2 Welcome
- Updates
- Member Spotlights
- 4 Events
- 242 Development
- 746 Customer Enablement
- Evaluate - Assess Student Learning
- Get Comfortable with Brightspace
- Communicate - Engage with Your Students
- 1 Create - Set up your Brightspace course
- Action - Add or create student activities
- 26 Partners
- 8 Product News
- 2022
- 2022 Release Notes
- 2021 Release Notes
- 4 Training
- andycat