Submitting HTTP Requests to REST API endpoints in Workspace ONE UEM to retrieve devices

Usage and adoption of REST API's continues to increase, as the need to integrate services over the web is greater than it has ever been. One of the most frequently used API endpoints in Workspace ONE UEM is  /API/mdm/devices. This API endpoint accepts a variety of parameters that help filter your result set to only include what is necessary, and reduce the payload size returned in the HTTP response. We will take a look at a quick example of how to perform this HTTP Request with Powershell and invoke-restmethod. Below is a simple Powershell script I was able to create for this example. Make sure to include base64 encoded credentials in a folder (c:\creds\b64.txt in the example), and to update the $apiKey object with an API key.

When reviewing the results from the object with $getDevices.Devices, the following is stored in the variable:

This API really gives you quite a bit to work with, and VMware is really good about offering developers an assortment of APIs to report on, create, or update objects. Including API endpoints representing (less verbose) device details, or purpose-built API's with for application status, uploading applications, and so on.  Use the /devices/litesearch API if you just want to retrieve basic device data in a smaller payload, which will allow front-end framework or native app to render it all the faster. You can request a content-type of either application/json, or application, xml. Whatever works easiest for you.

Ryan Pringnitz


Popular posts from this blog

How to use Fiddler Everywhere to inspect Android network traffic to troubleshoot SAML authentication issues

Zimperium Delivery and Activation on Android Enterprise with Workspace ONE UEM Product Provisioning

Clean up duplicate identities and users from Workspace ONE using REST API's and PowerShell