Simple API that selects from a table and returns as dictionary or JSON