Posted on 03-25-2019 01:12 PM
We're having an issue where we cannot remove Apple TVs from classes via the API. (Adding them works fine.) Here's some different command lines I've tried. Both run successfully, but do not remove the Apple TVs. Does anyone see anything wrong, or is this another API bug in Jamf?
curl -k -s -u $jss_user:$jss_pass -X PUT -H "Content-Type: application/xml" -d "<class><apple_tvs></apple_tvs></class>" https://jss.domain.com:8443/JSSResource/classes/id/$class_id
curl -k -s -u $jss_user:$jss_pass -X PUT -H "Content-Type: application/xml" -d "<class><apple_tvs/></class>" https://jss.domain.com:8443/JSSResource/classes/id/$class_id
Posted on 03-26-2019 11:58 AM
Hi I’m just beginning my API journey and am no expert . I think you are trying to remove ? therefore you need to use the delete not put in your command
Posted on 03-26-2019 12:30 PM
Thanks for the idea, @tguyers360 , but I'm actually modifying the entry. The modification is to only remove the Apple TV. In the live environment, the API call also has XML for modifying the users/groups in the the class. This example is just the part relevant to the Apple TV. :)
Posted on 04-01-2019 01:53 PM
After talking to Jamf Support, they believe it's a bug in the API. We'll see if they can get it fixed.