Problems pulling course list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello. I am trying to pull a list of courses for a institution that I am working for. I have used both the /doc/api/live website and the Postman tool for making the web API calls. No matter which tool I use to make the call, I keep getting the same short list of 5 courses. I know for fact that the school has over a thousand courses active for this term.
Using the /docs/api/live website, I have put in a token value which works for all other calls.
The generated URL value is: https://<name:.instructure.com:443/api/v1/courses
In Postman I am using the same URL with an Authorization Token of Bearer with the token value included.
I have also tried putting the token value directly into the URL with the access_token parameter.
I also have included the &Page= and &Per_Page parameters with the page # value of varying values between 1 and 10 and the Per_Page parameter with varying values between 3 and 20.
In all cases of calls (api/live and Postman) I consistently receive the same list of 5 courses.
Does anyone have any idea of what I am doing wrong?
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The API call you're using is List your courses from the Courses API.
GET /api/v1/courses
Returns the paginated list of active courses for the current user.
If you want a list of all of the active courses, then use the List active courses in an account from the Accounts API instead.
GET /api/v1/accounts/:account_id/courses
Retrieve a paginated list of courses in this account.
Also, I'm not sure if it matters, but page and per_page are usually lowercase. per_page can often go up to 100.