[ARCHIVED] Course API page is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was using this API to get all users enrolled in course, there are more than 1000 users in the course, it worked before , but now no matter the page is it's only return same 100 results.
/api/v1/courses/8773/enrollments?per_page=100&page=1
/api/v1/courses/8773/enrollments?per_page=100&page=2
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Canvas has switched to using bookmarks for the enrollments API and the numeric pages are no longer supported. See 2020-06-20 in the Canvas API change log. It was announced several months before (I don't remember when exactly, but I was warning people about it back in February 2020). Still several people missed the announcement.
Officially, they were never supported, they were just used and a bunch of people wrote their code based off the pattern that was used. You need to follow the documentation on using Pagination about using the Next link header to determine the proper page in the sequence.
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.