The _cat/indices API will not give you usage over time. Also, Lens doesn't support arbitrary APIs.
To acquire the data in Elasticsearch and visualize it in Lens, you would need to poll that API and store the results in documents that also include a timestamp.
Another thing to try is to enable monitoring in Elasticsearch, which will internally collect this data and store it in the .monitoring-es-* index pattern. You can define a user role that has permission to read that data, and those users will be able to create Lens charts based on that data.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.