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
51 stars 10 forks source link

Get Mobile Devices #39

Closed brysontyrrell closed 9 months ago

brysontyrrell commented 9 months ago

This PR adds the get_mobile_device_inventory_v2 method to the Pro API Client.

from jamf_pro_sdk import JamfProClient, BasicAuthProvider
from jamf_pro_sdk.clients.pro_api.pagination import SortField

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

response = client.pro_api.get_mobile_device_inventory_v2(
    sections=["CERTIFICATES"],
    page_size=1000,
    sort_expression=SortField("mdmProfileExpirationDate").desc()
)

This PR also starts the process of adding non-failing integration tests to main branch PRs.