|
Parameter name
|
Description
|
Base Type
|
|---|---|---|
|
startDate
|
The start date, including the specified date, from which the historical should be purged.
|
DATETIME
|
|
endDate
|
The last date, including the specified date, for which the historical data should be purged.
|
DATETIME
|
|
propertiesToPurge
|
Names of the properties for which data should be purged. The names of the properties are passed in an infotable. The expected Data Shape for the infotable is PropertyList.
|
INFOTABLE
|
// Creating an infotable using the required datashape for specifying the names of properties to purge
var propertiesToPurge = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape( {
infoTableName : "InfoTable",
dataShapeName : "PropertyList"
});
// Adding the names of properties to the infotable created above
propertiesToPurge.AddRow({ propertyName: "propertyA-Logged" });
propertiesToPurge.AddRow({ propertyName: "propertyB-Logged" });
// Purging history
Things["TestThing"].PurgeSelectedPropertyHistory({
propertiesToPurge: propertiesToPurge, /* INFOTABLE */
startDate: 0, /* DATETIME */
endDate: dateAddYears((new Date()),1000) /* DATETIME */
});