com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_link3' is unknown.

Getting the Non-Compliant Device Count

Description

Get the number of devices that have not complied to a given policy over the total number of devices registered with WSO2 EMM.

Resource Path/dashboard/feature-non-compliant-device-count-over-total
URL

/mdm-admin/dashboard/feature-non-compliant-device-count-over-total

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-admin/dashboard/feature-non-compliant-device-count-over-total -d "non-compliant-feature-code=<FEATURE_CODE>"
  • 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.
  • Filter the device based on the following required parameter:
    • non-compliant-feature-code - Provide the feature code or ID of the policy. Some examples for feature codes are: WIFI, PASSCODE_POLICY, CAMERA and ENCRYPT_STORAGE.
  • Optionally, filter the device details using the query parameters given below:
    • platform - Provide the platform that the device is running on. You can assign the values given below:
      • iOS
      • Android
      • Windows
  • ownership - Provide the ownership status of the device. You can assign the values given below:
    • BYOD: Bring Your Own Device
    • COPE: Corporate-Owned, Personally-Enabled

Example:

curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer c148a833a9c3d30bb5197788eaad5541" -k -v https://localhost:9443/mdm-admin/dashboard/feature-non-compliant-device-count-over-total?non-compliant-feature-code=WIFI"
 Sample output
> GET /mdm-admin/dashboard/feature-non-compliant-device-count-over-total?non-compliant-feature-code=WIFI_TEST HTTP/1.1
> User-Agent: curl/7.38.0
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer d9808217e974096233cb59eb931daa91
>
< HTTP/1.1 200 OK
< Cache-Control: private
< Expires: Thu, 01 Jan 1970 05:30:00 IST
< Date: Mon, 09 May 2016 12:51:25 GMT
< Content-Type: application/json
< Content-Length: 230
* Server WSO2 Carbon Server is not blacklisted
< Server: WSO2 Carbon Server
<
* Connection #0 to host localhost left intact
[{"context":"Feature-non-compliant-device-count-over-total","data":[{"group":"feature-non-compliant","displayNameForGroup":"Feature-non-compliant","deviceCount":2},{"group":"total","displayNameForGroup":"Total","deviceCount":5}]}]
Sample JSON Output Definition 
[  
   {  
      "context":"Feature-non-compliant-device-count-over-total",
      "data":[  
         {  
            "group":"feature-non-compliant-and-filtered",
            "displayNameForGroup":"Feature-non-compliant-and-filtered",
            "deviceCount":2
         },
         {  
            "group":"total",
            "displayNameForGroup":"Total",
            "deviceCount":5
         }
      ]
   }
]
ParameterDefinition
context

Defines the attribute, to which the data is being populated. In this use case the context is Feature-non-compliant-device-count-over-total.

data

Defines the data received.

group

The devices are grouped as follows:

  • Feature-non-compliant-and-filtered: Non-compliant devices that are filtered based on the specified query parameter.
  • Total: The total device count of all devices registered with WSO2 EMM.
labelDefines the name of the grouped devices.
countThe number of devices in each category.
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.