|
Parameter Name
|
Description
|
Base Type
|
|---|---|---|
|
startDate
|
The start date, including the specified date, from which the historical data should be purged.
|
DATETIME
|
|
endDate
|
The end date, including the specified date, up to which the historical data should be purged.
|
DATETIME
|
// Purging historical data of all logged properties between the given start and end dates
Things["TestThing"].PurgeAllPropertyHistory({
startDate: '2024-05-12T16:58:28.000Z' /* DATETIME */,
endDate: Date.now() /* DATETIME */
});
// Params for purging historical data from the past year
var purgeAllPropertyHistoryParams = {
startDate: new Date(new Date().setFullYear(new Date().getFullYear() - 1)),
endDate: Date.now()
};
Things["TestThing"].PurgeAllPropertyHistory(purgeAllPropertyHistoryParams);