Posted on 09-27-2016 05:30 AM
Does anyone have a way of deleting all Classes in Casper at once? We imported from Apple school manager a couple of times and now have duplicates (1,780 classes), all of which aren't formatted properly. We would like to remove all and start again.
Any ideas?
Posted on 09-27-2016 09:14 AM
JAMF makes a product called SIS Importer that can delete all the classes prior to an import with that tool. I still use that tool to import my Apple Classroom classes (though we want to use Apple School Manager eventually once full PowerSchool integration comes)
https://jamfnation.jamfsoftware.com/viewProduct.html?id=248&view=info
Posted on 09-27-2016 02:25 PM
I use the API for this pretty regularly.
for n ({1..100}); do curl -kvu username:password https://myjssaddress.jss:8443/JSSResource/classes/id/$n -X DELETE; done;
Replace 1..100 with your min/max classroom ids. Might take a few minutes, but usually isn't too bad.
Posted on 07-13-2017 09:06 AM
error in your syntax.
I had to use
for n in {1..900}
Posted on 12-13-2017 12:31 PM
I have managed to sync with PowerSchool and the server, but still have old records. The recent update to ASM caused another 'hiccup' in my database. I would like to remove all of the imported classes (and users). Are you willing to share the complete script?
Got it - had the best CCT instructor ever!! Found my notes and figured it out!
Posted on 01-11-2019 03:41 AM
Sorry to drag up an old post but i'm completely new to this API/CURL/Python stuff and it's taken me a day and a half just to get to a point of being able to use Python and get some form of a script together to delete classes, rather than post a VERY long list of steps I've created a blog containing all the steps to get this done from installing Python and installing modules to the python script I've used:
https://middletonhome.wordpress.com/2019/01/11/jamf-deleting-classes-python-with-api/
Hopefully it will help those of you who are like me and a bit new to this. It's probably not the prettiest script in the world but it works!
Posted on 01-18-2019 08:01 PM
sahtudec: Would you please share how you did it?