What product/components do you use and which version/fix level are you on?
Java Cumulocity SDK 1015.120.0
EventApi
Is your question related to the free trial, or to a production (customer) instance?
Its at an Enterprise Tenant
What are you trying to achieve? Please describe it in detail.
-
We would like to have a possibility to filter in the query for more than one custom property.
-
We would like to have a possibility to search inside of the property (if they are string) for text fragments.
How could the code look like
For 1.
var eventFilter = new EventFilter();
eventFilter.byType(type).bySource(lineId).byFragmentType(“recipeValue”).byFragmentType(“productName”);
var firstSearchEvent = eventApi.getEventsByFilter(eventFilter).get(WITH_TOTAL_PAGES);
(of course we would need the framentValue of the REST api as well but we could not find it in the Java API
For 2.
var eventFilter = new EventFilter();
eventFilter.byType(type).bySource(lineId).byFragmentType("name").byFragmentValue(".*test.*");
var firstSearchEvent = eventApi.getEventsByFilter(eventFilter).get(WITH_TOTAL_PAGES);
result could look like (in json):
{
…
name: 'Test order'
…
},
{
…
name: 'Order to test output'
…
}
We would like to filter for a text fragment if the fragment we are searching is a String.