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 | /mdm-android-agent/device/
|
---|
HTTP Method | GET |
---|
Request/Response Format | application/json |
---|
cURL command | Code Block |
---|
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/ |
- For more information on how to generate the
<EMM_API_TOKEN> , see Generating the EMM API Token. - 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: Retrieve details that correspond to all the Android devices, which are currently registered with WSO2 EMM. Code Block |
---|
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer bddf9a16d5351b0a90277c37161e318e" -k -v https://localhost:9443/mdm-android-agent/device/ |
|
---|
Sample output | Code Block |
---|
> 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 | Code Block |
---|
[
{
"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"
}
]
}
] |
Property | Description |
---|
id | ID of the device in the WSO2 EMM device information database. | name | The device name that can be set on the device by the device user. | type | The OS type of the device. | description | Additional information on the device. | deviceIdentifier | This is a 64-bit number (as a hex string) that is randomly generated when the user first sets up the device and should remain constant for the lifetime of the user's device. The value may change if a factory reset is performed on the device. Note |
---|
When a device has multiple users (available on certain devices running Android 4.2 or higher), each user appears as a completely separate device; therefore, the deviceIdentifier value is unique to each user. |
| enrolmentInfo | This defines the device registration related information. It is mandatory to define this information. | id | ID of the device in the WSO2 EMM enrollment database. | status | Current status of the device, such as whether the device is active, removed etc. | owner | The device owner's name. | ownership | Defines the ownership details. The ownership type can be any of the following values. - BYOD - Bring your own device (BYOD).
- COPE - Corporate owned personally enabled (COPE).
| dateOfEnrolment | Date that the device was registered with WSO2 EMM. Info |
---|
The date is given in the Epoch time format. |
| dateOfLastUpdate | Date that the device registration details were updated in WSO2 EMM.
Info |
---|
The date is given in the Epoch time format. |
| properties | Defines details that correspond to the device. Defining properties are optional. |
|
---|
|