I just tried this command in Kibana 6.1.3, and confirmed that it didn't work. Steps to reproduce the issue,
- Load some sample data into elasticsearch 6.1.3 cluster;
- Create two index patterns "sample1-* " and "sample2-* ", and make "sample1-* " as the default one. Everything is OK so far;
- Change the default index pattern to "sample2-*" using the following command,
curl -XPOST -H "Content-Type: application/json" -H "kbn-xsrf: true" http://10.111.193.69:5601/api/kibana/settings/defaultIndex -d '{"value": "sample2-*"}' -u elastic:Changeme123
The response of the above command was:
{"settings":{"buildNum":{"userValue":16371},"defaultIndex":{"userValue":"sample2-*"},"xPackMonitoring:showBanner":{"userValue":false}}}
- Go to kibana UI --> Management -> Index pattern, I expected to see that "example2-*" was the default one, but actual result was that I saw a warning message "No default index pattern.".
By the way, I do not find any REST APIs in the offical site as below to ceate/query/update objects, i.e., index patterns, users, roles. Can you please point me the exact link containing these info?