rack endpoint to query for data returning in json format.