Posted on 10-10-2016 09:37 AM
I made my shell script that contains the following:
curl -sfku https://myjssurl:8443/commandflush/mobiledevices/serialnumber/DMPPL5HHFK11/status/Failed --user "$username:$password" -X DELETE
When I run it, I get "curl: no URL specified!"
So tried the following:
curl -sfku "username:pass" https://jssurl:8443/commandflush/mobiledevices/serialnumber/DMPPL5HHFK11/status/Failed -X DELETE
This runs without any errors, but nothing is reflected on the JSS. Both are examples I've seen and amended off the boards here or other various places. Can anyone point out what obvious mistakes I'm making.
Posted on 01-05-2018 06:48 AM
You are using curl followed by the switches -sfku, -u stands for user, so if you put the URL straight after -u or -sfku it will count the URL as the user credentials and be left with no URL to use as the actual URL. It works in your second example because you put user credentials after -u, --user and -u are the same and do not need to appear in the same command.
Hope that helps.