# Get a Kibana Dashboard and some Visualizations from that Dashbor using API

**URL:** <https://discuss.elastic.co/t/get-a-kibana-dashboard-and-some-visualizations-from-that-dashbor-using-api/185283>\
**Category:** Kibana\
**Created:** [June 11, 2019, 9:40pm UTC](https://discuss.elastic.co/t/get-a-kibana-dashboard-and-some-visualizations-from-that-dashbor-using-api/185283 "2019-06-11T21:40:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![robegome](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@robegome](https://discuss.elastic.co/u/robegome)\
**Post date:** [June 11, 2019, 9:40pm UTC](https://discuss.elastic.co/t/get-a-kibana-dashboard-and-some-visualizations-from-that-dashbor-using-api/185283/1 "2019-06-11T21:40:36Z")

</div>

Hello, I would like to get two dashboards... each dashboard has multiple visualizations and well I want to get some of those visualizations...

Using API (version 5.6), I could get the dashsboards:

```
curl -XGET localhost:5601/api/kibana/dashboards/export?dashboard=andc-KVStoreBoard1 -H 'kbn-xsrf: true' > andcDataStore.json

curl -XGET localhost:5601/api/kibana/dashboards/export?dashboard=andc-ProxyBoard1 -H 'kbn-xsrf: true' > andcProxy.json

```

and checking an extract of one of those json files, This is the output...:

> {  
> "version": "5.6.4",  
> "objects": [  
> {  
> "id": "andc-KVHealthyValue",  
> "type": "visualization",  
> "version": 1,  
> "attributes": {  
> "title": "andc\_KVHealthyValue",  
> "visState": "{"title":"andc\_KVHealthyValue","type":"line","params":{"addTooltip":true,"addLegend":true,"legendPosition":"right","show  
> Circles":true,"interpolate":"linear","scale":"linear","drawLinesBetweenPoints":true,"radiusRatio":9,"times":,"addTimeMarker":false,"defaultY  
> Extents":false,"setYExtents":false,"grid":{"categoryLines":false,"style":{"color":"#eee"}},"categoryAxes":[{"id":"CategoryAxis-1","type":"  
> category","position":"bottom","show":true,"style":{},"scale":{"type":"linear"},"labels":{"show":true,"truncate":100},"title":{"text":"  
> @timestamp per minute"}}],"valueAxes":[{"id":"ValueAxis-1","name":"LeftAxis-1","type":"value","position":"left","show":true,"style":{},"  
> scale":{"type":"linear","mode":"normal","setYExtents":false,"defaultYExtents":false},"labels":{"show":true,"rotate":0,"filter":false,"trun  
> cate":100},"title":{"text":"HealthyValue"}}],"seriesParams":[{"show":"true","type":"line","mode":"stacked","data":{"label":"HealthyVal  
> ue","id":"1"},"valueAxis":"ValueAxis-1","drawLinesBetweenPoints":true,"showCircles":true,"interpolate":"linear","radiusRatio":9}],"type":"  
> line"},"aggs":[{"id":"1","enabled":true,"type":"min","schema":"metric","params":{"field":"health\_val","customLabel":"HealthyValue"}},  
> {"id":"2","enabled":true,"type":"date\_histogram","schema":"segment","params":{"field":"@timestamp","interval":"m","customInterval":"2  
> h","min\_doc\_count":1,"extended\_bounds":{}}}],"listeners":{}}",  
> "uiStateJSON": "{}",  
> "description": "",  
> "version": 1,  
> "kibanaSavedObjectMeta": {  
> "searchSourceJSON": "{"index":"andc-kvpingstats-_","query":{"query\_string":{"query":"_","analyze\_wildcard":true}},"filter":}"  
> }  
> },  
> "col": 1,  
> "panelIndex": 4,  
> "row": 3,  
> "size\_x": 3,  
> "size\_y": 3  
> },  
> {  
> "id": "andc-KVRepNodes",  
> "type": "visualization",  
> "version": 1,  
> "attributes": {  
> "title": "andc\_KVRepNodes",  
> "visState": "{"title":"andc\_KVRepNodes","type":"pie","params":{"addTooltip":true,"addLegend":true,"legendPosition":"right","isDonut"  
> :false},"aggs":[{"id":"1","enabled":true,"type":"count","schema":"metric","params":{"customLabel":"RepNodes"}},{"id":"2","enabled":t  
> rue,"type":"terms","schema":"segment","params":{"field":"shard","size":100,"order":"desc","orderBy":"1"}},{"id":"3","enabled":true  
> ,"type":"terms","schema":"segment","params":{"field":"resource","size":100,"order":"desc","orderBy":"1"}}],"listeners":{}}",  
> "uiStateJSON": "{}",  
> "description": "",  
> "version": 1,  
> "kibanaSavedObjectMeta": {  
> "searchSourceJSON": "{"index":"andc-kvrnopstats-_","query":{"query\_string":{"query":"_","analyze\_wildcard":true}},"filter":}"  
> }  
> },  
> "col": 4,  
> "panelIndex": 6,  
> "row": 3,  
> "size\_x": 3,  
> "size\_y": 3  
> },  
> {  
> "id": "andc-AdminEvents",  
> "type": "search",  
> "version": 3,  
> "attributes": {  
> "title": "andc\_AdminEvents",  
> "description": "",  
> "hits": 0,  
> "columns": [  
> "planName",  
> "state",  
> "generalTask\_NotStarted",  
> "migratePartition\_Running"  
> ],  
> "sort": [  
> "@timestamp",  
> "desc"  
> ],  
> "version": 1,  
> "kibanaSavedObjectMeta": {  
> "searchSourceJSON": "{"index":"andc-kvevents-_","query":{"query\_string":{"query":"type:kvPlanStats","analyze\_wildcard":true}},"filter"  
> :[],"highlight":{"pre\_tags":["@kibana-highlighted-field@"],"post\_tags":["@/kibana-highlighted-field@"],"fields":{"_":{}},"require\_field\_match":f  
> alse,"fragment\_size":2147483647}}"  
> }  
> },  
> "col": 7,  
> "columns": [  
> "planName",  
> "state",  
> "generalTask\_NotStarted",  
> "migratePartition\_Running"  
> ],  
> "panelIndex": 12,  
> "row": 9,  
> "size\_x": 6,  
> "size\_y": 4,  
> "sort": [  
> "@timestamp",  
> "desc"  
> ]  
> },  
> "col": 10,  
> "panelIndex": 14,  
> "row": 13,  
> "size\_x": 3,  
> "size\_y": 3  
> },

I just want to get some of those visualizations... not all of them... so this is the doubt:

**How I could create a curl line to get some visualizations from a specific dashboard?**

Thanks!

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [June 12, 2019, 5:20pm UTC](https://discuss.elastic.co/t/get-a-kibana-dashboard-and-some-visualizations-from-that-dashbor-using-api/185283/2 "2019-06-12T17:20:14Z")

</div>

You can use the saved object API to get visualizations by id. 5.6 does not have any documentation on the saved object API but its there [https://github.com/elastic/kibana/blob/5.6/src/server/saved\_objects/routes/get.js#L4](https://github.com/elastic/kibana/blob/5.6/src/server/saved_objects/routes/get.js#L4). You can look at the [current saved object API documentation](https://www.elastic.co/guide/en/kibana/7.x/saved-objects-api.html) but things may have changed so you may be better off just looking at the source for how the API works

---

<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:** [July 10, 2019, 5:33pm UTC](https://discuss.elastic.co/t/get-a-kibana-dashboard-and-some-visualizations-from-that-dashbor-using-api/185283/3 "2019-07-10T17:33:27Z")

</div>

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