# Kibana\[5.6\] Using API endpoints to save objects

**URL:** <https://discuss.elastic.co/t/kibana-5-6-using-api-endpoints-to-save-objects/147044>\
**Category:** Kibana\
**Created:** [September 3, 2018, 9:48am UTC](https://discuss.elastic.co/t/kibana-5-6-using-api-endpoints-to-save-objects/147044 "2018-09-03T09:48:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinay\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinay_kumar/32/35089_2.png) [@Vinay\_Kumar](https://discuss.elastic.co/u/Vinay_Kumar)\
**Post date:** [September 3, 2018, 9:48am UTC](https://discuss.elastic.co/t/kibana-5-6-using-api-endpoints-to-save-objects/147044/1 "2018-09-03T09:48:24Z")

</div>

Kibana version: **5.6**  
Hi,  
My issue is related to the **REST API endpoints**.  
Currently, I am able to save my dashboards using the GUI of Kibana in json format in my local drive.  
I wanted to enquire **_whether it is possible for me to save/create a visualization object by using curl_** and request like this `POST <kibana_url>/api/saved_objects/<type>` to save/create my object.

Also I am able to view the JSON output of the following links:

- https://`<host-url>`/kibana-monit/api/saved\_objects/visualization/Node-DEMO
- https://`<host-url>`/kibana-monit/api/saved\_objects/

Thank you.

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [September 4, 2018, 12:24pm UTC](https://discuss.elastic.co/t/kibana-5-6-using-api-endpoints-to-save-objects/147044/2 "2018-09-04T12:24:25Z")

</div>

Hey @Vinay_Kumar, while it's technically possible for you to reverse engineer how Visualizations are saved and create/update them using CURL, this isn't supported and will likely break between different versions of Kibana.

---

<div class="post-metadata">

**Author:** ![Vinay\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinay_kumar/32/35089_2.png) [@Vinay\_Kumar](https://discuss.elastic.co/u/Vinay_Kumar)\
**Post date:** [September 5, 2018, 6:56am UTC](https://discuss.elastic.co/t/kibana-5-6-using-api-endpoints-to-save-objects/147044/3 "2018-09-05T06:56:46Z")

</div>

Hey thanks a lot, @Brandon_Kobel, Let me extend this discussion little bit.

so currently I've been using the validate API of elasticsearch in order to validate my query.  
the URL that I am hitting is as follows:

`curl -X GET -H 'Content-Type: application/json' --data @query.json 'http://``/_validate/query?explain=true`

the file `query.json` contains the following:  
`{ "query": { "match_all": {} }, "filter": [{ "meta": { "index": "Node-DEMO", "negate": false, "disabled": false, "alias": null, "type": "exists", "key": "node_stats.indices.docs.count", "value": "exists" }, "exists": { "field": "index_stats.total.query_cache.miss_count" } }] }`

**Error that I received:** org.elasticsearch.common.ParsingException: request does not support [filter]

Is it possible to validate this query?

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [September 5, 2018, 7:49am UTC](https://discuss.elastic.co/t/kibana-5-6-using-api-endpoints-to-save-objects/147044/4 "2018-09-05T07:49:24Z")

</div>

> [@Vinay\_Kumar](#):
>
> Hey thanks a lot, @Brandon_Kobel, Let me extend this discussion little bit.
> 
> so currently I've been using the validate API of elasticsearch in order to validate my query.  
> the URL that I am hitting is as follows:
> 
> `curl -X GET -H 'Content-Type: application/json' --data @query.json 'http://` `/_validate/query?explain=true`
> 
> the file `query.json` contains the following:  
> `{ "query": { "match_all": {} }, "filter": [{ "meta": { "index": "Node-DEMO", "negate": false, "disabled": false, "alias": null, "type": "exists", "key": "node_stats.indices.docs.count", "value": "exists" }, "exists": { "field": "index_stats.total.query_cache.miss_count" } }] }`
> 
> **Error that I received:** org.elasticsearch.common.ParsingException: request does not support [filter]
> 
> Is it possible to validate this query?

This is a completely separate question, I'd recommend a separate topic in the Elasticsearch section for this.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 5, 2018, 8:26am UTC](https://discuss.elastic.co/t/kibana-5-6-using-api-endpoints-to-save-objects/147044/5 "2018-09-05T08:26:26Z")

</div>

In [the new thread you created](https://discuss.elastic.co/t/elastic-2-x-is-it-possible-to-validate-the-query-having-filters-on-meta-data/147337), you are indicating that you are using Elasticsearch 2.x. Is that correct?

If that is the case, not that this version is not compatible with Kibana 5.6.

---

<div class="post-metadata">

**Author:** ![Vinay\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinay_kumar/32/35089_2.png) [@Vinay\_Kumar](https://discuss.elastic.co/u/Vinay_Kumar)\
**Post date:** [September 5, 2018, 8:30am UTC](https://discuss.elastic.co/t/kibana-5-6-using-api-endpoints-to-save-objects/147044/6 "2018-09-05T08:30:02Z")

</div>

Hey @Christian_Dahlqvist,  
Sorry for the mistake, I have updated it now.  
ES version is 5.x.

---

<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:** [October 3, 2018, 8:30am UTC](https://discuss.elastic.co/t/kibana-5-6-using-api-endpoints-to-save-objects/147044/7 "2018-10-03T08:30:12Z")

</div>

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