Grades for student

Is there an endpoint in the LMS api that allows a student to retrieve only their own grades for a course?

Hi @jw56578! There is no separate endpoint but you can use a query string specifying a username to retrieve the grade for a particular user and course:

/api/grades/v1/courses/{course_id}/?username={username}

For example:

api/grades/v1/courses/course-v1:edX+DemoX+Demo_Course/?username=awesome-learner

A regular learner will get a 200 response when doing this for their own user, and a 403 when trying to obtain the grade for a different user.

Staff users will get a meaningful response for all users that are enrolled in the course.

Whatever the role of the user attempting this, they must authenticate in order to successfully request data from this endpoint.

Thanks for the response, but I meant is there one that returns all the individual grades for the individual assignments.

Oh, OK :slight_smile: Off the top of my head I think there isn’t. In general, a useful resource to look at if you want to get info on endpoints that the Open edX REST API provides is https://courses.edx.org/api-docs/.