To Our Amazing Educators Everywhere,
Happy Teacher Appreciation Week!
Found this content helpful? Log in or sign up to leave a like!
Is there a way to access an 'edited by' field for different elements of the system, specifically calendar event, assignments, wiki page, etc?
I see both a created and modified time/date stamp but not sure as to identify last editor.
Please let me know.
Chris
Good afternoon Christopher,
You may already be aware, but per the Calendar Events API, there does not appear to be an attribute for determining "who" last updated an event, just the date/time, unfortunately.
Is here another way to obtain this information? Is there a logging api whereas I could match up the event and see the modifications?
Chris
Canvas does have a Course Audit log API, but according to documentation it will only work if your instance has audit logs configured.
Here's a PowerShell command to get you started:
(Invoke-RestMethod https://yourCanvasInstance.instructure.com/api/v1/audit/course/courses/:course_id -method get -headers @{"Authorization" = "Bearer $auth"}).links
I do not have a test case where I found actual audit logs (I'll have to check if we have this setup), but this is the closest method I can find to automating this.
Edit: You may need to access the "events" attribute, not links
(Invoke-RestMethod https://yourCanvasInstance.instructure.com/api/v1/audit/course/courses/:course_id -method get -headers @{"Authorization" = "Bearer $auth"}).events
To participate in the Instructure Community, you need to sign up or log in:
Sign In