finish up indices Optimize API call