AnsweredAssumed Answered

How do I get more than 100 courses returned via the API?

Question asked by mbuchanon on Aug 24, 2018
Latest reply on Sep 5, 2018 by goh.ian

So, I'm trying to return a list of all courses on a site using the v1 or the v2 courses API using a URI like:

 

$coursesapiuri = "$baseurl/learn/api/public/v2/courses?fields=id,externalId,courseId,name"

 

Everything works just fine.  However, this only returns 100 courses.  If I try to add "limit=10000" I get the following response:

 

{"status":400,"message":"Failed to load courses/orgs.:Paging limit may not exceed 100"}

 

We have faculty that have more than 100 courses and we'll want to do things to all courses on the system or all courses that meet certain criteria. 

 

Our instance is at Release 3400.11.0-rel.2+11d8a47.

 

So, any thoughts on how to work around this?  Do I just need to ask for an increased pagination limit?  Is there some secret, undocumented (like the paging not exceeding 100 was) way to make this work?

 

This is a fairly frustrating, seemingly arbitrary limit to bump into when trying to gather some information at 4:30pm on a Friday   So, any thoughts or help will be greatly appreciated!  Have a great weekend all!

/mtb

Outcomes