Managing Datapoint Logs

You can store historical datapoint values for use in trend display, data analytics, and historical reference.  Up to three logging interval/retention period pairs can be specified to prune data as it ages.  

See Datapoint Logs in the IAP Reference for more information on each API.

IAP/REST Operations

Returns the properties describing the logging configuration for the specified datapoints and log levels.

GET     /iap/devs/{id}/if/{block_type}/{block_handle}/{dp_name}/logs/{level}                                          
Get logging configuration for specified datapoint
Example: https://localhost:8443/iap/devs/*/if/*/*/nviPT/logs
Response:
[
{
"id": 352,
"local": "2019-01-12 02:27:46.045 Europe/Kirov",
"utc": "2019-01-11 23:27:46.045 UTC",
"deviceId": "Ab93fcpn.2",
"deviceName": "00D07111EAC0",
"blockName": "device",
"blockIndex": "0",
"datapointName": "nviPT",
"deviceState": "provisioned",
"deviceHealth": "normal",
"root": {
"level1": {
"interval": 60,
"retention": 2,
"logMultiple": null
},
"level2": {
"interval": 120,
"retention": 0,
"logMultiple": null
},
"level3": {
"interval": 180,
"retention": 0,
"logMultiple": null
},
"minDeltaTime": 0,
"minDeltaValue": "ALWAYS"
}
}
]


Returns the properties describing the logging configuration for the specified datapoints and log levels. The minDeltaValue property specifies the required minimum change of value from the last logged value to log an updated value.

GET     /iap/devs/{id}/if/{block_type}/{block_handle}/{dp_name}/logs/minDeltaValue                    
Get minDeltaValue DP logs
Example: https://localhost:8443/iap/devs/*/if/*/*/nvoEPpos/logs/minDeltaValue
Response:
[
{
"id": 433,
"local": "2019-01-12 02:27:46.045 Europe/Kirov",
"utc": "2019-01-11 23:27:46.045 UTC",
"deviceId": "Ab93fcpn.2",
"deviceName": "00D07111EAC0",
"blockName": "device",
"blockIndex": "0",
"datapointName": "nvoEPpos",
"deviceState": "provisioned","deviceHealth": "normal",
"minDeltaValue": "ALWAYS"
}
]


Returns the properties describing the logging configuration for the specified datapoints and log levels. The minDeltaTime property specifies the minimum number of seconds between logged values.

GET     /iap/devs/{id}/if/{block_type}/{block_handle}/{dp_name}/logs/minDeltaTime                     
Get minDeltaTime DP logs
Example: https://localhost:8443/iap/devs/*/if/*/*/nvoEPpos/logs/minDeltaTime
Response:
[
{
"id": 433,
"local": "2019-01-12 02:27:46.045 Europe/Kirov",
"utc": "2019-01-11 23:27:46.045 UTC",
"deviceId": "Ab93fcpn.2",
"deviceName": "00D07111EAC0",
"blockName": "device",
"blockIndex": "0",
"datapointName": "nvoEPpos",
"deviceState": "provisioned",
"deviceHealth": "normal",
"minDeltaTime": 0
}
]



Sets properties specifying the logging configuration for the specified datapoints and log levels.

PUT     /iap/devs/{id}/if/{block_type}/{block_handle}/{dp_name}/logs/{level}                                          
Set logging configuration for specified datapoint
Example: https://localhost:8443/iap/devs/*/if/*/*/nvoEPpos/logs/1
Request payload:
{
"interval": 30,
"retention": 1,
"logMultiple": null
}
Response:
Response code 200


Sets properties specifying the logging configuration for the specified datapoints and log levels.  The minDeltaValue property specifies the required minimum change of value from the last logged value to log an updated value.

PUT     /iap/devs/{id}/if/{block_type}/{block_handle}/{dp_name}/logs/minDeltaValue                    
Set minDeltaValue
Example: https://localhost:8443/iap/devs/*/if/*/*/nvoEPpos/logs/minDeltaValue
Request payload:
100
Response:
Response code 200


Sets properties specifying the logging configuration for the specified datapoints and log levels.  The minDeltaTime property specifies the minimum number of seconds between logged values.

PUT     /iap/devs/{id}/if/{block_type}/{block_handle}/{dp_name}/logs/minDeltaTime                     
Set minDeltaTime
Example: https://localhost:8443/iap/devs/*/if/*/*/nvoEPpos/logs/minDeltaTime
Request payload:
30
Response:
Response code 200



Disables logging for the specified datapoints and log levels. If minDeltaValue or minDeltaTime are not specified, sets the interval to "0" and the retention interval to "0" for the specified log level.

DELETE/iap/devs/{id}/if/{block_type}/{block_handle}/{dp_name}/logs/{level}                                         


If minDeltaValue is specified, the specified property is set to "0".

DELETE/iap/devs/{id}/if/{block_type}/{block_handle}/{dp_name}/logs/minDeltaValue                   


If minDeltaTime is specified, the specified property is set to "0".

DELETE/iap/devs/{id}/if/{block_type}/{block_handle}/{dp_name}/logs/minDeltaTime                    
Disable logging for specified datapoint
Examples:
https://localhost:8443/iap/devs/*/if/*/*/nvoPF/logs/minDeltaValue
https://localhost:8443/iap/devs/*/if/*/*/nvoPF/logs/minDeltaTime
https://localhost:8443/iap/devs/*/if/*/*/nvoPF/logs/3
Response:
Response code 200