The default index pattern is part of the config saved object. To programmatically create a new index pattern and make it default, you have to create the index pattern saved object first, then write a config object in which the default index pattern is set to the id from the response of the first request.
The key in the config object holding the id of the index pattern is called defaultIndex
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.