# How to write a Python script to create dashboard in Kibana 6.2.2

**URL:** <https://discuss.elastic.co/t/how-to-write-a-python-script-to-create-dashboard-in-kibana-6-2-2/123475>\
**Category:** Kibana\
**Created:** [March 12, 2018, 5:09am UTC](https://discuss.elastic.co/t/how-to-write-a-python-script-to-create-dashboard-in-kibana-6-2-2/123475 "2018-03-12T05:09:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohanparikh](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rohanparikh](https://discuss.elastic.co/u/rohanparikh)\
**Post date:** [March 12, 2018, 5:09am UTC](https://discuss.elastic.co/t/how-to-write-a-python-script-to-create-dashboard-in-kibana-6-2-2/123475/1 "2018-03-12T05:09:50Z")

</div>

Hello All

I am new to elasticsearch and I am learning by searching tutorials but what I found is writing python program to get the data from a URL or retrieving a data

Now I want to learn how to create dashboard using python script. I know how to do using manually by GUI

Please help or suggest any tutorial or documentation if you have

Thanks

---

<div class="post-metadata">

**Author:** ![supergunme](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@supergunme](https://discuss.elastic.co/u/supergunme)\
**Post date:** [March 12, 2018, 6:54am UTC](https://discuss.elastic.co/t/how-to-write-a-python-script-to-create-dashboard-in-kibana-6-2-2/123475/2 "2018-03-12T06:54:05Z")

</div>

Normally, you have two ways as we practiced.

a) IP:9200/.kibana/doc/\<doc\_type\>  
b) IP:5601/api/saved\_objects/\<doc\_type\>

You may have issues to create index pattern when option A. However it is not supported for option B in lower version of Elastic stack like 5.2.

---

<div class="post-metadata">

**Author:** ![rohanparikh](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rohanparikh](https://discuss.elastic.co/u/rohanparikh)\
**Post date:** [March 12, 2018, 7:08am UTC](https://discuss.elastic.co/t/how-to-write-a-python-script-to-create-dashboard-in-kibana-6-2-2/123475/3 "2018-03-12T07:08:08Z")

</div>

Thanks Steven

Do you have any example script? So that I can follow it

---

<div class="post-metadata">

**Author:** ![supergunme](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@supergunme](https://discuss.elastic.co/u/supergunme)\
**Post date:** [March 12, 2018, 8:52am UTC](https://discuss.elastic.co/t/how-to-write-a-python-script-to-create-dashboard-in-kibana-6-2-2/123475/4 "2018-03-12T08:52:28Z")

</div>

I did not have a sample yet, but I am able to give you some ideas.

a) Python module: requests  
b) With open to loop directory/files in different types  
c) Http headers: X-Pack/Kibana API/etc

---

<div class="post-metadata">

**Author:** ![rohanparikh](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@rohanparikh](https://discuss.elastic.co/u/rohanparikh)\
**Post date:** [March 12, 2018, 9:25am UTC](https://discuss.elastic.co/t/how-to-write-a-python-script-to-create-dashboard-in-kibana-6-2-2/123475/5 "2018-03-12T09:25:21Z")

</div>

Ok thanks Steven

I will try it

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 9, 2018, 9:25am UTC](https://discuss.elastic.co/t/how-to-write-a-python-script-to-create-dashboard-in-kibana-6-2-2/123475/6 "2018-04-09T09:25:36Z")

</div>

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