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 2 Next »

Description

Get a count of number of devices belonging to a particular device type, based on the device type.

Resource Path/dashboard/devices-with-details
URL

/mdm-admin/dashboard/devices-with-details

HTTP MethodGET
Request/Response Formatapplication/json
cURL command
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/devices-with-details-d “pagination-enabled=false”
  • 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:

curl -v -L -G -H "Content-Type: application/json" -H "Authorization: Bearer c148a833a9c3d30bb5197788eaad5541" -k -v https://localhost:9443/mdm-admin/dashboard/devices-with-details -d “pagination-enabled=false”
  1. Filter the device based on the following required parameter:
    • Pagination-enabled  - To enable/disable pagination set the value as true or false.

      If pagination is enabled you have to also set the following query parameters:

      • start-index - Provide the starting pagination index. Example 10
      • length - Provide how many policy details you require from the starting pagination index. For example if you require the non-compliant policy details from the 10th pagination index to the 15th, you must define 10 as the value for start and 5 as the value for length.
  2. Filter the device details using the query parameters given below:

    • connectivity-status - Provide the connectivity status of the device. This can be one of the following:

        • Total: All the devices that have registered with WSO2 EMM.
        • active: The devices that are registered with WSO2 EMM and are actively communicating with the server.
        • inactive: The devices that are registered with WSO2 EMM but unable to actively communicate with the server.
        • removed: The devices that have unregistered from WSO2 EMM.
           
    • potential-vulnerability -Provide details of the potential vulnerabilities of the device. This can be:

        • non-compliant: Devices that have not complied to the policies enforced on the device by WSO2 EMM.
        • unmonitored: Devices that have no policy assigned to them.
           
    • 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
> GET /mdm-admin/dashboard/devices-with-details?pagination-enabled=false HTTP/1.1
> User-Agent: curl/7.38.0
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer 9a5212a2c170f71990e5be8f8a1a4430
>
< HTTP/1.1 200 OK
< Cache-Control: private
< Expires: Thu, 01 Jan 1970 05:30:00 IST
< Date: Mon, 09 May 2016 13:26:53 GMT
< Content-Type: application/json
< Content-Length: 496
* Server WSO2 Carbon Server is not blacklisted
< Server: WSO2 Carbon Server
<
* Connection #0 to host localhost left intact
[{"context":"filtered-devices-with-details","data":[{"deviceId":1,"platform":"android","ownershipType":"BYOD","connectivityStatus":"REMOVED"},{"deviceId":2,"platform":"android","ownershipType":"COPE","connectivityStatus":"ACTIVE"},{"deviceId":3,"platform":"android","ownershipType":"COPE","connectivityStatus":"ACTIVE"},{"deviceId":4,"platform":"ios","ownershipType":"BYOD","connectivityStatus":"ACTIVE"},{"deviceId":5,"platform":"windows","ownershipType":"BYOD","connectivityStatus":"ACTIVE"}]}]
Sample JSON Output Definition 
[{
    "context": "Filtered-devices-with-details",
    "data": [{
   	 "deviceId": 1,
   	 "platform": "android",
   	 "ownershipType": "BYOD",
   	 "connectivityStatus": "REMOVED"
    }, {
   	 "deviceId": 2,
   	 "platform": "android",
   	 "ownershipType": "COPE",
   	 "connectivityStatus": "ACTIVE"
    }, {
   	 "deviceId": 3,
   	 "platform": "android",
   	 "ownershipType": "COPE",
   	 "connectivityStatus": "ACTIVE"
    }, {
   	 "deviceId": 4,
   	 "platform": "ios",
   	 "ownershipType": "BYOD",
   	 "connectivityStatus": "ACTIVE"
    }, {
   	 "deviceId": 5,
   	 "platform": "windows",
   	 "ownershipType": "BYOD",
   	 "connectivityStatus": "ACTIVE"
    }]
}]
ParameterDefinition
context

Defines the attribute, to which the data is being populated. In this use case the context is “Filtered-devices-with-details”.

data

Defines the data received. In this use case, the data will be filtered and paginated (if pagination is enabled).

  • No labels