How to Use Workspace One UEM API? – Part III


So at this point, you learned how to create your REST API key, how to use Workspace One UEM API website and how to check internal applications using REST API, am I right?

Well, that’s ok but I know a lot of people which like to use terminal window instead of tradicional web pages, with all your clicks, uploads, etc…

If you’re a kind of person I described above, this post is for you!

Using Command Line and REST API for Workspace One UEM

First of all, we need to follow the same steps we did in the previously posts: Authenticate, Get Authorised and Request what you would like to. So, let’s digging in:

Note: I will use CURL for all process. If you want to know more about CURL, check this website.

Authentication and Authorization

Let’s use basic authentication (administrator username you have into Console) and the environment you’re connection to. In my case, will be

curl -v –basic -u td.tvalcesia

Just type your password to get connected.

If everything worked properly, you’ll receive your Authorization: Basic.

Copy that, ok?!

Now it’s time to a more complex command…

Let’s reproduce the same steps we did on this post but using only CURL.

You’ll need for this:

The syntax is the following:

curl -X GET –header ‘AcceptL application/json’ –header ‘Authorization: Basic ‘HERE_YOU_NEED_YOUR_AUTHORIZATION‘ –header ‘aw-tenant-code: HERE_YOU_NEED_YOUR_API_KEY‘ ‘ type=App&applicationtype=Internal’

In my case, this is the final command (IMPORTANT: I’ve changed my Authorization and API Key for security reasons);

curl -X GET --header 'Accept: application/json' --header 'Authorization: Basic dGQudHAKJSHDNlc2lhOkx0enQAJGHYSOhbWEybWlh' --header 'aw-tenant-code: c6DOpiFk/LAKHSDOASDPvdbRlAVh2LJHADS)ptd8=' ''

The follwing information will be available for you:

If you go back to Workspace ONE UEM API Explorer, you can see the CURL command showing up for you as well.

I wish you can explore more your REST API knowledge with this steps I did.

Enjoy the Ride!

9 comments on “How to Use Workspace One UEM API? – Part III”

  1. One thing to note here is that depending on your API and UEM console version you will need a “locationgroupid”, I had to use/add that to my command string. I used my root OG ID and everything worked great. Now question how would I parse this to a document formatted “pretty”?


  2. I got it you can format the JSON with the following command to terminal window: python -m json.tool


    to a file when needed: python -m json.tool > ~/Desktop/(file name)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.