API for returning json and multiple records