使用Python API在Elasticsearch中检索数据流列表

发布于 2025-01-25 12:51:03 字数 133 浏览 2 评论 0原文

在Kibana Dev工具中,当我使用API​​调用get/_data_stream/时 我正在获取数据流列表。 以类似的方式,我想使用Elasticsearch 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

酒几许 2025-02-01 12:51:03

您需要使用以下Python代码作为描述在这里

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

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="*")
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文