curious_ands
curious_ands

Reputation: 15

Retrieving DataStream list in Elasticsearch using python API

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?

Upvotes: 1

Views: 1391

Answers (1)

Sagar Patel
Sagar Patel

Reputation: 5486

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="*")

Upvotes: 2

Related Questions