The best way to achieve this is by using the Data Mesh feature as you already mentioned. You can refer to this guide - https://blog.dreamfactory.com/easier-data-marts-with-dreamfactory-data-mesh/
Also, you could also add certain conditions in the API call itself. Look at the documentation here - https://guide.dreamfactory.com/docs/chapter03.html#generating-a-mysql-backed-api.
Doing the above will result in only call one API endpoint to achieve the desired results. Let me know if it helps