Hi Sumedha,

These higher level APIs are provided at the product-emm level, thus the
path as "mdm-admin/...." (root path which we have been using for all the
emm realted console apis).

Cheers,
DIlan.

*Dilan U. Ariyaratne*
Software Engineer
WSO2 Inc. <http://wso2.com/>
Mobile: +94766405580 <%2B94766405580>
lean . enterprise . middleware


On Fri, Apr 22, 2016 at 11:46 AM, Sumedha Rubasinghe <sume...@wso2.com>
wrote:

> Dilan,
> Shouldn't it be '/devicemgt' instead of 'mdm-admin'?
>
> On Fri, Apr 22, 2016 at 11:24 AM, Dilan Udara Ariyaratne <dil...@wso2.com>
> wrote:
>
>> Hi Ramindu,
>>
>> I have just exposed two jax-rs apis for the following gadgets of the
>> landing dashboard page as discussed in the last UX/UI meeting held on April
>> 11th.
>> [1] Device-overview-gadget (GET https://localhost:9443/mdm-admin
>> /dashboard/device-overview) :
>>      To show device counts as TOTAL, ACTIVE, INACTIVE and REMOVED
>> [2] Potential-vlunerabilities (GET https://localhost:9443/mdm-admin/
>> dashboard/potential-vulnerabilities) :
>>      To show device counts as NON-COMPLIANT, UNMONITORED (NO-PASSCODE and
>> NO-ENCRYPTION data capturing in still under development)
>>
>> Would you be able to get a build of product-emm and try these APIs from
>> the portal app?
>>
>> I would be able to provide all the first-cut APIs for the landing
>> dashboard page by this evening.
>>
>> Cheers,
>> Dilan.
>>
>>
>> *Dilan U. Ariyaratne*
>> Software Engineer
>> WSO2 Inc. <http://wso2.com/>
>> Mobile: +94766405580 <%2B94766405580>
>> lean . enterprise . middleware
>>
>>
>> On Wed, Apr 20, 2016 at 12:07 PM, Ramindu De Silva <ramin...@wso2.com>
>> wrote:
>>
>>> Hi all,
>>>
>>> The following are the request-response structures for the IoT dashboard
>>> API. Please mention any suggestion or changes to the following
>>>
>>>
>>> 1. Retrieve connectivity status.
>>>
>>>>
>>>> *Request: *POST /connectivityStatus
>>>
>>> *{}*
>>>
>>> *response:* [
>>>>
>>> {
>>>
>>> "context": "deviceInfo",
>>>
>>> "data": [
>>>
>>> {
>>>
>>> "group": "active",
>>>
>>> "label": "active",
>>>
>>> "count": activeNo
>>>
>>> },
>>>
>>> {
>>>
>>> "group": "all",
>>>
>>> "label": "all",
>>>
>>> "count": activeNo + inactiveNo
>>>
>>> },
>>>
>>> {
>>>
>>> "group": "inactive",
>>>
>>> "label": "inactive",
>>>
>>> "count": inactiveNo
>>>
>>> }
>>>
>>> ]
>>>
>>> }
>>>
>>> ]
>>>
>>> 2. Retrieve vulnerabilities
>>>
>>>
>>>> *Request: *POST /securityConcerns
>>>> *{*
>>>> *}**response:* [
>>>>
>>> {
>>>
>>> "context": "securityConcerns",
>>>
>>> "data": [
>>>
>>> {
>>>
>>> "group": "no-passcode",
>>>
>>> "label": "No Passcode",
>>>
>>> "countChange": randint(100, 500),
>>>
>>> "count": randint(100, 500)
>>>
>>> },
>>>
>>> {
>>>
>>> "group": "no-encryption",
>>>
>>> "label": "Non encrypted",
>>>
>>> "countChange": randint(100, 500),
>>>
>>> "count": randint(100, 500)
>>>
>>> },
>>>
>>> {
>>>
>>> "group": "unmonitored",
>>>
>>> "label": "Unmonitored",
>>>
>>> "countChange": randint(100, 500),
>>>
>>> "count": randint(100, 500)
>>>
>>> }
>>>
>>> ]
>>>
>>> }
>>>
>>> ]
>>>
>>>
>>> 3. Retrieve non compliant features
>>>
>>>
>>>> *Request: *POST /nonCompliantDevices
>>>> *{*
>>>
>>> fromIndex: 10,
>>>
>>> count: 5
>>>
>>> *}*
>>>
>>> *response:*[
>>>
>>>  {
>>>
>>> "context": "nonCompliantDevices",
>>>
>>> "data":[
>>>
>>> {
>>>
>>> "group": "non-compliant-1",
>>>
>>> "label": "Non Compliant-1",
>>>
>>> "count": randint(100, 500)
>>>
>>> },
>>>
>>> {
>>>
>>> "group": "non-compliant-2",
>>>
>>> "label": "non-compliant-2",
>>>
>>> "count": randint(100, 500)
>>>
>>> },
>>>
>>> {
>>>
>>> "group": "non-compliant-3",
>>>
>>> "label": "non-compliant-3",
>>>
>>> "count": randint(100, 500)
>>>
>>> },
>>>
>>> {
>>>
>>> "group": "non-compliant-4",
>>>
>>> "label": "non-compliant-4",
>>>
>>> "count": randint(100, 500)
>>>
>>> },
>>>
>>> {
>>>
>>> "group": "non-compliant-5",
>>>
>>> "label": "non-compliant-5",
>>>
>>> "count": randint(100, 500)
>>>
>>> }
>>>
>>> ]
>>>
>>> }
>>>
>>> ]
>>>
>>>
>>> 4. Retrieve grouping: This has two types of requests request 1 without
>>> mentioning any filters and request 2 with a filter
>>>
>>>
>>>> *Request1: *POST /nonCompliantDevices
>>>> *[]*
>>>
>>> *response1:*[
>>>>     {
>>>>         "context": "platforms",
>>>>         "data": [
>>>>             {
>>>>                 "group": "ios",
>>>>                 "label": "iOS",
>>>>                 "count": randint(100, 500)
>>>>             },
>>>>             {
>>>>                 "group": "android",
>>>>                 "label": "Android",
>>>>                 "count": randint(100, 500)
>>>>             }
>>>>         ]
>>>>     },
>>>>     {
>>>>         "context": "ownerships",
>>>>         "data": [
>>>>             {
>>>>                 "group": "cope",
>>>>                 "label": "COPE",
>>>>                 "count": randint(100, 500)
>>>>             },
>>>>             {
>>>>                 "group": "byod",
>>>>                 "label": "BYOD",
>>>>                 "count": randint(100, 500)
>>>>             }
>>>>         ]
>>>>     },
>>>>     {
>>>>         "context": "userGroups",
>>>>         "data": [
>>>>             {
>>>>                 "group": "sales",
>>>>                 "label": "Sales",
>>>>                 "count": randint(100, 500)
>>>>             },
>>>>             {
>>>>                 "group": "marketing",
>>>>                 "label": "Marketing",
>>>>                 "count": randint(100, 500)
>>>>             },
>>>>             {
>>>>                 "group": "engineering",
>>>>                 "label": "Engineering",
>>>>                 "count": randint(100, 500)
>>>>             }
>>>>         ]
>>>>     }
>>>
>>> ]
>>>
>>>
>>>
>>>> *Request2: *POST /nonCompliantDevices
>>>> {
>>>> "filters": [
>>>>            {
>>>>             "filteringContext": "platform",
>>>> "filteringGroups" : ["Android"]
>>>>            }
>>>
>>>         ]
>>>
>>> }
>>>>
>>> *response2:*[
>>>>     {
>>>>         "context": "platforms",
>>>>         "data": [
>>>>             {
>>>>                 "group": "ios",
>>>>                 "label": "iOS",
>>>>                 "count": randint(100, 500)
>>>>             },
>>>>             {
>>>>                 "group": "android",
>>>>                 "label": "Android",
>>>>                 "count": randint(100, 500)
>>>>             }
>>>>         ]
>>>>     },
>>>>     {
>>>>         "context": "ownerships",
>>>>         "data": [
>>>>             {
>>>>                 "group": "cope",
>>>>                 "label": "COPE",
>>>>                 "count": randint(100, 500)
>>>>             },
>>>>             {
>>>>                 "group": "byod",
>>>>                 "label": "BYOD",
>>>>                 "count": randint(100, 500)
>>>>             }
>>>>         ]
>>>>     },
>>>>     {
>>>>         "context": "userGroups",
>>>>         "data": [
>>>>             {
>>>>                 "group": "sales",
>>>>                 "label": "Sales",
>>>>                 "count": randint(100, 500)
>>>>             },
>>>>             {
>>>>                 "group": "marketing",
>>>>                 "label": "Marketing",
>>>>                 "count": randint(100, 500)
>>>>             },
>>>>             {
>>>>                 "group": "engineering",
>>>>                 "label": "Engineering",
>>>>                 "count": randint(100, 500)
>>>>             }
>>>>         ]
>>>>     }
>>>
>>> ]
>>>
>>> 5. Retrieve Device table:
>>> *Request:*
>>>
>>>> POST /devices
>>>> {
>>>> "filters": [
>>>>         {
>>>>             "filter": "platform",
>>>> "selections" : ["Android", "iOS"]
>>>>         },
>>>>         {
>>>>             "filteringContext": "NonCompliantDevices",
>>>> "filteringGroups" : ["non-compliant-1"]
>>>>         }
>>>>     ],
>>>> }
>>>
>>>
>>>
>>> *response:* [
>>>
>>>
>>>
>>> {
>>>
>>> "context": "devices",
>>>
>>> "data": [
>>>
>>> {
>>>
>>> "id": "001",
>>>
>>> "label": "Nexus P",
>>>
>>> "status": "Blocked",
>>>
>>> "platform": "Android",
>>>
>>> "model": "HNP001",
>>>
>>> "actions": "Action"
>>>
>>> },
>>>
>>> {
>>>
>>> "id": "002",
>>>
>>> "label": "Galaxy Note 5",
>>>
>>> "status": "Unmonitored",
>>>
>>> "platform": "Android",
>>>
>>> "model": "SGN002",
>>>
>>> "actions": "Action"
>>>
>>> },
>>>
>>> {
>>>
>>> "id": "003",
>>>
>>> "label": "iPhone 6",
>>>
>>> "status": "Compliant",
>>>
>>> "platform": "iOS",
>>>
>>> "model": "AIP003",
>>>
>>> "actions": "Action"
>>>
>>> }
>>>
>>> ]
>>>
>>> }
>>>
>>> ]
>>>
>>>
>>> Best Regards,
>>>
>>>
>>> ---------- Forwarded message ----------
>>> From: Grainier Perera <grain...@wso2.com>
>>> Date: Tue, Mar 29, 2016 at 11:59 AM
>>> Subject: Re: API Requirements for IoT Snapshot Dashboard
>>> To: WSO2 Developers' List <dev@wso2.org>, Sriskandarajah Suhothayan <
>>> s...@wso2.com>, Dilan Udara Ariyaratne <dil...@wso2.com>, Prabath
>>> Abeysekera <praba...@wso2.com>, Sumedha Rubasinghe <sume...@wso2.com>
>>>
>>>
>>> Hi all,
>>> As per offline discussion, following are the finalized request-response
>>> structures for IoT snapshot dashboard API;
>>>
>>> 1. Retrieve security concerns for the given filters.
>>>
>>>>
>>>> *Request: *POST /securityConcerns
>>>> *[*
>>>>     {
>>>>         "*filteringContext*":"connectivityStatus",
>>>>         "*filteringGroups*":*[*"active"*]*
>>>>     },
>>>>     {
>>>>         "filteringContext":"alerts",
>>>>         "filteringGroups":["high"]
>>>>     }
>>>> *]*
>>>>
>>>> *Response:**[*
>>>>     {
>>>>         "*context*": "securityConcerns",
>>>>         "*data*": *[*
>>>>             {
>>>>                 "*group*": "non-compliant",
>>>>                 "*label*": "Non Compliant",
>>>>                 "*count*": 5
>>>>             },
>>>>             {
>>>>                 "group": "no-passcode",
>>>>                 "label": "No Passcode",
>>>>                 "count": 18
>>>>             },
>>>>             {
>>>>                 "group": "no-encryption",
>>>>                 "label": "Non encrypted",
>>>>                 "count": 23
>>>>             },
>>>>             {
>>>>                 "group": "unmonitored",
>>>>                 "label": "Unmonitored",
>>>>                 "count": 12
>>>>             }
>>>>         *]*
>>>>     }
>>>> *]*
>>>
>>>
>>> 2. Retrieve all devices.
>>>
>>>>
>>>> *Request:*POST /devices
>>>> *[]*
>>>>
>>>> *Response:**[*
>>>>     {
>>>>         "*context*": "devices",
>>>>         "*data*": *[*
>>>>             {
>>>>                 "*id*": "001",
>>>>                 "*label*": "Nexus P",
>>>>                 "*status*": "Blocked",
>>>>                 "*platform*": "Android",
>>>>                 "*model*": "HNP001",
>>>>                 "*actions*": URL,
>>>>             },
>>>>             {
>>>>                 "id": "002",
>>>>                 "label": "iPad Mini",
>>>>                 "status": "Inactive",
>>>>                 "platform": "iOS",
>>>>                 "model": "IPM005",
>>>>                 "actions": URL,
>>>>             }
>>>>         *]*
>>>>     }
>>>> *]*
>>>
>>>
>>> 3. Retrieve devices count for the given filters.
>>>
>>>>
>>>> *Request:*POST /devicesCount
>>>> *[*
>>>>     {
>>>>         "*filteringContext*":"connectivityStatus",
>>>>         "*filteringGroups*":*[*"active"*]*
>>>>     },
>>>>     {
>>>>         "filteringContext":"alerts",
>>>>         "filteringGroups":["high"]
>>>>     }
>>>> *]*
>>>>
>>>> *Response:**[*
>>>>     {
>>>>         "*context*": "deviceCount",
>>>>         "*data*": *[*
>>>>             {
>>>>                 "*group*": "totalCount",
>>>>                 "*label*": "Total Count",
>>>>                 "*count*": 210
>>>>             },
>>>>             {
>>>>                 "group": "filteredCount",
>>>>                 "label": "Filtered Count",
>>>>                 "count": 57
>>>>             }
>>>>        * ]*
>>>>     }
>>>> *]*
>>>
>>>
>>> Regards,
>>>
>>> On Fri, Mar 11, 2016 at 2:02 PM, Grainier Perera <grain...@wso2.com>
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I'm in the process of implementing the first phase of IoT Snapshot
>>>> Dashboard. So far I have managed to create generic bar (both vertical &
>>>> horizontal), stack charts (with inter gadget communication) and a LeafletJS
>>>> based OSM map gadget to be used with the IoT Snapshot Dashboard.
>>>>
>>>> However, there ain't any API to get required data to populate gadgets.
>>>> [1] describes the API requirements for the IoT Snapshot Dashboard.
>>>> Furthermore, as per offline discussion had with DilanA, we decided to use
>>>> following request/response structure and implement the required APIs.
>>>>
>>>> WDYT?
>>>>
>>>> i.e. : all security concerns for the given filters.
>>>> *Request:*
>>>>
>>>>> POST /iot-analytics/securityConcerns
>>>>> {
>>>>> "filters": [
>>>>>         {
>>>>>             "filter": "platform",
>>>>> "selections" : ["Android", "iOS"]
>>>>>         },
>>>>>         {
>>>>>             "filter": "ownership",
>>>>> "selections" : ["BYOD"]
>>>>>         }
>>>>>     ],
>>>>> }
>>>>
>>>>
>>>> *Response:*
>>>>
>>>>> {
>>>>> "status": "success",
>>>>> "message": null,
>>>>>   "data": {
>>>>>     [
>>>>>        {
>>>>>                "filter_id":"non-compliant",
>>>>>                "name":"Non Compliant Devices",
>>>>>                "count":12
>>>>>        },
>>>>>        {
>>>>>                "filter_id":"unmonitored",
>>>>>                "name":"Unmonitored Devices",
>>>>>                "count":15
>>>>>        }
>>>>> ]
>>>>>   },
>>>>> }
>>>>
>>>>
>>>>
>>>> [1]
>>>> https://docs.google.com/a/wso2.com/spreadsheets/d/1EjGCgMvo8Hgi8HQC9AjHxKVdfYYYMwwQ9Rxugk7lwIE/edit?usp=sharing
>>>>
>>>> Regards,
>>>> --
>>>> Grainier Perera
>>>> Software Engineer
>>>> Mobile : +94716122384
>>>> WSO2 Inc. | http://wso2.com
>>>> lean.enterprise.middleware
>>>>
>>>
>>>
>>>
>>> --
>>> Grainier Perera
>>> Software Engineer
>>> Mobile : +94716122384
>>> WSO2 Inc. | http://wso2.com
>>> lean.enterprise.middleware
>>>
>>>
>>>
>>>
>>> --
>>> *Ramindu De Silva*
>>> Software Engineer
>>> WSO2 Inc.: http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> email: ramin...@wso2.com <sanj...@wso2.com>
>>> mob: +94 772339350
>>> mob: +94 782731766
>>>
>>
>>
>
>
> --
> /sumedha
> m: +94 773017743
> b :  bit.ly/sumedha
>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to