Optional
realtime: RealtimeCreates a new measurement.
Response wrapped in IResult
Example
const mandantoryObject: Partial<IMeasurementCreate> = {
sourceId: device.id,
fragment: { series: { unit: '%', value: 51 } },
};
(async () => {
const {data, res} = await measurementService.create(mandantoryObject);
})();
At least sourceId is mandantory.
Removes a measurement with given id.
Response wrapped in IResult
As of version 10.16.0.0 and the usage of the time series database, deleting a single measurement via id is not supported any more.
Example
const id: number = 1;
(async () => {
const {data, res} = await measurementService.delete(id);
})();
Gets the details of selected measurement.
Response wrapped in IResult
As of version 10.16.0.0 and the usage of the time series database, reading a single measurement via id is not supported any more.
Example
const measurementId: number = 1;
(async () => {
const {data, res} = await measurementService.detail(measurementId);
})();
Entity or Id of the entity.
Object containing filters for querying measurements.
Example
const filter: object = {
pageSize: 100,
withTotalPages: true
};
(async () => {
const {data, res, paging} = await measurementService.list(filter);
})();
This class allows for managing measurements.