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 <SPAN class="operator token">=</SPAN> invoke<SPAN class="operator token">-</SPAN>webrequest <SPAN class="string token"><SPAN>"</SPAN><A class="jive-link-external-small" href="https://school.instructure.com/api/v1/accounts/self/courses" rel="nofollow noopener noreferrer">https://school.instructure.com/api/v1/accounts/self/courses</A><SPAN>?"</SPAN></SPAN> <SPAN class="operator token">-</SPAN>method <SPAN class="keyword token">get</SPAN> <SPAN class="operator token">-</SPAN>headers @<SPAN class="punctuation token">{</SPAN><SPAN class="string token">"Authorization"</SPAN> <SPAN class="operator token">=</SPAN> <SPAN class="string token">"Bearer $auth"</SPAN><SPAN class="punctuation token">}</SPAN><BR />$res<SPAN class="punctuation token">.</SPAN>headers<SPAN class="punctuation token">.</SPAN>link<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN></SPAN>
Then 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<SPAN class="operator token">-</SPAN>WebRequest <SPAN class="string token"><SPAN>"</SPAN><A class="jive-link-external-small" href="https://school.instructure.com/api/v1/accounts/self/courses?page=11000" rel="nofollow noopener noreferrer">https://school.instructure.com/api/v1/accounts/self/courses?page=11000</A><SPAN>"</SPAN></SPAN> <SPAN class="operator token">-</SPAN>method <SPAN class="keyword token">get</SPAN> <SPAN class="operator token">-</SPAN>headers @<SPAN class="punctuation token">{</SPAN><SPAN class="string token">"Authorization"</SPAN> <SPAN class="operator token">=</SPAN> <SPAN class="string token">"Bearer $auth"</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
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.
I'm building a tool for my institution that imports grades from another LTI tool into Canvas so instructors can automate late assignment policies not otherwise supported by Canvas. I'm trying to use the LTIv1.3 ID which is readily available on the LTI-side as a link to the student record on Canvas, but I can't find the ID…
How can one track Canvas Media use without having the reports available from Canvas Studio? Checking API endpoints and the Data 2 schema, there do not seem to be dedicated Canvas Media endpoints. Am I missing some? A method I've considered is using the body field of the wiki_pages table, as this contains the html code of…
Hello, I'm trying to utilize an API call to pull completed certificates and was hoping to download and store the certs as a backup. I can successfully run the API call but it will not allow me to view the certificate unless I access the URL while signed into an account where it's "my" cert. Is there a permissions setting…
UI for weekly progression idea that rest in the Schedule tab of the **K-12 UI** of Canvas it's incomplete and I really would not take it and push it into instance but I am going to post it here because in the past people like @James && @robotcars || @Steve_25 have had terrific input in the past... maybe w/their eyes and…
I have a new React + Flask webapp. It has its own login for users to start using the app. I have added this as an external tool in Canvas. What I want initially is to see of canvas users can start using the webapp without having to login if they click on the external tool link in a canvas course. I have 2 methods…