Integrate Build Servers with VMware AirWatch APIs

Integrate your build server with VMware AirWatch to automatically deliver new builds of internal applications to the AirWatch Admin Console.

Current AirWatch Plugins

AirWatch has a plugin for Jenkins build servers. However, if you use another build system, you can use AirWatch APIs to configure your build server to deliver updated application versions to AirWatch.

Necessary APIs for Integration

Configure the build server to use specific APIs in the listed order. These APIs upload applications, apply organization groups, assign the applications to smart groups, and publish applications to devices. You can also delete applications to clear old builds from the system.

Reference the VMware AirWatch REST API Guide for more details, found on the Resources Portal at https://my.air-watch.com.


1. Upload Blob – Uploads internal application packages as a single byte stream. The response for this API is a numeric "Blob ID" that you can use in the Internal Application Save API (also called Internal Application Install: Begin Internal Application Install) to save the application to the AirWatch Console.

https://host/api/mam/blobs/uploadblob?filename={filename}&organizationgroupid={organizationgroupid}

Response Payload
XML
<long>Numeric</long>
JSON
{
"Value" : Numeric
}

 

2. Internal Application Install: Begin Internal Application Install (also called Internal Application Save) – Saves the application, which are the blob or chunks of app package that you upload with the UploadBlob API. It can specify the supported model's deployment mode of the application. After the application saves, add assignments to the application using '/internal/addAssignment' (validate name) to begin the installation.

https://host/api/mam/apps/internal/begininstall

Request Payload
XML
<InternalAppChunkTranscation xmlns="http://www.air-watch.com/servicemodel/resources">
  <TransactionId>String</TransactionId>
  <BlobId>Textvalue</BlobId>
  <DeviceType>Numeric</DeviceType>
  <ApplicationName>String</ApplicationName>
  <SupportedModels>
  <Model>
  <ApplicationSupportedModel>
    <ModelId>Numeric</ModelId>
    <ModelName>String</ModelName>
  </ApplicationSupportedModel>
  </Model>
  </SupportedModels>
  <PushMode>String</PushMode>
  <Description>String</Description>
  <SupportEmail>String</SupportEmail>
  <SupportPhone>String</SupportPhone>
  <Developer>String</Developer>
  <DeveloperEmail>String</DeveloperEmail>
  <DeveloperPhone>String</DeveloperPhone>
  <AutoUpdateVersion>Boolean</AutoUpdateVersion>
  <LocationGroupId>Numeric</LocationGroupId>
</InternalAppChunkTranscation>

JSON
{
  "TransactionId":"String",
  "DeviceType":"String",
  "BlobId":Numeric,
  "ApplicationName":"String",
  "SupportedModels":{
  "Model":
  [{
    "ModelId":Numeric,
    "ModelName":"String"
  }]
  },
  "PushMode":"String",
  "Description":"String",
  "SupportEmail":"String",
  "SupportPhone":"String",
  "Developer":"String",
  "DeveloperEmail":"String",
  "DeveloperPhone":"String",
  "AutoUpdateVersion":Boolean,
  "LocationGroupId":Numeric
}

3. Search Organization Group – Searches for organization group details with the parameters provided in the URL.

http://host/api/system/groups/search?name={name}&type={type}&groupid={groupid}&orderby=
{orderby}&page={page}&pagesize={pagesize}&sortorder={sortorder}

Response Payload
XML

<LocationGroupSearchResult>
  Page>Numeric</Page>
  <PageSize>Numeric</PageSize>
  <Total>Numeric</Total
  ><LocationGroups>
    <Id>Numeric</Id>
    <Name>String</Name>
    <GroupId>String</GroupId>
    <LocationGroupType>String</LocationGroupType>
    <Locale>String</Locale>
    <Country>String</Country>
    <CreatedOn>Datetime</CreatedOn>
    <LgLevel>Numeric</LgLevel>
    Users>Numeric</Users>
    <Admins>Numeric</Admins>
    <Devices>Numeric</Devices>
  </LocationGroups>
</LocationGroupSearchResult>

