Getting Policy Enforced Details of a Device
Description | When a device registers with WSO2 EMM a policy is enforced on the device. Initially, the EMM filters the policies based on the Platform (device type), filters based on the device ownership type , filters based on the user role or name and finally the policy is enforced on the device. For more information, see Managing Policies. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Resource Path | /{type}/{id}/active-policy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
URL | /mdm-admin/policies/{type}/{id}/active-policy
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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-admin/policies/{type}/{id}/active-policy
Example: curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer 33392fb365b3ac693b405b565ddc8a3a" -k -v https://localhost:9443/mdm-admin/policies/iso/ee07b9c45904ef3af3tt5r4t13d0d6cd58a4567y/active-policy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sample output | > GET /mdm-admin/policies/ios/ee07b9c45904ef3af3tt5r4t13d0d6cd58a4567y/active-policy HTTP/1.1 > Host: localhost:9443 > User-Agent: curl/7.43.0 > Accept: */* > Content-Type: application/json > Authorization: Bearer 33392fb365b3ac693b405b565ddc8a3a < HTTP/1.1 200 OK < Cache-Control: private < Expires: Thu, 01 Jan 1970 05:30:00 IST < Date: Sat, 27 Feb 2016 08:04:28 GMT < Content-Type: application/json < Content-Length: 797 < Server: WSO2 Carbon Server {"id":38,"priorityId":3,"profile":{"profileId":38,"profileName":"iOS Policies","tenantId":-1234,"deviceType":{"id":33,"name":"ios"},"createdDate":"Feb 27, 2016 1:33:13 PM","updatedDate":"Feb 27, 2016 1:33:13 PM","profileFeaturesList":[{"id":39,"featureCode":"PASSCODE_POLICY","profileId":38,"deviceTypeId":33,"content":"{\"forcePIN\":true,\"allowSimple\":true,\"requireAlphanumeric\":true,\"minLength\":\"10\", \"minComplexChars\":\"3\",\"maxPINAgeInDays\":\"50\",\"pinHistory\":\"25\",\"maxInactivity\":\"3\", \"maxGracePeriod\":\"1\",\"maxFailedAttempts\":\"6\"}"}]},"policyName":"iOS Policies","generic":false, "roles":["ANY"],"ownershipType":"BYOD","devices":[],"users":[],"active":true,"updated":false,"description":"","compliance":"enforce","policyCriterias":[],"tenantId":-1234,"profileId":38} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sample JSON output | { "id":38, "priorityId":3, "profile":{ "profileId":38, "profileName":"iOS Policies", "tenantId":-1234, "deviceType":{ "id":33, "name":"ios" }, "createdDate":"Feb 27, 2016 1:33:13 PM", "updatedDate":"Feb 27, 2016 1:33:13 PM", "profileFeaturesList":[ { "id":39, "featureCode":"PASSCODE_POLICY", "profileId":38, "deviceTypeId":33, "content":"{\"forcePIN\":true,\"allowSimple\":true,\"requireAlphanumeric\":true,\"minLength\":\"10\", \"minComplexChars\":\"3\",\"maxPINAgeInDays\":\"50\",\"pinHistory\":\"25\",\"maxInactivity\":\"3\", \"maxGracePeriod\":\"1\",\"maxFailedAttempts\":\"6\"}" } ] }, "policyName":"iOS Policies", "generic":false, "roles":["ANY"], "ownershipType":"BYOD", "devices":[], "users":[], "active":true, "updated":false, "description":"", "compliance":"enforce", "policyCriterias":[], "tenantId":-1234, "profileId":38 }
|