# How to create Elasticsearch dashboard using dev tool\\console?

**URL:** <https://discuss.elastic.co/t/how-to-create-elasticsearch-dashboard-using-dev-tool-console/355451>\
**Category:** Elastic Search\
**Tags:** elastic-workplace-search\
**Created:** [March 15, 2024, 3:51am UTC](https://discuss.elastic.co/t/how-to-create-elasticsearch-dashboard-using-dev-tool-console/355451 "2024-03-15T03:51:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![maziar](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@maziar](https://discuss.elastic.co/u/maziar)\
**Post date:** [March 15, 2024, 3:51am UTC](https://discuss.elastic.co/t/how-to-create-elasticsearch-dashboard-using-dev-tool-console/355451/1 "2024-03-15T03:51:42Z")

</div>

I want to create elastic dashboard with python code.  
can I use dev tool\console for this purpose? if not, what is the alternative way?  
How can I download the Json file of my current dashboard?

 ![elasticdashboard](https://us1.discourse-cdn.com/elastic/original/3X/1/c/1cbb47a7c01a8e0e0d5aa60dbdc2081686311b50.png)

---

<div class="post-metadata">

**Author:** ![ashishtiwari1993](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashishtiwari1993/32/135241_2.png) [@ashishtiwari1993](https://discuss.elastic.co/u/ashishtiwari1993)\
**Post date:** [March 15, 2024, 8:15am UTC](https://discuss.elastic.co/t/how-to-create-elasticsearch-dashboard-using-dev-tool-console/355451/2 "2024-03-15T08:15:24Z")

</div>

Hi @maziar,

Welcome to the Elastic community.

You can use [import and export dashboard api](https://www.elastic.co/guide/en/kibana/current/dashboard-api.html). What you can do is

1. Create a dashboard and save as a object.
2. Export dashboard object and check what things you can make dynamic.
3. Once you done you import the object according to your requirement.

This is purely REST API, So you can hit using python.

---

<div class="post-metadata">

**Author:** ![maziar](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@maziar](https://discuss.elastic.co/u/maziar)\
**Post date:** [March 19, 2024, 12:33am UTC](https://discuss.elastic.co/t/how-to-create-elasticsearch-dashboard-using-dev-tool-console/355451/3 "2024-03-19T00:33:15Z")

</div>

thank you @ashishtiwari1993,  
for one dashboard I can import/export with API, but when I query all existing dashboards with

`curl -X GET 'https://127.0.0.1:5656/api/saved_objects/_find?type=dashboard`

it shows that I have 30 dashboards, but the list only contains 20 dashboards. that 20 dashboards are also randomly from page one and two, and it is not like it is returning only dashboards from page one.

```auto
[
    {
        "page": 1,
        "per_page": 20,
        "total": 30,
        "saved_objects": [
            {dashbords 1 to 20} 
     ]
}

```

I only have one space. Do you know what I am missing here to store all dashboards?

---

<div class="post-metadata">

**Author:** ![maziar](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@maziar](https://discuss.elastic.co/u/maziar)\
**Post date:** [March 24, 2024, 11:19am UTC](https://discuss.elastic.co/t/how-to-create-elasticsearch-dashboard-using-dev-tool-console/355451/4 "2024-03-24T11:19:14Z")

</div>

for others if they face the same issue, I was able to solve the problem to export all dashboards by increasing the page numbers

```auto
        page = 1
        per_page = 20
        dashboards_json = []

        while True:
            url = f'{ELASTIC_URL}/api/saved_objects/_find?type=dashboard&page={page}&per_page={per_page}'
            headers = {
                'kbn-xsrf': 'true',
                'Content-Type': 'application/json',
                'Authorization': self.secrets['ELASTIC_SECRET']
            }

            response = requests.request("GET", url, headers=headers)
            dashboards_json = dashboards_json + response.json()["saved_objects"]

            # If this is the last page, break the loop
            if page * per_page >= response.json()['total']:
                break
            # Otherwise, move to the next page
            page += 1

```

---

<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 21, 2024, 11:19am UTC](https://discuss.elastic.co/t/how-to-create-elasticsearch-dashboard-using-dev-tool-console/355451/5 "2024-04-21T11:19:16Z")

</div>

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