Corteza module analytics rest api

Is there a way to get analytics such as count depending on various conditions by analyzing module records using rest API?

Lets say I have two fields source and medium, how to get count of records groupby source then sub group by medium under each source

You can use the Reporter Reporting :: Corteza Docs

can i apply filtering on data source dynamically from rest API and not some constant filter in the UI itself?