Grid RESTful API Supported Functions
Grid RESTful API Start-up Guide
14
"activeEvents": {},
"address": "1",
"location": "R&D Lab Unit 1",
"status_class": "status_normal",
"status": "Normal",
"oldStatus": "Normal",
"BOILERLEADLAGSETPOINTDEGC": 58.9
},
{
"parameters": {
"node_id": "2"
},
"type": "BAC_IP_Falcon_Steam",
"mapping": "BAC_IP_Falcon_Steam",
"name": "BAC_IP_Falcon_Steam_2_",
"path":
"/profileView/devices/BAC_IP_Falcon_Steam_2_",
"node": "Dev_2",
"events": {
"alarm": true,
"trouble": false,
"warning": false
},
"activeEvents": {},
"address": "2",
"status_class": "status_normal",
"status": "Alarm",
"oldStatus": "Normal",
"BURNER_ENABLE": 1
}
]
}
}
A query can narrow the entire data set down by:
•
selecting only certain gateway devices (e.g. gateways reporting an Alarm state), using the
deviceFilter
parameter.
•
selecting only certain downstream devices within the selected gateway devices (e.g. those
reporting an Alarm status), using the
dataFilter
parameter.
•
selecting only certain data paths to be read from the selected downstream devices, using the
path parameter.
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
o
deviceFilter
– MongoDB-style query object (see
https://www.npmjs.com/package/sift
); this
option can only be specified by posting parameters in a JSON payload
If no gateway device selection criteria are given, all gateways are queried.
Use with care! Not
specifying IIoT device(s) will cause requests to be sent to all IIoT devices!
•
path
(optional):
o
either a path string, pointing to a value within each downstream field device (boiler) object,
e.g.
"propertyName/subPropertyName"
o
or an array of such path strings, e.g.
["propertyName_1/subPropertyName_1",
"propertyName_2/subPropertyName_2"]
o
note that any unmatched path value is simply ignored and left out of the result
o
if no path is specified, all available values are returned
•
options
(optional)
– an optional object containing:
o
dataFilter
– a MongoDB-style sift query object (see
https://www.npmjs.com/package/sift
result objects relating to downstream field devices are only included in the response if they
match this filter
JSON Response:
data object
containing an
Array
of filtered query response objects.
Example 1
– POST URL:
(no JSON parameters specified)
/rest/method/fieldpop-api/getDeviceData?happn_token=eyJ0eXAiOiJKV1QiLC