How to create index-pattern and import dashboard using REST API?


(Ahrtr) #1

Hi, I can create index-pattern and import dashboard using kibana GUI, but I'd like to do these tasks programatically. The kibana version what I am using is 6.2.2.

Thanks!


(Bill McConaghy) #2

We don't officially support using APIs to do this, but it can be done. You can open devtools in your browser and create an index pattern and import a dashboard, and then look at the network requests your browser makes and copy those for your own work.


(Ahrtr) #3

Thanks, it works!

But there is one minor issue. When I imported the dashboard & visualization JSON file programatically, I had to send a POST request for each saved object. Is it possible to just send one POST request for all saved objects which were saved in one JSON file?


(Bill McConaghy) #4

At the moment, you have to do this one at a time. There is a PR open to add the bulk create functionality to the saved objects API, but that will not be available until it gets merged and then released. You can follow this work here: https://github.com/elastic/kibana/pull/20498


(Ahrtr) #5

@Bill_McConaghy . Thanks you!


(system) #6

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