I am currently using _cat/indices and parsing the return of that.. But I wondered if there's a nicer api method that will just return an array of index names?
With /_cat/indices
you can add a format
parameter to get the results back in either YAML or JSON format:
GET _cat/indices?format=json
or
GET _cat/indices?format=yaml
A structured result like that might be easier for you to parse automatically?