|
매개 변수 이름
|
설명
|
기본 유형
|
|---|---|---|
|
propertyName
|
기록 데이터를 제거해야 하는 속성의 이름입니다.
|
STRING
|
|
startDate
|
기록 데이터를 제거해야 하는 시작 날짜(지정된 날짜 포함)입니다.
|
DATETIME
|
|
endDate
|
기록 데이터를 제거해야 하는 종료 날짜(지정된 날짜 포함)입니다.
|
DATETIME
|
|
immediate
|
false이면 제거는 비동기적으로 실행됩니다. 기본값은 false입니다. true로 설정하면 제거가 동기적으로 실행됩니다.
|
BOOLEAN
|
// Purging historical data between the given start and end dates
Things["TestThing"].PurgePropertyHistory({
propertyName: 'propertyA-Logged' /* STRING */,
startDate: '2024-05-12T16:58:28.000Z' /* DATETIME */,
endDate: 'Date.now()' /* DATETIME */,
immediate: true /* BOOLEAN {"defaultValue":false} */
});
// Params for purging historical data from the past year
var purgeHistoryParams = {
propertyName: 'propertyA-Logged' /* STRING */,
startDate: new Date(new Date().setFullYear(new Date().getFullYear() - 1)),
endDate: Date.now(),
immediate: true /* BOOLEAN */
};
Things["TestThing"].PurgePropertyHistory(purgeHistoryParams);