I created Indices by Elasticsearch API, to create visualization I need the index pattern ID of that particular index. Is there a possible way to create an index pattern using API
Advertisement
Answer
Yes, you can create an index pattern via the 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-*" } }'