macadmins / jamf-pro-sdk-python

A client library for the Jamf Pro APIs and webhooks.
https://macadmins.github.io/jamf-pro-sdk-python/
MIT License
50 stars 10 forks source link

Add Pro MDM Apis #9

Closed brysontyrrell closed 1 year ago

brysontyrrell commented 1 year ago

This PR adds the following methods to the Pro API Client:

Example usage for the restart device command:

from jamf_pro_sdk.models.pro.mdm import RestartDeviceCommand
from jamf_pro_sdk import JamfProClient, BasicAuthProvider

client = JamfProClient("instance.jamfcloud.com", BasicAuthProvider("user", "pass"))

client.pro_api.send_mdm_command_preview(
    management_ids=["e2b403e1-a5c6-50c3-8b41-0214dc82e9a0"],
    command=RestartDeviceCommand()
)
# Response:
# [SendMdmCommandResponse(id='92616b4c-975e-4586-bfbc-f8c84c87d8fe', href='http://instance.jamfcloud.com/api/v1/mdm/commands?uuids=92616b4c-975e-4586-bfbc-f8c84c87d8fe')]

This PR also contains an update to the documentation that embeds the supported Pro API sort and filter fields options with the API operation.