|
Nombre del parámetro
|
Descripción
|
Tipo base
|
|---|---|---|
|
propertyName
|
Nombre de la propiedad para la que se deben depurar datos históricos.
|
STRING
|
|
startDate
|
La fecha de inicio, incluida la fecha especificada, a partir de la cual deben depurarse los datos históricos.
|
DATETIME
|
|
endDate
|
La fecha de fin, incluida la fecha especificada, hasta la cual deben depurarse los datos históricos.
|
DATETIME
|
|
immediate
|
Si es false, la depuración se ejecuta de forma asíncrona. El valor por defecto es false. Si se define en true, la depuración se ejecutará de forma síncrona.
|
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);