fix index API call