We have scripted deleting teachers using the API by first pulling information from the /users/id call. This can give us the computer and ipad the teacher has assigned. We get the id's of the devices from that GET call. We use DELETE in /computers/id and /mobiledevices/id to flush out the location attributes to remove the the teacher and we can then delete the teacher without issue.
However if a teacher is in a class(es), we don't get the roster list in the /user/id call. If I do a DELETE on the teacher with classes, JSS does bring back information on the classes that the teacher is associated with. I was wondering if there was a better way to get back the class information than having to do a initial DELETE in the API to get the class list. Or do I have to traverse the entire classes list and look for the teacher? Or is there any other method to remove a teacher from classes easily through the API?
Thanks for any help.
