Converted Monolith API to be able to do on-the-fly queries