Posted on 03-20-2023 09:14 PM
When I attempt to use the JAMF API to enable Remote Desktop using
/usr/bin/curl --verbose --header 'authorization: Basic XXXXXXXXX' https://XXXXXXX.jamfcloud.com/JSSResource/computercommands/command/EnableRemoteDesktop/id/XXXX
I get the following output ...
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: <FILE>" to save to a file.
Posted on 03-21-2023 05:11 AM
It looks like you are just sending a 'curl' rather than sending a POST - https://developer.jamf.com/jamf-pro/reference/createcomputercommandbycommandandid
Posted on 03-25-2023 05:42 AM
As wkelly1 answered, that would be it. Also add in url switch, try the following but tweak for your auth / url settings etc;
/usr/bin/curl --request POST \
--url "https://XXXXXXX.jamfcloud.com/JSSResource/computercommands/command/EnableRemoteDesktop/id/XXXX \
--silent \
--header "Authorization: Bearer $token"