How To Get The LocationGroupId For An Organisation Group For AirWatch API Calls

Standard

post_airwatch

I’ve recently been doing some work with AirWatch’s REST API.

One call required me to pass the LocationGroupId for an Organization Group, this is not readily available & the below are some methods that can be used to get the LocationGroupId for an Organization Group.

LocationGroupId for an Organization Group?

If you’ve been administering AirWatch for some time, you’ll possibly remember that Organization Group’s were once called Location Group’s.

It seems like the API has kept this old name for backwards compatibility for people running API calls pre & post the change.

Within the AirWatch REST API documentation you’ll find various mentions of the LocationGroupId, which look like the below:

Screenshot 2015-12-11 11.54.29

Via the Console

My first guess was to look within the console for this as Organization Group details can be found under “Groups & Settings” > “Groups” > “Organization Groups” > “Organization Group Details”, as shown below.

Screenshot 2015-12-11 11.59.26

Sadly the “Group ID” shown above is not the needed LocationGroupId.

After logging a ticket with AirWatch support they advised that there are 2 places within that page where you can get the LocationGroupId.

  1. Right click the “Organization Group Details” tab & copy the link. Paste that into something & you’ll find the LocationGroupId at the end of the URL.
  2. Via the CSS. (!!), this is shown below with the Orange rectangle being where the LocationGroupId is shown.

Screenshot 2015-12-11 13.57.41

Via the API

So the above is what I was advised by AirWatch support as the location to find the LocationGroupId.

However, in scouring the REST API documentation, it does appear that there is an API call that will get the LocationGroupId:

http://host/API/v1/system/groups/search?groupid={groupid}

Where groupID is the “Group ID” that is shown within the console.

Leave a Reply

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