Unknown macro: {next_previous_link3}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

This section provides the details on the REST API used to get the policy details of Android devices.

Getting policy details of an Android device

Description

When a device registers with WSO2 EMM, a policy is enforced on the device based on the policy enforcement criteria. Using this API you are able to identify if a specific device has a policy enforced or if no policy is enforced on the device.

For more information on how a policy is applied on a device, see Working with Policies.

Resource Path/{deviceId}
URL/mdm-android-agent/policy/{deviceId}
HTTP MethodGET
Request/Response Formatapplication/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/policy/{deviceId}
  • 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.
  • {deviceId} - Provide the device identifier as the value of the device ID. For more information on retrieving the device ID, see Retrieving a Device ID.

Example: Identify whether a policy is applied on the Android device having the device identifier 867115026844132.

curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer e5c2ce5670b6f95e1514f4f9e722a722" -k -v https://localhost:9443/mdm-android-agent/policy/867115026844132
 Sample output
> GET /mdm-android-agent/policy/867115026844132 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 e5c2ce5670b6f95e1514f4f9e722a722
> 
< HTTP/1.1 200 OK
< Date: Tue, 22 Mar 2016 01:48:17 GMT
< Content-Type: application/json
< Content-Length: 77
< Server: WSO2 Carbon Server
< 
{"responseCode":"OK","responseMessage":"Effective policy added to operation"} 

  • No labels