Added index segments API call and test

Change-Id: I41e8880519e681214aa587ddc041d96af703e8fd