Retrieving DataStream list in Elasticsearch using python API

1k Views Asked by At

In Kibana dev tools, When I am using the API call GET /_data_stream/ I am getting the list of DataStream. In similar way I want to retrieve it using the Elasticsearch Python API, I am not able to find the way. Can anyone please help me?

1

There are 1 best solutions below

0
Sagar Patel On

You need to use below python code as describe here:

from elasticsearch import Elasticsearch
es = Elasticsearch(hosts=["localhost:9200"])
resp= es.indices.get_data_stream(name="*")