[ARCHIVED] Canvas account > get all courses api doesn't seem to return all courses

Jump to solution
arthurgr
Community Member

I'm currently logged into my canvas testing site as an Admin user. You can see in the screenshot below I've navigated to the course list page and filtered by the word "Test". Several courses show up with "Test" in the title.

1.jpg

Next, I created an access token for my Postman application so I can move forward with a simple account > GET all courses API call. I've added the query parameter "per_page=10000000" to make sure my results aren't capped.

https://example.test.instructure.com/api/v1/accounts/1/courses?per_page=100000000

2.jpg

You can see in the screenshot above, when I try and search my course list payload for the word "Test", I'm only seeing one out of the the four courses that are displayed on my GUI. Am I missing something here? Why doesn't this API request return all courses?

Labels (2)
0 Likes
1 Solution
arthurgr1
Community Member

I learned that the API request payload is capped at 100 results, and that I need to use the pagination API to return all API results

https://canvas.instructure.com/doc/api/file.pagination.html

View solution in original post

0 Likes