# Get the "request" that a dashboard or a visualization have

**URL:** https://discuss.elastic.co/t/get-the-request-that-a-dashboard-or-a-visualization-have/279769
**Category:** Kibana
**Tags:** elastic-stack-monitoring
**Created:** [July 27, 2021, 7:09pm UTC](https://discuss.elastic.co/t/get-the-request-that-a-dashboard-or-a-visualization-have/279769 "2021-07-27T19:09:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![aza-zil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aza-zil/32/92217_2.png) [@aza-zil](https://discuss.elastic.co/u/aza-zil)
#### Post date: [July 27, 2021, 7:09pm UTC](https://discuss.elastic.co/t/get-the-request-that-a-dashboard-or-a-visualization-have/279769/1 "2021-07-27T19:09:39Z")

</div>

Hey, is there anyway to get the request that a dashboard or a visualization uses to get the data programmatically?  
Or is there any api that I can use to get the data of a dashboard?  
thanks

---

<div class="post-metadata">

### Author: ![Dzmitry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dzmitry/32/65026_2.png) [@Dzmitry](https://discuss.elastic.co/u/Dzmitry)
#### Post date: [July 30, 2021, 10:44am UTC](https://discuss.elastic.co/t/get-the-request-that-a-dashboard-or-a-visualization-have/279769/2 "2021-07-30T10:44:27Z")

</div>

Hi @aza-zil ,

Let's start with visualization: depending on type, Kibana has different end-points for this purpose.  
If you open DevTools Network tab in Chrome you can compare TSVB vs Tag Cloud/Data Table/etc and see the difference. Usually you will be able to find ES request in body of the following requests:  
`/api/metrics/vis/data` and `/internal/bsearch`.

Since dashboard combines multiple visualisations, you can expect it to have multiple requests for different types of visualisations. There is no single end-point to get all the data by `dashboardId`.  
First you can use [saved objects API](https://www.elastic.co/guide/en/kibana/master/saved-objects-api.html) to get a list of panels by `dashboardId` like:

```auto
POST /api/saved_objects/_bulk_get
    {
        "id": "722b74f0-b882-11e8-a6d9-e546fe2bba5f",
        "type": "dashboard"
    }

```

Then you can repeat requests that you saw on individual visualisations, Kibana by itself is making some optimisation for dashboards to request data in batch. You can check it by tracking the same Network tab and loading a dashboard:

 ![Screenshot 2021-07-30 at 12.25.30](https://us1.discourse-cdn.com/elastic/original/3X/8/d/8db6be8983a182aa69c7e2c416ad8c4c0fa2fd2a.jpeg)

So there is no easy solution, it depends on what you want to achieve. If you are interested in just data stored in ES, you may try to use [ES Search API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html)

Regards, Dima

---

<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: [August 27, 2021, 10:45am UTC](https://discuss.elastic.co/t/get-the-request-that-a-dashboard-or-a-visualization-have/279769/3 "2021-08-27T10:45:03Z")

</div>

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