Get List of users through Canvas API

Jump to solution
Community Member

I can't retrieve all the users from Canvas, even though I've set per_page=100. I'm using this API: '{account_id}/users?per_page=100'.

What could be the issue?

Thanks in advance

1 Solution
Community Coach
Community Coach

Hi @SravanMaru,

In addition to the guidance provided by @james_whalley about replacing the URL and account_id, I wanted to mention that setting the per_page to 100 does not guarantee that you'll get all results, just that you would get the first 100 (assuming the API supports a per_page of 100, which most Canvas ones do right now).  In order to guarantee that you get all results, you should really be looking at and handling Pagination in the code you're using to fetch results.

Let us know if any of this helped, or if we're missing the mark please provide some more details about what you're getting vs what you expect to get from the API.


View solution in original post