Create api to fetch stats data