Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pro MDM Apis #9

Merged
merged 24 commits into from
Sep 18, 2023
Merged

Add Pro MDM Apis #9

merged 24 commits into from
Sep 18, 2023

Conversation

brysontyrrell
Copy link
Collaborator

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

  • renew_mdm_profile_v1()
  • send_mdm_command_preview()
  • get_mdm_commands_v2()

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.

@brysontyrrell brysontyrrell merged commit c154b1e into main Sep 18, 2023
1 check passed
@brysontyrrell brysontyrrell deleted the add-pro-mdm-apis branch September 18, 2023 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants