# REST API to get the visualization request body

**URL:** <https://discuss.elastic.co/t/rest-api-to-get-the-visualization-request-body/178414>\
**Category:** Kibana\
**Created:** [April 25, 2019, 9:37am UTC](https://discuss.elastic.co/t/rest-api-to-get-the-visualization-request-body/178414 "2019-04-25T09:37:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mayuri\_Patole](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mayuri_patole/32/45000_2.png) [@Mayuri\_Patole](https://discuss.elastic.co/u/Mayuri_Patole)\
**Post date:** [April 25, 2019, 9:37am UTC](https://discuss.elastic.co/t/rest-api-to-get-the-visualization-request-body/178414/1 "2019-04-25T09:37:26Z")

</div>

![req2](https://us1.discourse-cdn.com/elastic/original/3X/3/6/36a7dfdfd463d0e50b108df748915f87bba9892f.png)

I want to query the Kibana application and get the Elasticsearch request bodies used to build all the visualizations on a given dashboard.  
Is there any Rest API available to fetch request bodies of visualization ?

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [April 25, 2019, 12:19pm UTC](https://discuss.elastic.co/t/rest-api-to-get-the-visualization-request-body/178414/2 "2019-04-25T12:19:43Z")

</div>

Hi @Mayuri_Patole,

We don't have an API available for this right now. What is your use-case? We might be able to suggest an alternative, or add this as an enhancement request.

---

<div class="post-metadata">

**Author:** ![Mayuri\_Patole](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mayuri_patole/32/45000_2.png) [@Mayuri\_Patole](https://discuss.elastic.co/u/Mayuri_Patole)\
**Post date:** [April 26, 2019, 6:59am UTC](https://discuss.elastic.co/t/rest-api-to-get-the-visualization-request-body/178414/3 "2019-04-26T06:59:12Z")

</div>

Hi @Larry_Gregory,

I am migrating Kibana visualizations to our visualization tool, i am using visualization response which is compatible with our tool but for that, i need request bodies of all visualizations from every dashboard, so can you suggest a way to fetch all request bodies?

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [April 26, 2019, 11:02am UTC](https://discuss.elastic.co/t/rest-api-to-get-the-visualization-request-body/178414/4 "2019-04-26T11:02:11Z")

</div>

@Mayuri_Patole thanks for clarifying. I can't think of an automated way to do this, but one thing you could do is capture a HAR when loading a particular dashboard. That will show all of the requests that Kibana is making to ES (typically via `_msearch` for dashboards).

Here's a guide on capturing HARs if you're not familiar with them: [https://support.zendesk.com/hc/en-us/articles/204410413-Generating-a-HAR-file-for-troubleshooting](https://support.zendesk.com/hc/en-us/articles/204410413-Generating-a-HAR-file-for-troubleshooting)

---

<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:** [May 24, 2019, 11:02am UTC](https://discuss.elastic.co/t/rest-api-to-get-the-visualization-request-body/178414/5 "2019-05-24T11:02:26Z")

</div>

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