Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt
Description

Get the

connectivity status of the devices

details of active, inactive, removed and total number of registered devices in WSO2 EMM.

Resource Path/
dashboard/devices
device-count-overview
URL

/mdm-admin/dashboard/

devices

device-count-overview

HTTP MethodGET
Request/Response Formatapplication/json
cURL command
Code Block
curl -
v
X 
-L
GET -
G -
H "Content-Type: application/json" -H "Authorization: Bearer <EMM_API_TOKEN>" -k -v https://<EMM_HOST>:<EMM_HTTPS_PORT>/mdm-admin/dashboard/
devices
device-count-overview
  • 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
X 
-L
GET -
G -
H "Content-Type: application/json" -H "Authorization: Bearer 0ff0f5c5ef202f5abd933efef370a28c" -k -v https://localhost:9443/mdm-admin/dashboard/
devices
device-count-overview
 Sample output
Code Block
> GET /mdm-admin/dashboard/devices-count-overview HTTP/1.1
> User-Agent: curl/7.38.0
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer 0ff0f5c5ef202f5abd933efef370a28c
>
< HTTP/1.1 200 OK
< Cache-Control: private
< Expires: Thu, 01 Jan 1970 05:30:00 IST
< Date: Fri, 29 Apr 2016 11:32:49 GMT
< Content-Type: application/json
< Content-Length: 232
< Server: WSO2 Carbon Server
[{"context":"connectivity-status","data":[{"group":"total","label":"Total","count":5},{"group":"active","label":"Active","count":4},{"group":"inactive","label":"Inactive","count":0},{"group":"removed","label":"Removed","count":1}]}]
Anchor
sample
sample
Sample JSON
Definition 
Code Block
[  
   {  
      "context":"connectivity-status",
      "data":[  
         {  
            "group":"total",
            "label":"Total",
            "count":5
         },
         {  
            "group":"active",
            "label":"Active",
            "count":4
         },
         {  
            "group":"inactive",
            "label":"Inactive",
            "count":0
         },
         {  
            "group":"removed",
            "label":"Removed",
            "count":1
         }
      ]
   }
]
ParameterDefinition
context
The value of context key shows the concerning attribute

Defines the attribute, to which the data is being populated

under data key is related. Here the concerning attribute is “connectivity-status”

. In this use case the attribute is connectivity-status.

dataDefines the data received.
group

The devices are grouped as follows:

  • 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.
labelDefines the name of the grouped devices.
countThe number of devices in each category.