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.)
Introduction
The Cumulocity IoT API provides a wide range of API query capabilities, but only a subset is easily useable directly by the Microservice SDK for Java.
Mostly the inventory API provides the most capable (and complex) query language , which is heavily used in many projects. Also other APIs like alarm, event, measurement, audit and identity also can be used with the same approach!
Due to the wide variety of features, query language and URL parameters, the SDK does not support this i…
system
(system)
Closed
August 4, 2024, 10:09am
3
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.