# Elastic search queries via URL change from Version 2.1 to 6.3

**URL:** <https://discuss.elastic.co/t/elastic-search-queries-via-url-change-from-version-2-1-to-6-3/143285>\
**Category:** Elasticsearch\
**Created:** [August 7, 2018, 8:44am UTC](https://discuss.elastic.co/t/elastic-search-queries-via-url-change-from-version-2-1-to-6-3/143285 "2018-08-07T08:44:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niclas\_Popp\_BPS](https://avatars.discourse-cdn.com/v4/letter/n/f6c823/32.png) [@Niclas\_Popp\_BPS](https://discuss.elastic.co/u/Niclas_Popp_BPS)\
**Post date:** [August 7, 2018, 8:44am UTC](https://discuss.elastic.co/t/elastic-search-queries-via-url-change-from-version-2-1-to-6-3/143285/1 "2018-08-07T08:44:00Z")

</div>

Hi there,

I have been using an older version of elastic search(2.1) and just recently switched to the newest one, but due to some API changes my URL request unfortunately don't work anymore, they used to look like this:

localhost:9200/myindex/\_search?source={"query": {"bool": { "must": [{"range": {"eventTime": {"gt": "now-150s","lte": "now"}}},{"term": {"\_id": "someid"}}]}}}, "aggs": {}}&pretty&size=9999'

However, when now using this query with the latest version(6.3) I get this reply:

{  
"error" : {  
"root\_cause" : [  
{  
"type" : "illegal\_state\_exception",  
"reason" : "source and source\_content\_type parameters are required"  
}  
],  
"type" : "illegal\_state\_exception",  
"reason" : "source and source\_content\_type parameters are required"  
},  
"status" : 500  
}

Does anybody know which parameters I have to add? Does this still work like this at all?  
I would prefer to stick to this method of doing some requests via URL.

Thanks for any advice!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 7, 2018, 9:08am UTC](https://discuss.elastic.co/t/elastic-search-queries-via-url-change-from-version-2-1-to-6-3/143285/2 "2018-08-07T09:08:20Z")

</div>

Check out [https://www.elastic.co/guide/en/elasticsearch/reference/6.3/common-options.html#\_content\_type\_requirements](https://www.elastic.co/guide/en/elasticsearch/reference/6.3/common-options.html#_content_type_requirements)

---

<div class="post-metadata">

**Author:** ![Niclas\_Popp\_BPS](https://avatars.discourse-cdn.com/v4/letter/n/f6c823/32.png) [@Niclas\_Popp\_BPS](https://discuss.elastic.co/u/Niclas_Popp_BPS)\
**Post date:** [August 7, 2018, 9:17am UTC](https://discuss.elastic.co/t/elastic-search-queries-via-url-change-from-version-2-1-to-6-3/143285/3 "2018-08-07T09:17:58Z")

</div>

Thank you so much!!!  
It 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:** [September 4, 2018, 9:18am UTC](https://discuss.elastic.co/t/elastic-search-queries-via-url-change-from-version-2-1-to-6-3/143285/4 "2018-09-04T09:18:03Z")

</div>

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