=========
PyWorkspaceOneUEM is a Python API library for VMware Workspace ONE UEM formerly known as AirWatch
A huge credit goes to John Richrads @jprichards and his project PyVMwareAirWatch from which a majority of the codebase was adopted.
example.py
from pyws1uem.client import WorkspaceOneAPI
wso = WorkspaceOneAPI(
env='your_environment_url',
auth_url='authentication_server_url',
client_id='workspaceone_client_id',
client_secret='workspaceone_client_secret',
aw_tenant_code='workspaceone_api_key'
)
# Get the OG ID for a specified Group ID
wso.groups.get_id_from_groupid(groupid='testog')
# Create a Child OG for a specified Parent OG Group ID (Type/Name optional)
wso.groups.create_child_og(parent_groupid='testog', groupid='newog', og_type='Container', name='newog')
# Get a Device ID via an alternate device identifier
wso.devices.get_id_by_alt_id(serialnumber='C09Z1TC8FJWT')
*A list of available OAuth authentication servers is available here
- Devices
- Search devices with specific criteria
- V1 Endpoint criteria > user, model, platform, lastseen, ownership, lgid(OrganizationGroup ID), compliantstatus, seensince
- V2 Endpoint criteria > user, model, platform, lastseen, ownership, lgid, compliance_status, seen_since
- V3 Endpoint criteria > user, model_identifier, device_type, last_seen, ownership, organization_group_uuid, compliance_status, seen_since
- Return the full device details by an Extensive Device Search
- Get Device Details by Alt ID (Macaddress, Udid, Serialnumber, ImeiNumber, EasId)
- Get Device ID by Alt ID (Macaddress, Udid, Serialnumber, ImeiNumber, EasId)
- Clear Device Passcode
- Get Device Details by Device ID
- Send Commands To devices via Device ID or by Alt ID
- Get Device FileVualt Recover Key
- Get Security Info Sample by Device ID or Alt ID
- Get Bulk Security Info Sample
- Switch device From Staging User to End User
- Get Network info Sample by Device ID
- Delete a Device by Device ID
- Delete a Device Custom Attribute by Device ID or Alternate ID
- Get a list of device enrollment tokens for a given Group ID
- Create a device enrollment token in a given OG
- Search devices with specific criteria
- Tags
- Add a Tag to a Device
- Remove a Tag from a Device
- Check if a tag is already applied
- Users
- Search for users by Username, Firstname, Lastname, Email, OrganizationGroupID, or Role
- Delete user
- Groups
- Get OG ID from Group ID
- Create Customer type OG (On-Prem only)
- Create Child OG
- Get UUID from OG ID