devicehive-java-server icon indicating copy to clipboard operation
devicehive-java-server copied to clipboard

Different response schemas on Device Notification GET /device/notification/poll

Open edubovik opened this issue 10 years ago • 1 comments

#136 JSON response starts with "notification" key. In other endpoints there is no such key (/device/{deviceGuid}/notification - has no such key for example )

/device/notification/poll

[
    {
        "notification": {
            "id": 2044623717,
            "notification": "$device-update",
            "deviceGuid": "first_ESP",
            "timestamp": "2015-11-15T21:22:26.508",
            "parameters": {
                "id": "first_ESP",
                "name": "first_ESP",
                "status": "Online",
                "data": null,
                "network": {
                    "id": 274,
                    "key": "P361MWQ08GNKDJL5",
                    "name": "Network WJNAZP for ([email protected])",
                    "description": "Playground Network"
                },
                "deviceClass": {
                    "id": 16,
                    "name": "ESP Class",
                    "version": "0.4",
                    "isPermanent": false,
                    "offlineTimeout": 120,
                    "data": null,
                    "equipment": []
                },
                "isBlocked": null
            }
        },
        "deviceGuid": "first_ESP"
    }
]

/device/{deviceGuid}/norification

[
    {
        "id": 1536288645,
        "notification": "$device-update",
        "deviceGuid": "3d77f31c-bddd-443b-b11c-640946b0581z4123f",
        "timestamp": "2015-11-10T15:26:59.477",
        "parameters": {
            "id": "3d77f31c-bddd-443b-b11c-640946b0581z4123f",
            "name": "Graphical Example Device",
            "status": "OFFLINE",
            "data": null,
            "network": {
                "id": 196,
                "key": "P361MWQ0JWNKDJL5",
                "name": "Network BPGDDJ for ([email protected])",
                "description": "Playground Network"
            },
            "deviceClass": {
                "id": 55,
                "name": "Graphical Device",
                "version": "1.0",
                "isPermanent": false,
                "offlineTimeout": null,
                "data": null,
                "equipment": []
            },
            "isBlocked": false
        }
    }
]

edubovik avatar Nov 16 '15 12:11 edubovik

@edubovik, Eugene, could you please specify whether you noticed the problem on REST or Websocket end points?

zubrabubra avatar Nov 17 '15 11:11 zubrabubra