Hi Ramindu,

Here are two more APIs (in addition to the two APIs, provided above) that
will cover the backend data requirements of the entire EMM dashboard
landing page.

[3] GET https://localhost:9443/mdm-admin/dashboard/non-compliant-by-feature
<https://localhost:9443/mdm-admin/dashboard/device-overview>
Response:
[{
    "context": "non-compliant-device-counts-by-features",
    "data": [{
        "count": 4,
        "label": "PASSCODE_POLICY",
        "group": "PASSCODE_POLICY"
    }, {
        "count": 1,
        "label": "WIFI",
        "group": "WIFI"
    }]
}]

[4] GET https://localhost:9443/mdm-admin/dashboard/device-groupings
<https://localhost:9443/mdm-admin/dashboard/device-overview>
Response:
[{
    "context": "device-Counts-by-platforms",
    "data": [{
        "count": 3,
        "label": "android",
        "group": "android"
    }, {
        "count": 1,
        "label": "ios",
        "group": "ios"
    }, {
        "count": 1,
        "label": "windows",
        "group": "windows"
    }]
}, {
    "context": "device-Counts-by-ownership-types",
    "data": [{
        "count": 3,
        "label": "BYOD",
        "group": "BYOD"
    }, {
        "count": 2,
        "label": "COPE",
        "group": "COPE"
    }]
}]

I will also provide rest of the APIs for the secondary dashboard page with
all the filtering capabilities ASAP.

Cheers,
Dilan.


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


On Sat, Apr 23, 2016 at 1:01 PM, Tharik Kanaka <tha...@wso2.com> wrote:

> Hi Ramindu,
>
> I am suggesting to change the naming convention. According to
>  [Architecture] REST API Guidelines, if there are multiple names those
> should be separated by a dash and camel case should be avoided. So all the
> places like "connectivityStatus" needs to be updated as
> "connectivity-status".
>
> Regards,
>
> On Sat, Apr 23, 2016 at 12:17 PM, Ramindu De Silva <ramin...@wso2.com>
> wrote:
>
>> Hi Dilan,
>>
>> I will build the product and try out the APIs and let you know.
>>
>> Best Regards,
>>
>> On Fri, Apr 22, 2016 at 11:53 AM, Dilan Udara Ariyaratne <dil...@wso2.com
>> > wrote:
>>
>>> @Ramindu,
>>>
>>> If you want to manually check the APIs, please go through the following
>>> documentation to get an access token.
>>>
>>> https://docs.wso2.com/display/EMM201/Generating+the+OAuth+2.0+Access+Token
>>>
>>> For the provided APIs, following are the request and response formats as
>>> discussed.
>>> [1] GET https://localhost:9443/mdm-admin/dashboard/device-overview
>>>      Response:
>>>      [{
>>>             "context": "overview",
>>>             "data": [{
>>>                  "count": 5,
>>>                  "label": "Total",
>>>                  "group": "total"
>>>              }, {
>>>                  "count": 4,
>>>                  "label": "Active",
>>>                  "group": "active"
>>>              }, {
>>>                  "count": 0,
>>>                  "label": "Inactive",
>>>                  "group": "inactive"
>>>              }, {
>>>                  "count": 1,
>>>                  "label": "Removed",
>>>                  "group": "removed"
>>>              }]
>>>       }]
>>>
>>> [2] GET https://localhost:9443/mdm-admin/dashboard/
>>> potential-vulnerabilities
>>> <https://localhost:9443/mdm-admin/dashboard/potential-vulnerabilities>
>>>      Response:
>>>      [{
>>>              "context": "potential-vulnerabilities",
>>>              "data": [{
>>>                   "count": 5,
>>>                   "label": "Non-Compliant",
>>>                   "group": "non-complaint"
>>>               }, {
>>>                   "count": 0,
>>>                   "label": "Unmonitored",
>>>                   "group": "unmonitored"
>>>               }]
>>>       }]
>>>
>>> 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: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",
>>>>>>
>>>>> ...
>>
>> [Message clipped]
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> *Tharik Kanaka*
>
> WSO2, Inc |#20, Palm Grove, Colombo 03, Sri Lanka
>
> Email: tha...@wso2.com | Web: www.wso2.com
>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to