Added index method for the api