tidusx18
12/12/2018 - 9:22 PM

Restore Canvas items

The code can be pasted into the console of a browser window with an active Canvas session with the appropriate course ID and assignment ID.

let csrf = Cookies.get('_csrf_token')
let courseID = ''
let assignmentID = ''

fetch('https://fiu.instructure.com/courses/${courseID}/undelete/assignment_${assignmentID}', {
	method: 'POST',
	headers: {
		'X-CSRF-Token': csrf
	},
})
.then( res => res.json() )
.then( res => console.log(res) ) // confirmation