await client.datapoints.insert([{ id: 123, datapoints: [{timestamp: 1557320284000, value: -2}] }]);
const data = await client.datapoints.retrieve({ items: [{ id: 123 }] });
const monthlyAggregatesData = await client.datapoints.retrieveDatapointMonthlyAggregates({ items: [{ id: 123 }] });
const datapoints = await client.datapoints.retrieveLatest([
{
before: 'now',
id: 123
},
{
externalId: 'abc',
before: new Date('21 jan 2018'),
}
]);
Delete data points
await client.datapoints.delete([{id: 123, inclusiveBegin: new Date('1 jan 2019')}]);