The following sub sections illustrate the Android operation APIs that are used in WSO2 EMM console:
Adding a screen lock on Android devices
Description | Using this API you have the option of hard locking an Android device, where the Administrator permanently locks the device or screen locking an Android device. |
---|
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 |
{
"operation": {
"message": "This is a test message",
"isHardLockEnabled": true
},
"deviceIDs": [
"d8:50:e6:2f:6a:8b",
"a5:60:e6:2g:6a:5b"
]
}
Property Value | Description | Data Type |
---|
operation | Lists out the features of the device lock operation. | - | message | Provide the message that needs to be sent out when locking the device. | String | isHardLockEnabled
| Define true as the value if you need to hard lock the device or define false as the value to screen lock the device. | 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 |
|
---|
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 |
|
---|
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 an application on an Android device. If the device you are installing the application on has the WSO2 system service installed, the application installation will happen in silent mode, else the device user's consent will be required. |
---|
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 | schedule | The date and time for the scheduled installation. This should follow the ISO 8601 format:
yyyy-MM-dd'T'HH:mm:ssZ | 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 |
|
---|
Updating an application on Android devices
Description | Update an application on Android devices. If the Android device has the WSO2 system service application installed, applications will be updated in the silent mode, else the device user's consent is required. |
---|
Resource Path | /update-application |
---|
URL | /mdm-android-agent/operation/update-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/update-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/update-application
|
---|
Sample output |
> POST /mdm-android-agent/operation/update-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 | schedule | The date and time to scheduled the application update. This should follow the ISO 8601 format:
yyyy-MM-dd'T'HH:mm:ssZ | 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 | schedule | The date and time of the scheduled application installation. This should be in the MM-DD-YYYY hh:mm am/pm format. | 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 |
|
---|
Rebooting an Android devices
Description | Reboot or restart your Android devices. |
---|
Resource Path | /reboot-device |
---|
URL | /mdm-android-agent/operation/reboot-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/reboot-device
- For more information on how to generate the
<EMM_API_TOKEN> , see Generating the EMM API Token. - Define the path to the JSON file, which includes the required properties to update the policy 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 33392fb365b3ac693b405b565ddc8a3a" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/reboot-device
|
---|
Sample output |
> POST /mdm-android-agent/operation/reboot-device HTTP/1.1
> Host: localhost:9443
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer 33392fb365b3ac693b405b565ddc8a3a
> Content-Length: 19
< HTTP/1.1 201 Created
< Date: Sun, 06 Mar 2016 19:00:02 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 |
|
---|
Upgrading firmware of Android devices
Description | Upgrade the firmware of Android devices. |
---|
Resource Path | /upgrade-firmware |
---|
URL | /mdm-android-agent/operation/upgrade-firmware |
---|
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/upgrade-firmware
- For more information on how to generate the
<EMM_API_TOKEN> , see Generating the EMM API Token. - Define the path to the JSON file, which includes the required properties to update the policy 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 33392fb365b3ac693b405b565ddc8a3a" -d @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/upgrade-firmware
|
---|
Sample output |
> POST /mdm-android-agent/operation/upgrade-firmware HTTP/1.1
> Host: localhost:9443
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer 33392fb365b3ac693b405b565ddc8a3a
> Content-Length: 19
< HTTP/1.1 201 Created
< Date: Sun, 06 Mar 2016 19:04:15 GMT
< Content-Length: 0
< Server: WSO2 Carbon Server
|
---|
Sample JSON Definition |
{
"operation":{
"schedule":"2016-04-25T12:00:00+0530",
"server":"http://ota.wso2.com"
},
"deviceIDs":[
867115026844132,
347115025644446
]
}
Property Value | Description | Data Type |
---|
operation | This specifies the operation that is to be applied on the Android device. | - | schedule | Provide the date and time to schedule the firmware update in the following ISO 8601 format:
yyyy-MM-dd'T'HH:mm:ssZ | String |
server
| Provide the OTA upgrade server URL in one of the following formats. Example: http://abc.com http://abc.com/ota
| 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 |
|
---|
Unlocking Android devices
Description | Unlock a device that has been locked permanently using the hard lock operation. |
---|
Resource Path | /unlock |
---|
URL | /mdm-android-agent/operation/unlock |
---|
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/unlock
- 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 @'operation.json' -k -v https://localhost:9443/mdm-android-agent/operation/unlock
|
---|
Sample output |
> POST /mdm-android-agent/operation/unlock 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 |
---|
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 up a VPN on Android devices
Description | Set up a VPN on your Android devices remotely. It allows the device to access secured resources on the intranet of an Organization. |
---|
Resource Path | - Adding a policy that is in the inactive state
/inactive-policy . - Adding a policy that is in the active state
/active-policy .
|
---|
URL | /mdm-admin/policies/inactive-policy or /mdm-admin/policies/active-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-admin/policies/inactive-policy
or
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-admin/policies/active-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 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 33392fb365b3ac693b405b565ddc8a3a" -d @'policy.json' -k -v https://localhost:9443/mdm-admin/policies/inactive-policy
or
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer 33392fb365b3ac693b405b565ddc8a3a" -d @'policy.json' -k -v https://localhost:9443/mdm-admin/policies/active-policy
|
---|
Sample output |
> POST /mdm-admin/policies/active-policy HTTP/1.1
> Host: localhost:9443
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer 33392fb365b3ac693b405b565ddc8a3a
> Content-Length: 420
< HTTP/1.1 201 Created
< Date: Thu, 25 Feb 2016 06:30:18 GMT
< Content-Type: application/json
< Content-Length: 76
< Server: WSO2 Carbon Server
{"statusCode":201,"messageFromServer":"Policy has been added successfully."}
|
---|
Sample JSON Definition |
{
"policyName":"VPN",
"description":"",
"compliance":"enforce",
"ownershipType":"ANY",
"profile":{
"profileName":"vpn",
"deviceType":{
"id":1
},
"profileFeaturesList":[
{
"featureCode":"VPN",
"deviceTypeId":1,
"content":{
"serverAddress":"abc.com",
"serverPort":"1234",
"sharedSecret":"wso2",
"dnsServer":"1.1.1.1"
}
}
]
},
"roles":[
"ANY"
]
}
Property | Description | Data Type |
---|
policyName | The name of the policy. | String | Description | Provide a description on what the policy is based on. | String | Compliance | Define the non-compliance rules. WSO2 EMM provides the following non-compliance rules: Enforce - Forcefully enforce the policies on the devices.Warning - If the device does not adhere to the given policies a warning message will be sent.Monitor - If the device does not adhere to the given policies the server is notified of the violation unknown to the user and the administrator can take the necessary actions with regard to the reported.
| String | ownershipType | Define the define ownership type using the values given below: ANY - The policy will be applied on the BYOD and COPE device types.BYOD (Bring Your Own Device) - The policy will only be applied on the BYOD device type.COPE (Corporate-Owned, Personally-Enabled) - The policy will only be applied on the COPE device type.
| String | profile | Provide the policy profile details. | - | profileName | The name of the policy that is being added. | String | deviceType | The ID used to define the type of the device platform. For more information on the unique ID for the device platforms supported by the EMM, see Getting Details of the Devices Supported via WSO2 EMM. | Integer | profileFeaturesList | Lists the features that belong to the profile. | - | featureCode | Provide the code that defines the policy you wish to add. | String | deviceTypeId | The ID used to define the type of the device platform. | Integer | content | The list of parameters that define the policy. For more information on the feature list for Windows policies, see profileFeaturesList - policy based. | String | serverAddress
| Define the server address of the VPN. | String | serverPort
| Define the server port of the VPN. | String | sharedSecret
| Define the shared secret for the VPN connection. This is used for secure communication between the device and the WSO2 EMM server. | String | dnsServer
| Define the DNS server URL. This field is optional. | String | roles | Define the roles the policy needs to be applied on. The policy will be applied on the respective user roles devices. | String array |
|
---|