2.3.3
Device Type: System View
GetDeviceData (System View v.2, v.3)
Description: Retrieve the data available under the specified device and data path.
HTTP Verb: GET or POST
URL:
/rest/method/fieldpop-api/getDeviceData
Parameters:
•
happn_token - token obtained from the login request.
•
IIoT device selector (optional) – one of two ways of specifying the target IIoT device(s):
o
deviceID - the IIoT gateway ID (see Section 3.1.1)
deviceFilter – MongoDB-style query object (see https://www.npmjs.com/package/sift); this
o
option can only be specified by posting parameters in a JSON payload
•
path (optional) - the path of the values to read from the specified gateway devices. This can be
done at multiple levels:
o
no path - the response will contain all devices with all their properties
o
device - the response will contain the properties of the specified device
o
device/property - the response will just contain the property value
JSON Response: data object - includes all data matching specified path parameter:
•
no path - all available data for all devices.
•
device - all available properties for specified device.
•
device/property - value of specified property on specified device.
Example GET URL: (no path specified)
/rest/method/fieldpop-api/getDeviceData?happn_token=eyJ0eXAiOiJKV1QiLC&deviceID=blazescowl_VygDWeqmz
Example JSON Response: (no path specified)
{
"message": "Call successful",
"data": {
"Device_1_Profile_1": {
"parameters": {
"node_id": "1",
"parameter1": "1",
"parameter2": "1"
},
"type": "Device1",
"mapping": "Device1",
"name": "Device_1_Profile_1",
"path": "/profileView/devices/Device_1_Profile_1",
"node": "Dev_1_1",
"events": {
"alarm": false,
"trouble": false,
"warning": false
},
"activeEvents": {},
"status_class": "status_normal",
"status": "Normal",
"oldStatus": "Normal",
"property0": 1,
"property1": 1,
"alarm_property": 0,
"trouble_property": 0
Grid RESTful API Supported Functions
},
"Device_1_Profile_2": {
},
"Device_2_Profile_1": {
Grid RESTful API Start-up Guide
"parameters": {
"node_id": "2",
"parameter1": "1",
"parameter2": "2"
},
"type": "Device1",
"mapping": "Device1",
"name": "Device_1_Profile_2",
"path": "/profileView/devices/Device_1_Profile_2",
"node": "Dev_1_2",
"events": {
"alarm": false,
"trouble": false,
"warning": false
},
"activeEvents": {},
"status_class": "status_normal",
"status": "Normal",
"oldStatus": "Normal",
"property0": 1,
"property1": 2,
"alarm_property": 0,
"trouble_property": 0
10
Need help?
Do you have a question about the Grid RESTful API and is the answer not in the manual?
Questions and answers