Group Enrollment Data Issue (Valence API)

I am trying to resolve an issue with group enrollments. I have an internally-developed app that makes a call to get the enrollment for the groups that the calling user (i.e. student) is a member of using this route:

 

 

/d2l/api/lp/(version)/(orgUnitId)/groupcategories/(groupCategoryId)/groups/

 

 When the enrollment data is returned, it gives me the user id numbers of each person enrolled in the group. However, my app needs to display the name(s) of those people, not their ID numbers.

 

To solve this, I make a call to get the classlist, and I essentially look up the ID from the group enrollment to match it with the correct name from the classlist. This has worked fine until now.

 

The problem now is that we have a class that is made up of multiple sections, with students from different sections being put together in groups. The group enrollment API call still works fine, returning the ID numbers for everyone in the group. However, the classlist call only returns students who are on the same classlist at the student in whose context the app is executing the calls. This results in not being able to look up names for some members of the group, as they don't appear on a classlist that the student can receive data for.

 

I have tried other API routes to get the name of the students enrolled in the groups, but they all return 403 when called from a student context.

 

So, my question(s):

 

  1. What routes should I be using to match id numbers to names?
  2. Should all the user routes (e.g. /d2l/api/lp/(version)/demographics/users/(userId) or /d2l/api/lp/(version)/users/(userId)) be returning 403?