Does kibana have a api about creating indexpattern?


(whoami) #1

does kibana have a api about creating indexpattern?
I wanna create indexpattern in background


#2

Hi @whoami here is how you can create an index pattern with a curl command :

curl -f -XPOST -H 'Content-Type: application/json' -H 'kbn-xsrf: anything' 'http://localhost:5601/api/saved_objects/index-pattern/logstash-*' '-d{"attributes":{"title":"logstash-*","timeFieldName":"@timestamp"}}'

Just change the 2 logstash-* to whatever pattern you want


(whoami) #3

thank you


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.