The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
Is it possible to ping the API for the last course created in a term?
"Ping" may not be the best word to describe what you are trying to accomplish here.You can most likely work off of whichever course ID has the highest value. In this case you would need to get the last "page" of courses to help narrow your results. Here is a PowerShell example:
USING CANVAS API:
$res = invoke-webrequest "https://school.instructure.com/api/v1/accounts/self/courses?" -method get -headers @{"Authorization" = "Bearer $auth"}
$res.headers.linkThen check the last bit of output. You should see something like
/api/v1/accounts/self/courses?page=11000&per_page=10>; rel="last"
The next step would be to make an API call on that last page.
Invoke-WebRequest "https://school.instructure.com/api/v1/accounts/self/courses?page=11000" -method get -headers @{"Authorization" = "Bearer $auth"}THROUGH CANVAS GUI:
The other option is to run a Provisioning report for courses. When the report is finished, download it, open it in Excel, then sort the courses based on the canvas_course_id.
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in