Found this content helpful? Log in or sign up to leave a like!
Getting a list of ALL courses.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the API:
GET /api/v1/courses
The API is returning a subset of my courses, and I can't determine why. It doesn't seem to matter whether I'm a teacher, student or observer.
I am wanting a list of all classes where I am a teacher, regardless of whether it is currently active or not.
Assistance is appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Based on the description you give, there's a high probability that you're experiencing the built-in pagination, which limits the number of results to 10 in most cases.
If all of your responses never have more 10 responses, then this is almost certainly a component of the problem.
Try adding per_page=100 to your query string: GET /api/v1/courses/per_page=100. And no, when you get over 100 courses, you cannot make that 100 any larger.
There are other things that might be going on, but for teachers and admins, you get all of your courses that aren't deleted by default and you probably don't care about the deleted courses. That makes me strongly suspect it's a pagination issue.