# Query DSL schema

**URL:** <https://discuss.elastic.co/t/query-dsl-schema/93492>\
**Category:** Elasticsearch\
**Created:** [July 18, 2017, 4:10am UTC](https://discuss.elastic.co/t/query-dsl-schema/93492 "2017-07-18T04:10:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucianspec](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@lucianspec](https://discuss.elastic.co/u/lucianspec)\
**Post date:** [July 18, 2017, 4:10am UTC](https://discuss.elastic.co/t/query-dsl-schema/93492/1 "2017-07-18T04:10:48Z")

</div>

i am confused about restful api query DSL body schema , reference is full of examples not BNF syntaxes.  
books i can find like it's too old & code won't work for es 5.4+  
At last i found there is a spec project with test.  
[https://github.com/elastic/elasticsearch/tree/master/rest-api-spec](https://github.com/elastic/elasticsearch/tree/master/rest-api-spec), maybe i can learn from the tests.

So my question is :

1. is there some place have the Query DSL schema defined?  
~~2. how to run the rest-api-spec test???~~  
sorry i hadn't noticed this before [https://github.com/elastic/elasticsearch/blob/master/TESTING.asciidoc#testing-the-rest-layer](https://github.com/elastic/elasticsearch/blob/master/TESTING.asciidoc#testing-the-rest-layer)

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [July 21, 2017, 2:21pm UTC](https://discuss.elastic.co/t/query-dsl-schema/93492/2 "2017-07-21T14:21:30Z")

</div>

We don't currently have an syntactical grammar / schema for the request bodies at the moment. Different APIs have different schemas, depending on the function of that schema. I'm afraid you'll just have to read the docs for the particular endpoints you are interested in to learn the schema, sorry.

---

<div class="post-metadata">

**Author:** ![lucianspec](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@lucianspec](https://discuss.elastic.co/u/lucianspec)\
**Post date:** [July 21, 2017, 2:36pm UTC](https://discuss.elastic.co/t/query-dsl-schema/93492/3 "2017-07-21T14:36:57Z")

</div>

okay, i get it ~ if you have any future plan to redesign the DSL syntax, i suggest make Painless & Query DSL & Kibana Export JSON into one language , now they are 3 different languages.

---

<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 18, 2017, 2:36pm UTC](https://discuss.elastic.co/t/query-dsl-schema/93492/4 "2017-08-18T14:36:59Z")

</div>

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