Hi @dooghi,
You can use Camunda native query API to create such filters.
Below is an example of a native process instance query.
runtimeService.createNativeProcessInstanceQuery().sql("SELECT * FROM " + managementService.getTableName(ProcessInstance.class)).list()
You can join with Task table to get the intended results
Below is another example of a native task query
Also, you can embed Camunda REST API in a custom JAX-RS application. (to extend it)