Mac Lovin'

View Original

AirWatch: How to use the REST API

According to the "AirWatch REST API Guide" PDF document that you can get in https://my.air-watch.com, you need:

  • the URL : https://<host>/API/v1/help

  • the Token: aw-tenant-code (or API Key)

  • Authorization: Basic base64.b64encode("username:password")

How to find the Token

  1. Select the right Organization Group

  2. Go to Group & Settings > System > Advanced > API > REST > General

  3. Select "Override"

  4. an API Key will be generated. This is your "aw-tenant-code"

How to Authorize

The easiest way is to use Basic authentication.

  1. Make sure your admin has the correct role. In production, you should create a custom Role, but for test, Console Administrator is fine. Make sure he's in the correct OG, of course.

  2. The form should be "username:password", encoded using Base64. You can do this on OS X terminal (see below)

See this content in the original post

How to test with Curl

See this content in the original post

With Python

See this content in the original post

Or just use Paw https://luckymarmot.com/paw ;-)

One More Thing…

It doesn't work with OS X clients:

See this content in the original post