check index exists endpoint + index tests #19