Showing results for 
Show  only  | Search instead for 
Did you mean: 
Community Participant

content_migrations API - Holding Users Accountable

The Short of It: Basically I want to show when a teacher (or any user) has imported on top of their course, and what exactly they imported.

The Long of It: My institution uses the API to import "dev course" data into child sections. Teachers are provided their course content, and only permitted (through contracts/requirements) to modify their content slightly. We leave import functionality turned on for teacher roles.

As I'm sure every admin here faces, we have situations where users want to use the selective import feature of Canvas (to import a specific page, announcement, etc...), but they occasionally choose to copy an entire course over their live section.

I seek to build a tool that will allow me or my team to insert a Canvas Course ID, and an entire history of content migrations enumerates.

Here's where I'm at so far:


// This will paginate all content migrations that have happened for the specified course.
// From there, we can pull all the migration ID's from the list - as well as any other pertinent info - like User's CanvasID and datetime



In the following step, I seek to drill down inside each migration to find out exactly what was migrated. My thought was to use the selective_data piece; but fell short with only enumerating what could have been selected - not what was actually selected.


// Only returns a list of what could be imported, not what was imported.


So my question to the community, or a Canvas rep - is there an API call that I am just not finding in the documentation that can drill down into a specific import to find out what was migrated?



0 Kudos
2 Replies
Community Contributor

As far as I can tell, the selected content is only included as part of the request payload when it is started.  I haven't done any work with the Live Events, but maybe there is a way to determine what content was imported using that.  The only other solution I can think of is to check the start and end time of the migration and then use various API calls to get the different course items and check for what was created within that time period.

I would love to hear if anyone else has a better suggestion, because this would be nice if there was a simpler way to find out what was actually copied into the course.  This would help with course audits and when needing to fix courses that got messed up with a course import.

If you want to prevent users from doing a full course copy, have you considered using custom JavaScript to remove the options to make a full course copy and only leave the option to copy select content?

0 Kudos

Thanks so much for your response. It makes sense that this could be payload data that isn't tracked, at least to that level.

We've been dabbling a lot with custom JS to add or remove functionality that isn't inherently available in Canvas. My only qualm, that I didn't mention in my first post, is that with this type of auditing, it would track everyone - so I would even have a history of admin actions too.

0 Kudos