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 <[email protected]> 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
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev