This section provides the details of the REST APIs that are used with regard to Android device management.
Getting details of all Android devices
Description | Use this REST API to retrieve the details (e.g., the Android device type, serial number, International Mobile Station Equipment Identity (IMEI), owner, version, model etc.) of all Android devices that are registered with WSO2 EMM. | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Resource Path | / | ||||||||||||||||||||||||||||
URL |
| ||||||||||||||||||||||||||||
HTTP Method | GET | ||||||||||||||||||||||||||||
Request/Response Format | application/json | ||||||||||||||||||||||||||||
cURL command | curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/device/
Example: Retrieve details that correspond to all the Android devices, which are currently registered with WSO2 EMM. curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer bddf9a16d5351b0a90277c37161e318e" -k -v https://localhost:9443/mdm-android-agent/device/ | ||||||||||||||||||||||||||||
Sample output | > GET /mdm-android-agent/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 bddf9a16d5351b0a90277c37161e318e > < HTTP/1.1 200 OK < Date: Thu, 24 Mar 2016 08:03:09 GMT < Content-Type: application/json < Content-Length: 2581 < Server: WSO2 Carbon Server < [{"id":1,"name":"titan_umts","type":"android","description":"titan_umts","deviceIdentifier":"359298055243973","enrolmentInfo":{"id":1,"dateOfEnrolment":1457160869352,"dateOfLastUpdate":1457160869352,"ownership":"BYOD","status":"ACTIVE","owner":"admin"},"properties":[{"name":"IMEI","value":"359298055243973"},{"name":"IMSI","value":"413025702363929"},{"name":"DEVICE_MODEL","value":"XT1064"},{"name":"OS_VERSION","value":"6.0"},{"name":"VENDOR","value":"motorola"},{"name":"SERIAL"},{"name":"DEVICE_INFO","value":"[{\"name\":\"IMEI\",\"value\":\"359298055243973\"},{\"name\":\"IMSI\",\"value\":\"413025702363929\"},{\"name\":\"DEVICE_MODEL\",\"value\":\"XT1064\"},{\"name\":\"VENDOR\",\"value\":\"motorola\"},{\"name\":\"OS_VERSION\",\"value\":\"6.0\"},{\"name\":\"DEVICE_NAME\",\"value\":\"titan_umts\"},{\"name\":\"BATTERY_LEVEL\",\"value\":\"38\"},{\"name\":\"INTERNAL_TOTAL_MEMORY\",\"value\":\"5.51\"},{\"name\":\"INTERNAL_AVAILABLE_MEMORY\",\"value\":\"0.42\"},{\"name\":\"EXTERNAL_TOTAL_MEMORY\",\"value\":\"0.0\"},{\"name\":\"EXTERNAL_AVAILABLE_MEMORY\",\"value\":\"0.0\"},{\"name\":\"OPERATOR\",\"value\":\"Dialog\"}]"},{"name":"DEVICE_NAME","value":"titan_umts"},{"name":"GCM_TOKEN"}]},{"id":2,"name":"hwRIO-L01","type":"android","description":"hwRIO-L01","deviceIdentifier":"867115026844132","enrolmentInfo":{"id":2,"dateOfEnrolment":1458806582459,"dateOfLastUpdate":1458806582459,"ownership":"BYOD","status":"ACTIVE","owner":"admin"},"properties":[{"name":"IMEI","value":"867115026844132"},{"name":"IMSI","value":"413027001101134"},{"name":"DEVICE_MODEL","value":"HUAWEI RIO-L01"},{"name":"OS_VERSION","value":"5.1"},{"name":"VENDOR","value":"HUAWEI"},{"name":"LATITUDE","value":"79.8617277"},{"name":"LONGITUDE","value":"79.8617277"},{"name":"SERIAL"},{"name":"DEVICE_INFO","value":"[{\"name\":\"IMEI\",\"value\":\"867115026844132\"},{\"name\":\"IMSI\",\"value\":\"413027001101134\"},{\"name\":\"DEVICE_MODEL\",\"value\":\"HUAWEI RIO-L01\"},{\"name\":\"VENDOR\",\"value\":\"HUAWEI\"},{\"name\":\"OS_VERSION\",\"value\":\"5.1\"},{\"name\":\"DEVICE_NAME\",\"value\":\"hwRIO-L01\"},{\"name\":\"BATTERY_LEVEL\",\"value\":\"77\"},{\"name\":\"LATITUDE\",\"value\":\"6.9302368\"},{\"name\":\"LONGITUDE\",\"value\":\"79.8617277\"},{\"name\":\"INTERNAL_TOTAL_MEMORY\",\"value\":\"24.74\"},{\"name\":\"INTERNAL_AVAILABLE_MEMORY\",\"value\":\"18.4\"},{\"name\":\"EXTERNAL_TOTAL_MEMORY\",\"value\":\"0.0\"},{\"name\":\"EXTERNAL_AVAILABLE_MEMORY\",\"value\":\"0.0\"},{\"name\":\"OPERATOR\",\"value\":\"Dialog\"}]"},{"name":"DEVICE_NAME","value":"hwRIO-L01"},{"name":"GCM_TOKEN"}]}] | ||||||||||||||||||||||||||||
Sample JSON output Definition | [ { "id":1, "name":"titan_umts", "type":"android", "description":"titan_umts", "deviceIdentifier":"359298055243973", "enrolmentInfo":{ "id":1, "dateOfEnrolment":1457160869352, "dateOfLastUpdate":1457160869352, "ownership":"BYOD", "status":"ACTIVE", "owner":"admin" }, "properties":[ { "name":"IMEI", "value":"359298055243973" }, { "name":"IMSI", "value":"413025702363929" }, { "name":"DEVICE_MODEL", "value":"XT1064" }, { "name":"OS_VERSION", "value":"6.0" }, { "name":"OS_BUILD_DATE", "value":"3468424562" }, { "name":"VENDOR", "value":"motorola" }, { "name":"SERIAL" }, { "name":"DEVICE_INFO", "value":"[{\"name\":\"IMEI\",\"value\":\"359298055243973\"},{\"name\":\"IMSI\",\"value\":\"413025702363929\"},{\"name\":\"DEVICE_MODEL\",\"value\":\"XT1064\"},{\"name\":\"VENDOR\",\"value\":\"motorola\"},{\"name\":\"OS_VERSION\",\"value\":\"6.0\"},{\"name\":\"DEVICE_NAME\",\"value\":\"titan_umts\"},{\"name\":\"BATTERY_LEVEL\",\"value\":\"38\"},{\"name\":\"INTERNAL_TOTAL_MEMORY\",\"value\":\"5.51\"},{\"name\":\"INTERNAL_AVAILABLE_MEMORY\",\"value\":\"0.42\"},{\"name\":\"EXTERNAL_TOTAL_MEMORY\",\"value\":\"0.0\"},{\"name\":\"EXTERNAL_AVAILABLE_MEMORY\",\"value\":\"0.0\"},{\"name\":\"OPERATOR\",\"value\":\"Dialog\"}]" }, { "name":"DEVICE_NAME", "value":"titan_umts" }, { "name":"GCM_TOKEN" } ] }, { "id":2, "name":"hwRIO-L01", "type":"android", "description":"hwRIO-L01", "deviceIdentifier":"867115026844132", "enrolmentInfo":{ "id":2, "dateOfEnrolment":1458806582459, "dateOfLastUpdate":1458806582459, "ownership":"BYOD", "status":"ACTIVE", "owner":"admin" }, "properties":[ { "name":"IMEI", "value":"867115026844132" }, { "name":"IMSI", "value":"413027001101134" }, { "name":"DEVICE_MODEL", "value":"HUAWEI RIO-L01" }, { "name":"OS_VERSION", "value":"5.1" }, { "name":"OS_BUILD_DATE", "value":"3468346562" }, { "name":"VENDOR", "value":"HUAWEI" }, { "name":"LATITUDE", "value":"79.8617277" }, { "name":"LONGITUDE", "value":"79.8617277" }, { "name":"SERIAL" }, { "name":"DEVICE_INFO", "value":"[{\"name\":\"IMEI\",\"value\":\"867115026844132\"},{\"name\":\"IMSI\",\"value\":\"413027001101134\"},{\"name\":\"DEVICE_MODEL\",\"value\":\"HUAWEI RIO-L01\"},{\"name\":\"VENDOR\",\"value\":\"HUAWEI\"},{\"name\":\"OS_VERSION\",\"value\":\"5.1\"},{\"name\":\"DEVICE_NAME\",\"value\":\"hwRIO-L01\"},{\"name\":\"BATTERY_LEVEL\",\"value\":\"77\"},{\"name\":\"LATITUDE\",\"value\":\"6.9302368\"},{\"name\":\"LONGITUDE\",\"value\":\"79.8617277\"},{\"name\":\"INTERNAL_TOTAL_MEMORY\",\"value\":\"24.74\"},{\"name\":\"INTERNAL_AVAILABLE_MEMORY\",\"value\":\"18.4\"},{\"name\":\"EXTERNAL_TOTAL_MEMORY\",\"value\":\"0.0\"},{\"name\":\"EXTERNAL_AVAILABLE_MEMORY\",\"value\":\"0.0\"},{\"name\":\"OPERATOR\",\"value\":\"Dialog\"}]" }, { "name":"DEVICE_NAME", "value":"hwRIO-L01" }, { "name":"GCM_TOKEN" } ] } ]
|
Getting details of an Android device
Description | Use this REST API to retrieve the details (e.g., the Android device type, serial number, International Mobile Station Equipment Identity (IMEI), owner, version, model etc.) of a specific Android device that is registered with WSO2 EMM. | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Resource Path | /{id} | ||||||||||||||||||||||||||||
URL |
| ||||||||||||||||||||||||||||
HTTP Method | GET | ||||||||||||||||||||||||||||
Request/Response Format | application/json | ||||||||||||||||||||||||||||
cURL command | curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/device/{id}
Example: Retrieve details that corresponds to the Android device where the device identifier is 359298055243973. curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer bddf9a16d5351b0a90277c37161e318e" -k -v https://localhost:9443/mdm-android-agent/device/359298055243973 | ||||||||||||||||||||||||||||
Sample output | > GET /mdm-android-agent/device/359298055243973 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 bddf9a16d5351b0a90277c37161e318e > < HTTP/1.1 200 OK < Date: Thu, 24 Mar 2016 08:25:17 GMT < Content-Type: application/json < Content-Length: 1194 < Server: WSO2 Carbon Server < {"id":1,"name":"titan_umts","type":"android","description":"titan_umts","deviceIdentifier":"359298055243973","enrolmentInfo":{"id":1,"dateOfEnrolment":1457160869352,"dateOfLastUpdate":1457160869352,"ownership":"BYOD","status":"ACTIVE","owner":"admin"},"properties":[{"name":"IMEI","value":"359298055243973"},{"name":"IMSI","value":"413025702363929"},{"name":"DEVICE_MODEL","value":"XT1064"},{"name":"OS_VERSION","value":"6.0"},{"name":"VENDOR","value":"motorola"},{"name":"SERIAL"},{"name":"DEVICE_INFO","value":"[{\"name\":\"IMEI\",\"value\":\"359298055243973\"},{\"name\":\"IMSI\",\"value\":\"413025702363929\"},{\"name\":\"DEVICE_MODEL\",\"value\":\"XT1064\"},{\"name\":\"VENDOR\",\"value\":\"motorola\"},{\"name\":\"OS_VERSION\",\"value\":\"6.0\"},{\"name\":\"DEVICE_NAME\",\"value\":\"titan_umts\"},{\"name\":\"BATTERY_LEVEL\",\"value\":\"38\"},{\"name\":\"INTERNAL_TOTAL_MEMORY\",\"value\":\"5.51\"},{\"name\":\"INTERNAL_AVAILABLE_MEMORY\",\"value\":\"0.42\"},{\"name\":\"EXTERNAL_TOTAL_MEMORY\",\"value\":\"0.0\"},{\"name\":\"EXTERNAL_AVAILABLE_MEMORY\",\"value\":\"0.0\"},{\"name\":\"OPERATOR\",\"value\":\"Dialog\"}]"},{"name":"DEVICE_NAME","value":"titan_umts"},{"name":"GCM_TOKEN"}]} | ||||||||||||||||||||||||||||
Sample JSON output Definition | { "id":1, "name":"titan_umts", "type":"android", "description":"titan_umts", "deviceIdentifier":"359298055243973", "enrolmentInfo":{ "id":1, "dateOfEnrolment":1457160869352, "dateOfLastUpdate":1457160869352, "ownership":"BYOD", "status":"ACTIVE", "owner":"admin" }, "properties":[ { "name":"IMEI", "value":"359298055243973" }, { "name":"IMSI", "value":"413025702363929" }, { "name":"DEVICE_MODEL", "value":"XT1064" }, { "name":"OS_VERSION", "value":"6.0" }, { "name":"VENDOR", "value":"motorola" }, { "name":"SERIAL" }, { "name":"DEVICE_INFO", "value":"[{\"name\":\"IMEI\",\"value\":\"359298055243973\"},{\"name\":\"IMSI\",\"value\":\"413025702363929\"},{\"name\":\"DEVICE_MODEL\",\"value\":\"XT1064\"},{\"name\":\"VENDOR\",\"value\":\"motorola\"},{\"name\":\"OS_VERSION\",\"value\":\"6.0\"},{\"name\":\"DEVICE_NAME\",\"value\":\"titan_umts\"},{\"name\":\"BATTERY_LEVEL\",\"value\":\"38\"},{\"name\":\"INTERNAL_TOTAL_MEMORY\",\"value\":\"5.51\"},{\"name\":\"INTERNAL_AVAILABLE_MEMORY\",\"value\":\"0.42\"},{\"name\":\"EXTERNAL_TOTAL_MEMORY\",\"value\":\"0.0\"},{\"name\":\"EXTERNAL_AVAILABLE_MEMORY\",\"value\":\"0.0\"},{\"name\":\"OPERATOR\",\"value\":\"Dialog\"}]" }, { "name":"DEVICE_NAME", "value":"titan_umts" }, { "name":"GCM_TOKEN" } ] }
To know more on iOS specific device details, see the iOS device information property definition. |
Updating the details of an Android device
Description | Use this REST API to update the details of an Android device. | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Resource Path | /{id}
| |||||||||||||||||||||||||||
URL |
| |||||||||||||||||||||||||||
HTTP Method | PUT | |||||||||||||||||||||||||||
Request/Response Format | application/json | |||||||||||||||||||||||||||
cURL command | curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -k -d @'<JSON_PAYLOAD>' -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/device/{id}
Example: Update the details of the Android device where the device identifier is 867115026844138. curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer cce3d4671a67c09852e445c67e47c09a" -k -d @'update_device_info.json' -v https://localhost:9443/mdm-android-agent/device/867115026844138 | |||||||||||||||||||||||||||
Sample output | > PUT /mdm-android-agent/device/867115026844138 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 adc3b342f5929fb3158161bff205f1b1 > Content-Length: 1472 > Expect: 100-continue > < HTTP/1.1 100 Continue < HTTP/1.1 200 OK < Date: Thu, 24 Mar 2016 12:23:57 GMT < Content-Type: application/json < Content-Length: 67 < Server: WSO2 Carbon Server < {"responseMessage":"The device information has been modified successfully"} | |||||||||||||||||||||||||||
Sample JSON definition | { "description":"hwRIO-L01", "deviceIdentifier":"867115026844132", "enrolmentInfo":{ "ownership":"BYOD", "status":"ACTIVE", "owner":"admin", "dateOfEnrolment":"1445438864650" }, "name":"hwRIO-L01", "properties":[ { "name":"IMEI", "value":"867115026844132" }, { "name":"IMSI", "value":"413027001101134" }, { "name":"DEVICE_MODEL", "value":"HUAWEI RIO-L01" }, { "name":"VENDOR", "value":"HUAWEI" }, { "name":"OS_VERSION", "value":"5.1" }, { "name":"DEVICE_NAME", "value":"hwRIO-L01" }, { "name":"BATTERY_LEVEL", "value":"40" }, { "name":"LATITUDE", "value":"6.9302368" }, { "name":"LONGITUDE", "value":"79.8617277" }, { "name":"INTERNAL_TOTAL_MEMORY", "value":"24.74" }, { "name":"INTERNAL_AVAILABLE_MEMORY", "value":"18.4" }, { "name":"EXTERNAL_TOTAL_MEMORY", "value":"0.0" }, { "name":"EXTERNAL_AVAILABLE_MEMORY", "value":"0.0" }, { "name":"OPERATOR", "value":"Dialog" }, { "name":"DEVICE_INFO", "value":"[{\"name\":\"IMEI\",\"value\":\"867115026844132\"},{\"name\":\"IMSI\",\"value\":\"413027001101134\"},{\"name\":\"DEVICE_MODEL\",\"value\":\"HUAWEI RIO-L01\"},{\"name\":\"VENDOR\",\"value\":\"HUAWEI\"},{\"name\":\"OS_VERSION\",\"value\":\"5.1\"},{\"name\":\"DEVICE_NAME\",\"value\":\"hwRIO-L01\"},{\"name\":\"BATTERY_LEVEL\",\"value\":\"77\"},{\"name\":\"LATITUDE\",\"value\":\"6.9302368\"},{\"name\":\"LONGITUDE\",\"value\":\"79.8617277\"},{\"name\":\"INTERNAL_TOTAL_MEMORY\",\"value\":\"24.74\"},{\"name\":\"INTERNAL_AVAILABLE_MEMORY\",\"value\":\"18.4\"},{\"name\":\"EXTERNAL_TOTAL_MEMORY\",\"value\":\"0.0\"},{\"name\":\"EXTERNAL_AVAILABLE_MEMORY\",\"value\":\"0.0\"},{\"name\":\"OPERATOR\",\"value\":\"Dialog\"}]" } ] }
|
Installing the Application List on an Android DeviceError rendering macro 'excerpt-include' : No link could be created for 'Installing the Application List on an Android Device'.
Getting the license agreement for Android device registration
Description | Use this REST API to retrieve the license agreement that is used for the Android device registration process. |
---|---|
Resource Path | /license |
URL |
|
HTTP Method | GET |
Request/Response Format | application/json |
cURL command | curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-android-agent/device/license
Example: Retrieve the license agreement that is used for the Android device registration process. curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer bddf9a16d5351b0a90277c37161e318e" -k -v https://localhost:9443/mdm-android-agent/device/license |
Sample output | > GET /mdm-android-agent/device/license 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 b74bad9e16b8687d52a62ce05863e888 > < HTTP/1.1 200 OK < Date: Mon, 28 Mar 2016 01:08:13 GMT < Content-Type: text/html < Content-Length: 1727 < Server: WSO2 Carbon Server < This End User License Agreement ("Agreement") is a legal agreement between you ("You") and WSO2, Inc., regarding the enrollment of Your personal mobile device ("Device") in SoR's mobile device management program, and the loading to and removal from Your Device and Your use of certain applications and any associated software and user documentation, whether provided in "online" or electronic format, used in connection with the operation of or provision of services to WSO2, Inc., BY SELECTING "I ACCEPT" DURING INSTALLATION, YOU ARE ENROLLING YOUR DEVICE, AND THEREBY AUTHORIZING SOR OR ITS AGENTS TO INSTALL, UPDATE AND REMOVE THE APPS FROM YOUR DEVICE AS DESCRIBED IN THIS AGREEMENT. YOU ARE ALSO EXPLICITLY ACKNOWLEDGING AND AGREEING THAT (1) THIS IS A BINDING CONTRACT AND (2) YOU HAVE READ AND AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU DO NOT ACCEPT THESE TERMS, DO NOT ENROLL YOUR DEVICE AND DO NOT PROCEED ANY FURTHER. You agree that: (1) You understand and agree to be bound by the terms and conditions contained in this Agreement, and (2) You are at least 21 years old and have the legal capacity to enter into this Agreement as defined by the laws of Your jurisdiction. SoR shall have the right, without prior notice, to terminate or suspend (i) this Agreement, (ii) the enrollment of Your Device, or (iii) the functioning of the Apps in the event of a violation of this Agreement or the cessation of Your relationship with SoR (including termination of Your employment if You are an employee or expiration or termination of Your applicable franchise or supply agreement if You are a franchisee of or supplier to the WSO2 WSO2, Inc., system). SoR expressly reserves all rights not expressly granted herein. |