new AirWatchService(config) → {AirWatchService}
Creates an object of the AirWatchService
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | Service configurations object Properties
|
Returns:
- Type
- AirWatchService
Methods
-
<private> _makeDeviceRequest(options, callback)
-
Make a request to the API for a device specific action.
Parameters:
Name Type Description options
Object A json object containing items needed to make the request.
Properties
Name Type Description deviceId
String Type of identification. Can be either 'macaddress', 'serialnumber' or 'UDID'.
uid
String Unique ID of the device. Can be either a valid MAC address, serial number or UDID.
callback
function -
getDeviceApps(options, callback)
-
Returns an object containing an array of applications installed on the device.
Parameters:
Name Type Description options
Object A json object containing items needed to make the request.
Properties
Name Type Description deviceId
String Type of identification. Can be either 'macaddress', 'serialnumber' or 'UDID'.
uid
String Unique ID of the device. Can be either a valid MAC address, serial number or UDID.
callback
-
getDeviceCertificates(options, callback)
-
Retrieves the details of the certificates that are present on the device.
Parameters:
Name Type Description options
Object A json object containing items needed to make the request.
Properties
Name Type Description deviceId
String Type of identification. Can be either 'macaddress', 'serialnumber' or 'UDID'.
uid
String Unique ID of the device. Can be either a valid MAC address, serial number or UDID.
callback
function -
getDeviceCompliance(options, callback)
-
Retrieves the details of the compliance policies that are present on a device.
Parameters:
Name Type Description options
Object A json object containing items needed to make the request.
Properties
Name Type Description deviceId
String Type of identification. Can be either 'macaddress', 'serialnumber' or 'UDID'.
uid
String Unique ID of the device. Can be either a valid MAC address, serial number or UDID.
callback
function -
getDeviceContent(options, callback)
-
Retrieves the details of the content that is present on a device.
Parameters:
Name Type Description options
Object A json object containing items needed to make the request.
Properties
Name Type Description deviceId
String Type of identification. Can be either 'macaddress', 'serialnumber' or 'UDID'.
uid
String Unique ID of the device. Can be either a valid MAC address, serial number or UDID.
callback
function -
getDeviceEventLog(options, callback)
-
Retrieves the event log details of the device.
Parameters:
Name Type Description options
Object A json object containing items needed to make the request.
Properties
Name Type Description deviceId
String Type of identification. Can be either 'macaddress', 'serialnumber' or 'UDID'.
uid
String Unique ID of the device. Can be either a valid MAC address, serial number or UDID.
callback
function -
getDeviceInfo(options, callback)
-
Retrieves details of the device identified by its numeric ID.
Parameters:
Name Type Description options
Object A json object containing items needed to make the request.
Properties
Name Type Description deviceId
String Type of identification. Can be either 'macaddress', 'serialnumber' or 'UDID'.
uid
String Unique ID of the device. Can be either a valid MAC address, serial number or UDID.
callback
function -
getDeviceProfiles(options, callback)
-
Retrieves the profile related information of the device.
Parameters:
Name Type Description options
Object A json object containing items needed to make the request.
Properties
Name Type Description deviceId
String Type of identification. Can be either 'macaddress', 'serialnumber' or 'UDID'.
uid
String Unique ID of the device. Can be either a valid MAC address, serial number or UDID.
callback
function -
installApp(options, callback)
-
Installs an Application on a device
Parameters:
Name Type Description options
Object Properties
Name Type Description TransactionId
String -
callback
function -
makeRequest(url, post, callback)
-
Make an request to the AirWatch API
Parameters:
Name Type Description url
String Endpoint to make the request, do not include hostname.
post
Object A json object with data to post. Optional.
callback
function The callback that handles the response.
Properties
Name Type Description error
Object response
Object body
Object -
updateVersion(options, callback)
-
Request the current version of an App and update it via semantic versioning. This is currently designed for iOS apps, must have agvtool installed.
Parameters:
Name Type Description options
Object Properties
Name Type Argument Default Description app
String Bundle ID of App.
status
String <optional>
active Status of App.
release
String <optional>
PATCH Type of release.
callback
-
uploadAppBlob(filename, callback)
-
Upload an App to the AirWatch API as a single Blob
Parameters:
Name Type Description filename
String Filename of app. Must be in the same directory (for now).
callback
function The callback that handles the response.
Properties
Name Type Description error
Object response
Object body
Object -
uploadAppChunks(filename, callback)
-
Upload Application Chunks (iOS and Android). Uploads application chunks into the AirWatch database for internal application install. This function must be used prior to the 'Begin Install API' for uploading an internal application.
Parameters:
Name Type Description filename
String Name of the file you want to upload.
callback
String Returns a function with the uploaded transactionId.