jamf-pro-sdk-python icon indicating copy to clipboard operation
jamf-pro-sdk-python copied to clipboard

[Bug] preview/mdm/commands deprecated & removed which breaks send_mdm_command_preview() method.

Open K1jaff opened this issue 3 months ago • 1 comments

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.

K1jaff avatar Aug 13 '25 12:08 K1jaff

Looks like we are using the wrong endpoint for that command, preview/mdm/commands should now be v2/mdm/commands. Thank you for submitting!

liquidz00 avatar Aug 13 '25 13:08 liquidz00