# MicroserviceSDK no revert parameter in MeasurementFilter or QueryParam

**URL:** <https://community.cumulocity.com/t/microservicesdk-no-revert-parameter-in-measurementfilter-or-queryparam/2434>\
**Category:** Forum\
**Tags:** MicroserverSDK, cumulocity\
**Created:** [June 6, 2024, 8:57am UTC](https://community.cumulocity.com/t/microservicesdk-no-revert-parameter-in-measurementfilter-or-queryparam/2434 "2024-06-06T08:57:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![David.Richter](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@David.Richter](https://community.cumulocity.com/u/David.Richter)\
**Post date:** [June 6, 2024, 8:57am UTC](https://community.cumulocity.com/t/microservicesdk-no-revert-parameter-in-measurementfilter-or-queryparam/2434/1 "2024-06-06T08:57:26Z")

</div>

Hi guys,

I use the MicroserviceSDK (Spring + Kotlin) to build something like a facade around the MeasurmentAPI. My microservice has as params the following that I map one to one to the MeasurmentAPI.

```auto
fun getMeasurements(
        @RequestParam("source") source: String,
        @RequestParam("pagesize") pageSize: Int?,
        @RequestParam("valueFragmentSeries") valueFragmentSeries: String?,
        @RequestParam("valueFragmentType") valueFragmentType: String?,
        @RequestParam("dateFrom") dateFrom: DateTime?,
        @RequestParam("dateTo") dateTo: DateTime?,
        @RequestParam("revert") revert: Boolean?,
    )

```

The problem is that I don’t find a way to give the revert param into the MeasurmentAPI. I try to find the parameter in MeasurementFilter but there is no revert parameter. So I try to find it in QueryParam where I can only find WITH\_TOTAL\_PAGES, WITH\_PARENTS, WITH\_CHILDREN and SKIP\_CHILDREN\_NAMES. So how to query against `platform.measurementApi` with revert parameter?

---

<div class="post-metadata">

**Author:** ![Christian\_Guether1](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/christian_guether1/32/14848_2.png) [@Christian\_Guether1](https://community.cumulocity.com/u/Christian_Guether1)\
**Post date:** [June 6, 2024, 9:37am UTC](https://community.cumulocity.com/t/microservicesdk-no-revert-parameter-in-measurementfilter-or-queryparam/2434/2 "2024-06-06T09:37:21Z")

</div>

Hi David,

have a look at the this article [Best-Practices to use the Microservice SDK for Java for custom API queries](https://community.cumulocity.com/t/best-practices-to-use-the-microservice-sdk-for-java-for-custom-api-queries/7177). It describes how you can create your own custom `QueryParam` in case it isn’t supported by the Microservice SDK. The interesting part should be this one: [Create a convenience class for code simplification](https://community.cumulocity.com/t/best-practices-to-use-the-microservice-sdk-for-java-for-custom-api-queries/7177#create-a-convenience-class-for-code-simplification-7).

Best regards

  

* * *

Christian Guether

[Software AG Professional Services](https://www.softwareag.com/en_corporate/resources/services/professional-services.html)

[![](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/c/3/c3a93a2618e4708f51be40fe2e142061f7c4edc7.jpeg)](https://www.softwareag.com/en_corporate/resources/services/fast-track-services.html)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [December 3, 2024, 9:37am UTC](https://community.cumulocity.com/t/microservicesdk-no-revert-parameter-in-measurementfilter-or-queryparam/2434/3 "2024-12-03T09:37:23Z")

</div>

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