Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Do you guys have any idea why these parameters &per_page=100&page=3
work here
/api/v1/courses/:course_id/users?enrollment_role_id=3&per_page=100&page=3
but doesn't work here
/api/v1/courses/:course_id/enrollments?include[]=current_points&type[]=StudentEnrollment&per_page=100&page=3
i keep getting page 1 data
I don't quite know why it works for one and not for the other, but here are a couple things to look at that may help point you in a direction to help you accomplish what you're trying to accomplish.
First, I'd recommend reading through this if you haven't already - https://community.canvaslms.com/t5/Developers-Group/Am-I-mistaken-or-is-pagination-in-the-quot-List-....
When looking in the developer tools in Chrome, you'll see the response headers for the links are treated a little different between "Users" and "Enrollments." Users will give you a response with page=2, page=3, etc., while Enrollments gives you a response with something like page=bookmark:Ftss3dy2xsbWVu...
You can use that "page=bookmark:..." response to jump to the different pages, but you don't know what bookmark: you're going to get for specific pages.
Hope that helps a little.
I kinda figured we're gonna have to take the long road on this one. I just went ahead with the response headers -> next links.
Thanks @meinhoka
To participate in the Instructure Community, you need to sign up or log in:
Sign In
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.