jamf-pro-sdk-python
jamf-pro-sdk-python copied to clipboard
[Bug] preview/mdm/commands deprecated & removed which breaks send_mdm_command_preview() method.
Steps to Reproduce
Attempt to push a mdm command using send_mdm_command_preview() method.
import jamf_pro_sdk
from jamf_pro_sdk.models.pro.mdm import SetRecoveryLockCommand
bobs_managementId = '1234'
newPass = 'longandcomplex'
command_out = client.pro_api.send_mdm_command_preview(
management_ids=[bobs_managementId],
command=SetRecoveryLockCommand(
newPassword=newPass)
)
print("Command ID: " + str(command_out))
Expected Result
Command sent and command ID returned
Actual Result
error 404 endpoint not found for /preview/mdm/commands
System Information
Python 3.10 Jamf 11.19.1 SDK is running 7a1 but didn't see anything related in the 8a1 update but will update and check.
Looks like we are using the wrong endpoint for that command, preview/mdm/commands should now be v2/mdm/commands. Thank you for submitting!