Create a Measurement filter

Hi,

I have Api :
https://xyz/measurement/measurements/series/?source=123&dateFrom=2024-02-01T00:00:00.000Z&dateTo=2024-02-01T23:00:00.000Z&pageSize=1440&revert=true&series=fragmentName.seriesname

need to call Above this using MeasurementApi.
Format the above Api as below example.

Example: final MeasurementFilter filter = new MeasurementFilter().bySource(new GId(deviceId)).byType(fragment).byDate(oneHourBack.toDate(), currentTime.toDate());

please reply with the MeasurementFilter for above mentioned Api

Have you checked out the doc? Not all of the REST API supported filter are supported in the SDK unfortunately.

https://resources.cumulocity.com/documentation/javasdk/current/com/cumulocity/sdk/client/measurement/MeasurementFilter.html

Beside that you can add non-supported query params by implementing them yourself, roughly described here (e.g. extending the existing filter etc.)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.