Added get_index api call