Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt
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
Code Block
curl -v -L -G -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=WIFI"
  • 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:

Code Block
curl -v -L -G -H "Content-Type: application/json" -H "Authorization: Bearer c148a833a9c3d30bb5197788eaad5541" -k -v https://localhost:9443/mdm-admin/dashboard/feature-non-compliant-device-count-over-total -d "non-compliant-feature-code=WIFI"
  1. Filter the device based on the following required parameter:
    • non-compliant-feature-code - Provide the code specific for the feature (feature. Some examples for feature codes are: WIFI,PASSCODE_POLICY, CAMERA and ENCRYPT_STORAGE.)
  2. Filter the device details using the query parameters given below:
    • platform - Provide the platform that the device is running on. This can be one of the following:
      • iOS
      • Android
      • Windows
    • ownership - Provide the ownership status of the device. This can be one of the following:
      • BYOD: (Bring Your Own Device)
      • COPE: (Corporate-Owned, Personally-Enabled)
 Sample output
Code Block
> 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 
Code Block
[  
   {  
      "context": "Feature-non-compliant-device-count-over-total",
      "data": [{[  
         {  
          	  "group": "feature-non-compliant-and-filtered",
   	         "displayNameForGroup": "Feature-non-compliant-and-filtered",
   	         "deviceCount":2
 2        },
         {  
 	           "group": "total",
     	       "displayNameForGroup": "Total",
   	         "deviceCount":5
5         }
      ]
   }
]
ParameterDefinition
context

Defines the attribute, to which the data is being populated. In this use case the context is “FeatureFeature-non-compliant-device-count-over-total”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 ( count of all devices registered with WSO2 EMM).
labelDefines the name of the grouped devices.
countThe number of devices in each category.