/
Managing DLA Rules

Managing DLA Rules


This managing DLA rules examples contains the following tasks:

Task 1:  Show the Second Page of Configured DLA Rules 

This example displays the second page of configured DLA rules for the LON protocol with device type LHp_5k6, and page size 3. 

Begin by using the following REST request: 
    GET  /iap/devTypes/*+protocol==lon&typeName==LHp_5k6/if/*/*/*/dla?pg=2&sz=3&includeUnconfigured=false 

Response:

200 - Success

With the following body:   

Body
[{
	"id":4,
	"protocol":"lon",
	"deviceTypeName":"LHp_5k6",
	"fullDpName":"device/0/nvoEPpos",
	"polled":true,"pollInterval":"60",
	"publishInterval":120,
	"publishMinDeltaTime":0,
	"publishMinDeltaValue":"Any",
	"initialValue":null,
	"monitored":true,
	"logged":true,
	"alarmed":true,
	"logMultiply1":1,
	"logMultiply2":1,
	"logMultiply3":1,
	"logInterval1": 15,
	"logInterval2": 60,
	"logInterval3": 1440,
	"logRetention1": 31,
	"logRetention2": 92,
	"logRetention3": 730,
	"logMinDeltaTime": 0,
	"logMinDeltaValue": "Always",
	"alarmName":"CustomAlarm_LHP5k6_Energy",
	"highWarning":8,
	"lowWarning":4,
	"highAlarm":6,
	"lowAlarm":3
},
{
	"id":5,
	"protocol":"lon",
	"deviceTypeName":"LHp_5k6",
	"fullDpName":"device/0/nvoPF",
	"polled":true,
	"pollInterval":"60",
	"publishInterval":120,
	"publishMinDeltaTime":0,
	"publishMinDeltaValue":"Any",
	"initialValue":null,
	"monitored":true,
	"logged":true,
	"alarmed":true,
	"logMultiply1":1,
	"logMultiply2":1,
	"logMultiply3":1,
	"logInterval1": 15,
	"logInterval2": 60,
	"logInterval3": null,
	"logRetention1": 31,
	"logRetention2": 61,
	"logRetention3": null,
	"logMinDeltaTime": 0,
	"logMinDeltaValue": "Always",
	"alarmName": "CustomAlarm_LHP5k6_PF",
	"highWarning": 8,
	"lowWarning": 4,
	"highAlarm": 6,
	"lowAlarm": 3
},
{
	"id":6,
	"protocol":"lon",
	"deviceTypeName":"LHp_5k6",
	"fullDpName":"device/0/nvoU_F",
	"polled":true,
	"pollInterval":"60",
	"publishInterval":120,
	"publishMinDeltaTime":0,
	"publishMinDeltaValue":"Any",
	"initialValue":null,
	"monitored":true,
	"logged":true,
	"alarmed":true,
	"logMultiply1":1,
	"logMultiply2":1,
	"logMultiply3":1,
	"logInterval1": 15,
	"logInterval2": 60,
	"logInterval3": null,
	"logRetention1": 31,
	"logRetention2": 61,
	"logRetention3": null,
	"logMinDeltaTime": 0,
	"logMinDeltaValue": "Always",
	"alarmName": "CustomAlarm_LHP5k6_Voltage",
	"highWarning": 8,
	"lowWarning": 4,
	"highAlarm": 6,
	"lowAlarm":3
}]


Task 2:  Edit a DLA Rule 

This example edits the DLA rule where ID=4, and sets the value of "logInterval1" to 30.

Begin by using the following REST request: 
    PUT  /iap/dlaRules  

With the following body:   

Body
{
	"id":4,
	"protocol":"lon",
	"deviceTypeName":"LHp_5k6",
	"fullDpName":"device/0/nvoEPpos",
	"polled":true,
	"pollInterval":"60",
	"publishInterval":120,
	"publishMinDeltaTime":0,
	"publishMinDeltaValue":"Any",
	"initialValue":null,
	"logMultiply1":1,
	"logMultiply2":1,
	"logMultiply3":1,
	"logInterval1":30,
	"logInterval2":60,
	"logInterval3":1440,
	"logRetention1":31,
	"logRetention2":92,
	"logRetention3":730,
	"logMinDeltaTime":0,
	"logMinDeltaValue":"Always",
	"alarmName":"CustomAlarm_LHP5k6_Energy",
	"highWarning":8,
	"lowWarning":4,
	"highAlarm":6,
	"lowAlarm":3
}


Task 3:  Copy the Properties from a DLA Rule 

This example copies the properties from the DLA rule with ID=4 to the device/0/nvoEPrev datapoint.

Begin by using the following REST request to receive available datapoints: 
    GET  /iap/dlaRules/*+protocol==lon&typeName==LHp_5k6/datapointsToCopy?fullDpName=device/0/nvoEPpos 

Select the device/0/nvoEPrev datapoint from the response, and use the following request to create a new DLA with the properties from the rule with ID=4:
    PUT  /iap/dlaRules 

With the following body:   

Body
{
	"protocol":"lon",
	"deviceTypeName":"LHp_5k6",
	"fullDpName":"device/0/nvoEPrev",
	"polled":true,
	"pollInterval":"60",
	"publishInterval":120,
	"publishMinDeltaTime":0,
	"publishMinDeltaValue":"Any",
	"initialValue":null,
	"logMultiply1":1,
	"logMultiply2":1,
	"logMultiply3":1,
	"logInterval1":30,
	"logInterval2":60,
	"logInterval3":1440,
	"logRetention1":31,
	"logRetention2":92,
	"logRetention3":730,
	"logMinDeltaTime":0,
	"logMinDeltaValue":"Always",
	"alarmName":"CustomAlarm_LHP5k6_Energy",
	"highWarning":8,
	"lowWarning":4,
	"highAlarm":6,
	"lowAlarm":3
}																																																														

Response:

200 - Success

With the following body:   

Body
{
	"id":7,
	"protocol":"lon",
	"deviceTypeName":"LHp_5k6",
	"fullDpName":"device/0/nvoEPrev",
	"polled":true,
	"pollInterval":"60",
	"publishInterval":120,
	"publishMinDeltaTime":0,
	"publishMinDeltaValue":"Any",
	"initialValue":null,
	"monitored":true,
	"logged":true,
	"alarmed":true,
	"logMultiply1":1,
	"logMultiply2":1,
	"logMultiply3":1,
	"logInterval1":30,
	"logInterval2":60,
	"logInterval3":1440,
	"logRetention1":31,
	"logRetention2":92,
	"logRetention3":730,
	"logMinDeltaTime":0,
	"logMinDeltaValue":"Always",
	"alarmName":"CustomAlarm_LHP5k6_Energy",
	"highWarning":8,
	"lowWarning":4,
	"highAlarm":6,
	"lowAlarm":3
}


Task 4:  Export DLA Rules 

This example exports all rules except the rule with ID=7.

Begin by using the following REST request to receive available datapoints: 
    PUT  /iap/dlaRules/exportAll   

With the following body:   

Body
{
	"exclude":[7]
}

Response:

200 - Success 

With a file that has a .dla extension.


Task 5:  Clear DLA Rules 

This example clears DLA rules with ID=5 and ID=6.

Begin by using the following REST request:
    PUT  /iap/dlaRules/clear   

With the following body:   

Body
[5,6]

Response:

204 - Success 




Related content

Creating a DLA File Manually
Creating a DLA File Manually
More like this
Transformation Service
Transformation Service
More like this
Custom Web Page Examples
Custom Web Page Examples
More like this