completed views by date api function