如何使用API和索引名创建索引模式

2024-05-01 21:14:55 发布

您现在位置:Python中文网/ 问答频道 /正文

我通过ElasticSearchAPI创建了索引,为了创建可视化,我需要该特定索引的索引模式ID。是否有可能使用API创建索引模式


Tags: apiid可视化模式elasticsearchapi
1条回答
网友
1楼 · 发布于 2024-05-01 21:14:55

是的,您可以通过Saved Object API创建索引模式

$ curl -X POST <kibana-host>:<port>/api/saved_objects/index-pattern/index-pattern-id  -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
{
  "attributes": {
    "title": "my-index-*"
  }
}'

相关问题 更多 >