added api functionality to admin model