Hi there,
I'm trying to send a command for a group of computers to unmanage them via the JSS API. Using Python, I think I've got it all built out, just I'm not sure if I'm passing the correct XML for the JSS to process the command. Could someone take a look and let me know if this is correct?
I'm using this API command, where you could replace "myjssURL" with yours:
https://myjssURL/api/#!/computercommands/createComputerCommandByCommandShortcut1_post
The thing I'm most unclear on is exactly what to pass in for the postXML. It says the one parameter is the id.
jss_api_base_url='https://myjssURL/JSSResource'
comp_id = '1234'
reqStr = jss_api_base_url + '/computercommands/command/UnmanageDevice/id/' + comp_id
postXML = "<id>" + comp_id + "</id>"
request = urllib2.Request(reqStr)
request.add_header('Authorization', 'Basic ' + base64.b64encode(username + ':' + password))
# POST
request.add_header('Content-Type', 'text/xml')
request.get_method = lambda: 'POST'
response = urllib2.urlopen(request, postXML)