Set the index to use the api as well.