JSON
"LocationGroups":
  {
    "Id": String
    "Name": String,
    "GroupId": String,
    "LocationGroupType": String,
    "Country": String,
    "Locale": String,
    "CreatedOn": Datetime,
    "LgLevel":Numeric,
    "Users": Numeric,
    "Admins": Numeric,
    "Devices": Numeric,
  }

4. Search Smart Groups – Searches for smart groups using given query information. AirWatch assigns applications to devices that are grouped into smart groups.

https://host/api/mdm/smartgroups/search?name={name}&organizationgroupid=
{organizationgroupid}&managedbyorganizationgroupid={managedbyorganizationgroupid}&modifiedfrom=
{modifiedfrom}&modifiedtill={modifiedtill}&page={page}&pagesize={pagesize}&orderby={orderby}&sortorer={sortorder}

Response Payload
XML
<SmartGroupSearchResult xmlns="http://www.air-watch.com/servicemodel/resources">
  <Page>Numeric</Page>
  <PageSize>Numeric</PageSize>
  <Total>Numeric</Total>
  <SmartGroups>
    <Devices>Numeric</Devices>
    <Assignments>Numeric</Assignments>
    <Exclusions>Numeric</Exclusions>
    <Name>String</Name>
    <SmartGroupID>Numeric</SmartGroupID>
    <ManagedByOrganizationGroupId>Numeric</ManagedByOrganizationGroupId>
    <ManagedByOrganizationGroupName>String</ManagedByOrganizationGroupName>
  </SmartGroups>
</SmartGroupSearchResult>

JSON
{
  "Page" : Numeric,
  "PageSize" : Numeric,
  "Total" : Numeric,
  "SmartGroups" : [
    {
    "Assignments" : Numeric,
    "Devices" : Numeric,
    "Exclusions" : Numeric,
    "ManagedByOrganizationGroupId" : "String",
    "ManagedByOrganizationGroupName" : "String",
    "Name" : "String",
    "SmartGroupID" : Numeric
    }
  ]
}

5. Assign Smart Group to an Internal Application – Assigns a smart group to an internal application.

https://host/api/mam/apps/internal/{applicationid}/smartgroups/{smartgroupid} (HTTP Method Used – POST)

No Response Payload

6. Retrieve Assigned Devices (Internal Application) – Lists devices that are have assignments for the internal application.

https://host/api/mam/apps/internal/applicationid/devices

Response Payload
XML
<DeviceList>
  <Page xmlns="http://www.air-watch.com/servicemodel/resources">Numeric</Page>
  <PageSize xmlns="http://www.air-watch.com/servicemodel/resources">Numeric</PageSize>
  <Total xmlns="http://www.air-watch.com/servicemodel/resources">Numeric</Total>
  <DeviceId xmlns="http://www.air-watch.com/servicemodel/resources">Numeric</DeviceId>
  <DeviceId xmlns="http://www.air-watch.com/servicemodel/resources">Numeric</DeviceId>
</DeviceList>

JSON
{
  "Page":Numeric,
  "PageSize":Numeric,
  "Total":Numeric,
  "DeviceId":Numeric,
}

7. Install Internal Application on Device – Installs an application on devices. Run this API for every device retrieved in the Retrieve Assigned Devices (Internal Application) API.

https://host/api/mam/apps/internal/{applicationid}/install

Response Payload
XML
<DeviceInfo xmlns="http://www.air-watch.com/servicemodel/resources">
  <DeviceId>Numeric</DeviceId>
  <Udid>String</Udid>
  <SerialNumber>String</SerialNumber>
  <MacAddress>String</MacAddress>
</DeviceInfo>

JSON
{
  "DeviceId":Numeric,
  "Udid":"String",
  "SerialNumber":"String",
  "MacAddress":"String"
}

8. Delete Internal Application (Optional) – Deletes an internal application that it identifies with the application ID from the console. Run this API to clean up old builds.

https://host/api/mam/apps/Internal/{Applicationid}

No Response Payload

Have more questions? Submit a request

0 Comments

Article is closed for comments.