REST API for querying user's course groups

Idea created by wt0069224 on Nov 13, 2017
    Under review
    Score0

    Would it be possible to add a REST endpoint for querying a user's Course Group memberships?

    At the moment, to determine the groups that a user belongs to, we have to use
    /learn/api/public/v1/users/{userId}/courses
    then iterate over the results of that with
    /learn/api/public/v1/courses/{courseId}/groups
    and iterate over these results with
    /learn/api/public/v1/courses/{courseId}/groups/{groupId}/users/{userId}
    leading to potentially many queries for a single user, eg: 21 queries if the user is in four subjects with four groups in each.

    If we could have an endpoint that was something like:
    /learn/api/public/v1/users/{userId}/groups
    that returned a list of group IDs and their associated subjects, it would drastically reduce the number of queries we would need to make to ensure that a particular user's information is in agreement with our back-end systems.

    Product Version (if applicable):1