The following sub sections illustrate the Android operation APIs that are used in WSO2 EMM console:
Adding a screen lock on Android devices
Description | Add a screen lock on Android devices. |
---|
Resource Path | /lock |
---|
URL | /mdm-android-agent/operation/lock |
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/lock
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the JSON file, which lists the devices that this operation is applied on, as the
<JSON_PAYLOAD> value. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer f409r4c55924rt4af9a44tts15y9d6cd56h1047d" -d @'test.json' -k -v https://localhost:9443/mdm-android-agent/operation/lock
|
---|
Sample output |
> POST /mdm-android-agent/operation/lock HTTP/1.1
> Host: localhost:9443
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer f409r4c55924rt4af9a44tts15y9d6cd56h1047d
> Content-Length: 21
< HTTP/1.1 201 Created
< Date: Fri, 18 Mar 2016 08:18:20 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
[
"d8:50:e6:2f:6a:8b",
"a5:60:e6:2g:6a:5b"
]
Property Value | Description | Data Type |
---|
device id | ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Changing the lock code on Android devices
Description | Change the lock code on Android devices. |
---|
Resource Path | /change-lock-code |
---|
URL | /mdm-android-agent/operation/change-lock-code |
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/change-lock-code
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the JSON file, which lists the devices that this operation is applied on and the corresponding lock code, as the
<JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer f409r4c55924rt4af9a44tts15y9d6cd56h1047d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/change-lock-code
|
---|
Sample output |
> POST /mdm-android-agent/operation/change-lock-code HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8| zlib/1.2.5
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer f409r4c55924rt4af9a44tts15y9d6cd56h1047d
> Content-Length: 86
< HTTP/1.1 201 Created
< Date: Wed, 10 Jun 2015 09:37:28 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
{
"operation": {
"lockCode": "1234"
},
"deviceIDs": [
"d8:50:e6:2f:6a:8b",
"a5:60:e6:2g:6a:5b"
]
}
Property Value | Description | Data Type |
---|
operation
| This specifies the operation that is to be applied on the Android device. | - | lockCode
| The lock code that will replace the current lock code on Android devices. If a passcode policy has been set in EMM, the lock code should comply to the passcode policy. | String | deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Clearing the password on Android devices
Description | Clear the password on Android devices. |
---|
Resource Path | /clear-password |
---|
URL | /mdm-android-agent/operation/clear-password |
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/clear-password
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the JSON file, which lists the devices that this operation is applied on, as the
<JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/clear-password
|
---|
Sample output |
> POST /mdm-android-agent/operation/clear-password HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8| zlib/1.2.5
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d
> Content-Length: 21
< HTTP/1.1 201 Created
< Date: Wed, 10 Jun 2015 09:40:15 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
[
"d8:50:e6:2f:6a:8b",
"a5:60:e6:2g:6a:5b"
]
Property Value | Description | Data Type |
---|
deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Enabling or disabling the camera on Android devices
Description | Enable or disable the camera on Android devices. |
---|
Resource Path | /camera |
---|
URL | /mdm-android-agent/operation/camera |
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/camera
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the JSON file, which lists the devices that this operation is applied on and the actual operation that needs to be carried out, as the
<JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/camera
|
---|
Sample output |
> POST /mdm-android-agent/operation/camera HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8| zlib/1.2.5
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d
> Content-Length: 84
< HTTP/1.1 201 Created
< Date: Wed, 10 Jun 2015 10:08:48 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
{
"operation": {
"enabled": false
},
"deviceIDs": [
"d8:50:e6:2f:6a:8b",
"a5:60:e6:2g:6a:5b"
]
}
Property Value | Description | Data Type |
---|
operation | This specifies the operation that is to be applied on the Android device. | - | enabled
| Disable the camera on the device by assigning true as the value or enable the camera on the device to function by defining false as the value. | Boolean | deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Configuring Wi-Fi on Android devices
Description | Configure Wi-Fi on Android devices. |
---|
Resource Path | /wifi |
---|
URL | /mdm-android-agent/operation/wifi |
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/wifi
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the
<JSON_PAYLOAD> , which lists the devices that this operation is applied on and the Wi-Fi settings, as the <JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/wifi
|
---|
Sample output |
> POST /mdm-android-agent/operation/wifi HTTP/1.1
> Host: 10.100.7.103:9443
> User-Agent: curl/7.43.0
> Accept: /
> Content-Type: application/json
> Authorization: Bearer d140b7d487e8c0c1e1ecde9791484698
> Content-Length: 119
< HTTP/1.1 201 Created
< Date: Tue, 19 Jan 2016 11:33:56 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
{
"operation": {
"ssid": "WSO2-Guest",
"password": "2hr3999Hy"
},
"deviceIDs": [
"d8:50:e6:2f:6a:8b",
"a5:60:e6:2g:6a:5b"
]
}
Property Value | Description | Data Type |
---|
operation | This specifies the operation that is to be applied on the Android device. | - | ssid
| The name of the Wifi network that you wish to configure. | String | password
| The password to connect to the specified Wifi network. | String | deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Uninstalling an application from Android devices
Description | Uninstall an application from Android devices. |
---|
Resource Path | /uninstall-application |
---|
URL | /mdm-android-agent/operation/uninstall-application
|
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/uninstall-application
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the
<JSON_PAYLOAD> , which includes the required properties to carry out the operation, as the <JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/uninstall-application
|
---|
Sample output |
> POST /mdm-android-agent/operation/uninstall-application HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8| zlib/1.2.5
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d
> Content-Length: 110
< HTTP/1.1 201 Created
< Date: Wed, 10 Jun 2015 12:38:42 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
Property Value | Description | Data Type |
---|
operation | This specifies the operation that is to be applied on the Android device. | - | appIdentifier
| The package name of the application to be uninstalled. For more information on how to identify the package name of the application, see Retrieving the App Identifier of an Application. | String | type | The type of the application. The following types of applications are supported: enterprise, public and webapp. | String | url | The URL of the application. | String | name | The name of the application. | String | deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Encrypting storage on Android devices
Description | Encrypt the data stored on Android devices. |
---|
Resource Path | /encrypt |
---|
URL | /mdm-android-agent/operation/encrypt |
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/encrypt
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the JSON file, which includes the required properties to carry out the operation, as the
<JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/encrypt
|
---|
Sample output |
> POST /mdm-android-agent/operation/encrypt HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8| zlib/1.2.5
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d
> Content-Length: 85
< HTTP/1.1 201 Created
< Date: Wed, 10 Jun 2015 10:11:25 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
{
"operation": {
"encrypted": true
},
"deviceIDs": [
"d8:50:e6:2f:6a:8b",
"a5:60:e6:2g:6a:5b"
]
}
Property Value | Description | Data Type |
---|
operation | This specifies the operation that is to be applied on the Android device. | - | encrypted | Encrypt the storage on the device by assigning true as the value or do not encrypt the storage on the device by assigning false as the value. | Boolean | deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Enterprise wiping Android devices
Description | Enterprise wipe is the process of deleting enterprise related data on a device while keeping the personal data intact. You are able to enterprise wipe Android devices using this REST API. |
---|
Resource Path | /enterprise-wipe |
---|
URL | /mdm-android-agent/operation/enterprise-wipe |
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/enterprise-wipe
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the JSON file, which includes the required properties to carry out the operation, as the
<JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/enterprise-wipe
|
---|
Sample output |
> POST /mdm-android-agent/operation/enterprise-wipe HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8| zlib/1.2.5
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d
> Content-Length: 21
< HTTP/1.1 201 Created
< Date: Wed, 10 Jun 2015 09:20:44 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
[
"d8:50:e6:2f:6a:8b",
"a5:60:e6:2g:6a:5b"
]
Property Value | Description | Data Type |
---|
deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Factory resetting an Android device
Description | Factory rest or erases all the data stored in the Android devices to restore them back to the original system. |
---|
Resource Path | /wipe-data |
---|
URL | /mdm-android-agent/operation/wipe-data |
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/wipe-data
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the JSON file, which includes the required properties to carry out the operation, as the
<JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/wipe-data
|
---|
Sample output |
> POST /mdm-android-agent/operation/wipe-data HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8| zlib/1.2.5
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d
> Content-Length: 21
< HTTP/1.1 201 Created
< Date: Wed, 10 Jun 2015 09:20:44 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
{
"operation":{
"pin":"4566"
},
"deviceIDs":[
"d8:50:e6:2f:6a:8b"
]
}
Property Value | Description | Data Type |
---|
operation | This specifies the operation that is to be applied on the Android device. | - | pin | The passcode to enable the factory reset operation. This is the passcode that the Android agent prompts the device owner to set at the time of device enrollment. | Integer | deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Description | Using this REST API you are able to request for Android device details. Once this REST API is executed it will be in the Android operation queue until the device calls the server to retrieve the list of operations that needs to be executed on the device. |
---|
Resource Path | /device-info |
---|
URL | /mdm-android-agent/operation/device-info |
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/device-info
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the JSON file, which includes the required properties to carry out the operation, as the
<JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/device-info
|
---|
Sample output |
> POST /mdm-android-agent/operation/device-info HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8| zlib/1.2.5
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d
> Content-Length: 21
< HTTP/1.1 201 Created
< Date: Wed, 10 Jun 2015 09:42:18 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
[
"d8:50:e6:2f:6a:8b",
"a5:60:e6:2g:6a:5b"
]
Property Value | Description | Data Type |
---|
deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Requesting the list of installed applications on Android devices
Description | Using this REST API the server requests for the list of applications that are installed on the Android devices. Once this REST API is executed it will be in the Android operation queue until the device calls the server to retrieve the list of operations that needs to be executed on the device. |
---|
Resource Path | /application-list |
---|
URL | /mdm-android-agent/operation/application-list |
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/application-list
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the JSON file, which includes the required properties to carry out the operation, as the
<JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/application-list
|
---|
Sample output |
> POST /mdm-android-agent/operation/get-application-list HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8| zlib/1.2.5
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d
> Content-Length: 21
< HTTP/1.1 201 Created
< Date: Wed, 10 Jun 2015 10:21:34 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
[
"d8:50:e6:2f:6a:8b",
"a5:60:e6:2g:6a:5b"
]
Property Value | Description | Data Type |
---|
deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Installing an application on Android devices
Description | Install applications on Android devices. |
---|
Resource Path | /install-application |
---|
URL | /mdm-android-agent/operation/install-application
|
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/install-application
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the
<JSON_PAYLOAD> , which includes the required properties to carry out the operation, as the <JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/install-application
|
---|
Sample output |
> POST /mdm-android-agent/operation/install-application HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8| zlib/1.2.5
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d
> Content-Length: 21
< HTTP/1.1 201 Created
< Date: Wed, 10 Jun 2015 10:19:38 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
Property Value | Description | Data Type |
---|
operation | This specifies the operation that is to be applied on the Android device. | - | appIdentifier
| The package name of the application to be uninstalled. For more information on how to identify the package name of the application, see Retrieving the App Identifier of an Application. | String | type | The type of the application. The following types of applications are supported: enterprise, public and webapp. | String | url | The URL of the application. | String | name | The name of the application. | String | deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Muting Android devices
Description | Mute Android devices. |
---|
Resource Path | /mute |
---|
URL | /mdm-android-agent/operation/mute |
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/mute
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the JSON file, which includes the required properties to carry out the operation, as the
<JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/mute
|
---|
Sample output |
> POST /mdm-android-agent/operation/mute HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8| zlib/1.2.5
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d
> Content-Length: 21
< HTTP/1.1 201 Created
< Date: Wed, 10 Jun 2015 12:21:00 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
[
"d8:50:e6:2f:6a:8b",
"a5:60:e6:2g:6a:5b"
]
Property Value | Description | Data Type |
---|
deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Requesting location coordinates of Android devices
Description | Request location coordinates of Android devices. Example: In situations where you have lost your device and need to find out where it is, you can use this REST API to get the location of the device. |
---|
Resource Path | /location |
---|
URL | /mdm-android-agent/operation/location |
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/location
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the JSON file, which includes the required properties to carry out the operation, as the
<JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/location
|
---|
Sample output |
> POST /mdm-android-agent/operation/location HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8| zlib/1.2.5
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d
> Content-Length: 21
< HTTP/1.1 201 Created
< Date: Wed, 10 Jun 2015 12:22:03 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
[
"d8:50:e6:2f:6a:8b",
"a5:60:e6:2g:6a:5b"
]
Property Value | Description | Data Type |
---|
deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Ringing Android devices
Description | Ring Android devices. |
---|
Resource Path | /ring-device |
---|
URL | /mdm-android-agent/operation/ring-device |
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/ring-device
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the JSON file, which includes the required properties to carry out the operation, as the
<JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/ring-device
|
---|
Sample output |
> POST /mdm-android-agent/operation/ring-device HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8| zlib/1.2.5
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d
> Content-Length: 23
< HTTP/1.1 201 Created
< Date: Wed, 03 Jun 2015 12:25:21 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
[
"d8:50:e6:2f:6a:8b",
"a5:60:e6:2g:6a:5b"
]
Property Value | Description | Data Type |
---|
deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Sending a notification to Android devices
Description | Send a notification to Android devices. |
---|
Resource Path | /notification |
---|
URL | /mdm-android-agent/operation/notification |
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/notification
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the JSON file, which includes the required properties to carry out the operation, as the
<JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/notification
|
---|
Sample output |
> POST /mdm-android-agent/operation/notification HTTP/1.1
> Host: localhost:9443
> User-Agent: curl/7.43.0
> Accept: /
> Content-Type: application/json
> Authorization: Bearer 33392fb365b3ac693b405b565ddc8a3a
> Content-Length: 131
< HTTP/1.1 201 Created
< Date: Tue, 19 Jan 2016 08:45:00 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
{
"operation":{
"message":"This is a test message"
},
"deviceIDs":[
"d8:50:e6:2f:6a:8b",
"a5:60:e6:2g:6a:5b"
]
}
Property Value | Description | Data Type |
---|
operation | This specifies the operation that is to be applied on the Android device. | - | message | The message you wish to send to the android device as a notification. | String | deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Setting a passcode policy on Android devices
Description | Set a password policy on Android devices. |
---|
Resource Path | /password-policy |
---|
URL | /mdm-android-agent/operation/password-policy |
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/password-policy
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the JSON file, which includes the required properties to carry out the operation, as the
<JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/password-policy
|
---|
Sample output |
> POST /mdm-android-agent/operation/password-policy HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8| zlib/1.2.5
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d
> Content-Length: 216
< HTTP/1.1 201 Created
< Date: Wed, 10 Jun 2015 12:30:39 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
{
"operation":{
"maxFailedAttempts":3,
"minLength":5,
"pinHistory":3,
"minComplexChars":1,
"maxPINAgeInDays":60,
"requireAlphanumeric":true,
"allowSimple":true
},
"deviceIDs":[
"d8:50:e6:2f:6a:8b",
"a5:60:e6:2g:6a:5b"
]
}
Property | Description | Data Type |
---|
operation | This specifies the operation that is to be applied on the Android device. | - | maxFailedAttempts | The maximum number of times the end-user can enter his/her device passcode incorrectly. EMM will take different courses of action based on the OS when the failed attempts exceed the maximum failed attempts. Android devices will be automatically reset to the original factory settings . | Integer | minLength | The minimum number of alphanumerical values that the end-user can enter as his/her passcode. By default, Android devices come with a minimum passcode length setting of 4. Therefore the minimum passcode length policy will only get effective if the minimum passcode length is greater then the default passcode length of the device. For example, if the admin applies a policy for the minimum passcode length as 3, the policy will not get effective. Furthermore, if the "Allow Simple" option is set, this rule will be overridden and the user will be allowed to have a passcode of even one alphanumerical value. | Integer | pinHistory | The end-user will not be allowed to reuse a passcode that he/she previously entered until he/she exceeds the set pin history length (e.g., if the pin history length is 3 and your passcode currently is 21345, you can not enter 21345 as the passcode in the next three consecutive passcode rotation cycles ). | Integer | minComplexChars | The minimum number of special characters (e.g., @ # etc.) that the end-user will have to enter in his/her passcode. However, if the "Allow Simple" option is set, this rule will be overridden and the user will be allowed to have a passcode without a single complex character. | Integer | maxPINAgeInDays | The number of days after which the device owner has to change his/her passcode. | Integer | requireAlphanumeric | Whether or not it is mandatory for the end-user to have a mix of digits and characters in his/her passcode. | Boolean | allowSimple | If this field is set to "true", the device owner will be able to have a simple passcode (e.g., a, 123,abc, a1bc) and the following criteria in the passcode policy will not be applicable: - Minimum length
- Minimum complex characters
| Boolean | deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|
Setting a web clip on Android devices
Description | Set a web clip on Android devices. A web clip is used to add a bookmark to a web application. |
---|
Resource Path | /webclip |
---|
URL | /mdm-android-agent/operation/webclip |
---|
HTTP Method | POST |
---|
Request/Response Format | application/json |
---|
cURL command |
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -d @'<JSON_PAYLOAD>' -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/operation/webclip
- For more information on how to generate the EMM API token, see Generating the OAuth 2.0 Access Token.
- Define the path to the JSON file, which includes the required properties to carry out the operation, as the
<JSON_PAYLOAD> value. For more information, see the Sample JSON Definition. - By default,
<EMM_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified. - By default,
<EMM_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n , the default port value needs to be incremented by n .
Example:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer e56974e8bf5df15748f89c6c5da9835d" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/webclip
|
---|
Sample output |
> POST /mdm-android-agent/operation/webclip HTTP/1.1
> Host: localhost:9443
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer ceada7ef9db110aca1e9cb1ec900a3b3
> Content-Length: 141
< HTTP/1.1 201 Created
< Date: Fri, 18 Mar 2016 12:38:20 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
{
"operation":{
"title":"google",
"identity":"https://google.lk",
"type":"install"
},
"deviceIDs":[
"d8:50:e6:2f:6a:8b",
"a5:60:e6:2g:6a:5b"
]
}
Property | Description | Data Type |
---|
operation | This specifies the operation that is to be applied on the Android device. | - | title | The name of the web application. | String | identity | The URL of the application. | String | type | The type of the operation. Following are the possible operation types: install and uninstall. If the operation type is install, the web clip is added, and if the operation type is uninstall, the existing web clip is removed. | String | deviceIDS
| ID of the Android device. Multiple device IDs can be added by using comma separated values. For more information on retrieving the device ID, see Retrieving the ID of an Android device. | String |
|
---|