AnsweredAssumed Answered

Get all sub accounts for a user

Question asked by Sheena Patel on Sep 22, 2016
Latest reply on Nov 7, 2016 by Sheena Patel

I need to find all sub accounts which a user belongs to. So far the best method I can do this is by...

  1. Get all Enrollments for a user
    • /api/v1/users/:user_id/enrollments
  2. For each enrollment (which contains a CourseID), get Course details
    • /api/v1/courses/:course_id
  3. For each Course (which contains the AccountID), get Sub Account details
    • /api/v1/accounts/:account_id/sub_accounts


Is this the best way to get the sub account details for a specific user?


In addition... I need to figure out which sub accounts an admin may belong to as we have Account Admins added per sub account. Again how would I go about finding this information?


Thanks in advance!