const timeseries = [
{ name: 'Pressure sensor', assetId: 123 },
{ name: 'Temperature sensor', description: 'Pump abc', unit: 'C' },
];
const createdTimeseries = await client.timeseries.create(timeseries);
const timeseries = await client.timeseries.list({ filter: { assetIds: [1, 2] }});
const timeseries = await client.timeseries.retrieve([
{ id: 123 },
{ externalId: 'abc' }
]);
const timeseries = await client.timeseries.search({
filter: {
isString: false,
},
search: {
query: 'Temperature'
}
});
await client.timeseries.syntheticQuery([
{
expression: "24 * TS{externalId='production/hour', aggregate='average', granularity='1d'}",
start: '48h-ago',
end: 'now',
limit: 100
}
]);
const timeseries = await client.timeseries.update([{
id: 3785438579439,
update: {
name: { set: 'New name' }
}
}]);
Aggregate timeseries
const aggregates = await client.timeseries.aggregate({ filter: { isString: true } }); console.log('Number of string timeseries: ', aggregates[0].count)