Has anyone had success with the EraseDevice API call?
I have the shell command:
/usr/bin/curl --silent --show-error --connect-timeout 30 --request POST --user "username":"password" "https://site.jamfcloud.com/JSSResource/computercommands/command/EraseDevice/passcode/123456/id/#"
but I keep receiving the error:
<html>
<head>
<title>Status page</title>
</head>
<body style="font-family: sans-serif;">
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Unauthorized</p>
<p>The request requires user authentication</p>
<p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>
The user account making that API call has read, update, and delete permissions on the JSS Object, Computers, and it has the JSS Action, Send Computer Remote Wipe Command.
Does anyone have any suggestions on how to get this command to work or can share how you make the API call to wipe a device?