Grid RESTful API Supported Functions
Grid RESTful API Start-up Guide
9
2.3.2 All Field Device Types
DeviceDataLog
Description:
Get all data logs available to user, narrowed down by optional parameters.
HTTP Verb:
GET or POST
URL:
/rest/method/fieldpop-api/deviceDataLog
Parameters:
•
happn_token
- Token obtained from the login request.
•
deviceID
– the IIoT gateway ID (see
Section
).
•
startUTCsec
(optional) - Start time in seconds since start of UTC epoch.
•
endUTCsec
(optional) - End time in seconds since start of UTC epoch.
JSON Response:
Object containing time series data.
Example GET URL:
/rest/method/fieldpop-api/deviceDataLog?happn_token=eyJ0eXAiOiJKV1QiLCJhbGci&deviceID=lavenderqueste
r_4k9q5oU-Q&startUTCsec=1502375626
Example POST URL:
/rest/method/fieldpop-api/deviceDataLog?happn_token=eyJ0eXAiOiJKV1QiLCJhbGci
Example POST Payload:
{
"parameters": {
"deviceID": "lavenderquester_4k9q5oU-Q",
"path": "lavenderquester_4k9q5oU-Q/BAC_IP_Steam_1/Blower",
"startUTCsec": 1499332783,
"endUTCsec": 1499334577
}
}
Example JSON Response:
{
"message": "Call successful",
"data": {
"Steam_2": {
"Main_Valve": [
{
"time": 1502375626,
"value": 0
},
{
"time": 1502376528,
"value": 0
},
{
"time": 1502377421,
"value": 0
}
],
"FIRING_RATE": [
{
"time": 1502375626,
"value": 0
},
{
"time": 1502376528,
"value": 0
},
{
"time": 1502377421,
"value": 0
}
]
}
},
"error": null
}