Hi, My use case is I want to fetch devices which were created in last 24 hours. Now I can do that with REST endpoint by fetching all the devices and compare the time with creation Time fragment. I want to know:-
How to use the custom filter to fetch the devices. I want to use the custom filter something like creationTime between 2023-06-12T12:00:00.000Z and 2023-06-12T12:59:59.999Z so that I can get the devices which were created in 24 hours.
I tried this with rest endpoint : /inventory/managedObjects?q=$filter = creationTime eq '2023-05-17T13:14:17.471Z'
but got this error:
{
"error": "inventory/Invalid Data",
"message": "Find by filter query failed : Query '$filter = creationTime eq '2023-05-17T13:14:17.471Z'' could not be understood. Please try again.",
"info": "https://www.cumulocity.com/guides/reference/rest-implementation//#a-name-error-reporting-a-error-reporting"
}
I hope you understand what I am trying to achieve with this.
How to use this same (1.) custom filter in the JAVA SDK, is there any method?
How to use the withParents = true filter, in JAVA SDK. In rest endpoint, I am able to hit /inventory/managedObjects?fragmentType=c8y_IsDevice&pageSize=2000&withParents=true
but how can i use the withParents = true filter in sdk.