# Unable to update the ES using http-output-plugin

**URL:** <https://discuss.elastic.co/t/unable-to-update-the-es-using-http-output-plugin/219179>\
**Category:** Logstash\
**Created:** [February 13, 2020, 9:54am UTC](https://discuss.elastic.co/t/unable-to-update-the-es-using-http-output-plugin/219179 "2020-02-13T09:54:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![psiva017](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/psiva017/32/60382_2.png) [@psiva017](https://discuss.elastic.co/u/psiva017)\
**Post date:** [February 13, 2020, 9:54am UTC](https://discuss.elastic.co/t/unable-to-update-the-es-using-http-output-plugin/219179/1 "2020-02-13T09:54:12Z")

</div>

http {  
url =\> "[http://localhost:9200/test\_index/\_update\_by\_query](http://localhost:9200/test_index/_update_by_query)"  
format =\> "message"  
content\_type =\> "application/json"  
message =\> '{"query": {"match":{ "userId": %{userId}}},"script": "ctx.\_source.recentStatus = %{deptId}"}'  
http\_method =\> "post"  
retry\_failed =\> false  
}

This query is working. But when it is used in Logstash, It is showing error related quotes near %{userId}. Any way to resolve this ??

---

<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:** [March 12, 2020, 9:54am UTC](https://discuss.elastic.co/t/unable-to-update-the-es-using-http-output-plugin/219179/2 "2020-03-12T09:54:20Z")

</div>

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