Is there a API which can get all beat.hostname in an index?

I have found the solution.

Also thanks a lot for you time.