The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December.
Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
Dear all, I am trying to build a script to get the assignments that a past course has, and the active users are not shown. although on the website, one can access the previously enrolled students, I would like to iterate over the list of past users, and be able to get the file that was uploaded for that course, and for that assignment ...
on the website one can access https://{institution}.instructure.com/courses/{courseID}/users/prior
I have not been able to find the correct call from the API... please if any of you could help me I would be very grateful.
If you want a list of users, rather than enrollments, you can use the List users in a course endpoint.
When you look at the parameters, you see enrollment_state[] that allows you to filter by enrollment state. By default, only "active" and "invited" are returned. You would most likely need to use "completed", although your institution may use "inactive" as well. Since it's an array with the [] at the end, you can use multiple enrollment_state[] parameters.
The list enrollments endpoint allows for similar functionality, except it's state[] rather than enrollment_state[] and you have more options. Enrollments take longer than users to generate.
In both cases, you can filter by the user's role so you just get students rather than instructors, TAs, and other people who have access.
You can also use GraphQL to get the information, which is probably faster when fetching the data, but has a steeper learning curve before you can get the information and the information is harder to process once you get it.
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in