Is there a way to get the list of courses sorted in descending order by course id from canvas?

Jump to solution
cph2
Community Contributor

Hi all, 

I am trying to write a script that lets me associate a blueprint course with all new courses - but only new courses. Does anyone have a suggestion as to how to find the courses by creation date or course id to allow me to identify the new ones?

Thanks!

Labels (1)
1 Solution
pklove
Community Champion

You can do it with the "List active courses in an account" endpoint.  The sort parameter takes undocumented fields, so you can use id.  For example:

    .../api/v1/accounts/1/courses?sort=id&order=desc

Or with created_at:

   .../api/v1/accounts/1/courses?sort=created_at&order=desc

View solution in original post