Airwatch REST API URI Changes

Standard

post_airwatch

When looking into the issue in my last post, I found I could no longer access Airwatch’s online API documentation.

Heading to Ask Airwatch & looking for the API documentation revealed why.

With the 8.3 release, Airwatch have started a process of refactoring & remotion of the Uniform Resource Identifier (read: URI) used for API calls.

See below for more information on these changes.

URI Refactoring & Remotion? Re-What?

Essentially, the URI’s for API calls have changed.

Version Remotion

In AirWatch 8.3, AirWatch has modified the look of the API URIs by removing the version specification from them.

Screenshot 2016-03-21 22.31.47

But, the V1 and V2 APIs can be fetched by adding the version details in the Accept header.

To retrieve Version 1 APIs, use:

Accept=application/json;version=1

Or

Accept=application/xml;version=1

To retrieve Version 2 APIs, use:

Accept=application/json;version=2

Or

Accept=application/xml;version=2

Refactored API’s

Some API’s have also been refactored or modified, again these can be found in the “VMware AirWatch REST API Guide v8_3.pdf”

However, whilst AirWatch advise that:

“In 8.3 version, there are few API endpoints whose URIs are refactored or modified. This modification do not NOT affect any existing workflows that you are using till date.”

I have found some URI’s have indeed changed.

The API documentation does list the deprecated URI’s:

Screenshot 2016-03-31 23.10.17

With details available for the refactored URI’s:

Screenshot 2016-03-31 23.10.46

Again, AirWatch advise that the URI’s have not changed yet. But I have found some to fail even with the correct version header.

AirWatch do advise that they will warn when the URI’s are fully refactored, (as per the below image from the “VMware AirWatch REST API Guide v8_3.pdf”), but I’d advise changing URI’s sooner rather than later.

Screenshot 2016-03-31 23.27.45

Documentation

As mentioned, I started this discovery process by heading to Ask Airwatch & looking for the API documentation.

However, I still found things did not work & still could not access the online API documentation which used to be at https://<consoleURL>/API/v1/help.

New API Help URL

I tried dropping the version number from the URL & making it lower case & voilà!

So the new API Help URL is: https://<consoleURL>/api/help (replace <consoleURL> with your AirWatch consoles URL).

Confusion

Sadly, this discovery lead to some confusion.

The “VMware AirWatch REST API Guide v8_3.pdf” & API Help pages have differing information or one is wrong with the other correct.

Example 1

PDF:

Screenshot 2016-03-21 22.28.19

Help URL:

Screenshot 2016-03-21 22.31.47

With the above, the PDF is missing the v1 from the URI.

Example 2

PDF:

Screenshot 2016-03-21 22.37.08

Help URL:

Screenshot 2016-03-21 22.36.34

Before the 8.3 update, I used lgid as per the Help URL documentation & also mentioned in this post.

However since the 8.3 update, I have needed to change some URI’s from lgid to organizationgroupid (as shown in the PDF example above).

So, you’ll need to reference both documents to find the correct URI.

EXP Points!

I have logged these inconsistencies with AirWatch, & for that gained some more EXP Points! Woohoo!

So the API documentation will all hopefully line up soon

Screenshot 2016-03-31 16.01.41

5 thoughts on “Airwatch REST API URI Changes

  1. Mike Belanger

    Hello, is there a specific header to increase the returned devices from the airwatch api rest get devices call? When I run the get devices it does not return all devices? I don’t have any critieria and return about 250 devices, so trying to determine what is stopping me when we have about 2000 in our Airwatch system?

    Thanks for any help on this.

Leave a Reply

Your email address will not be published. Required fields are marked *

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