# Watcher to run bulk index

**URL:** <https://discuss.elastic.co/t/watcher-to-run-bulk-index/133843>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [May 30, 2018, 9:44am UTC](https://discuss.elastic.co/t/watcher-to-run-bulk-index/133843 "2018-05-30T09:44:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![delly.set](https://avatars.discourse-cdn.com/v4/letter/d/ac91a4/32.png) [@delly.set](https://discuss.elastic.co/u/delly.set)\
**Post date:** [May 30, 2018, 9:44am UTC](https://discuss.elastic.co/t/watcher-to-run-bulk-index/133843/1 "2018-05-30T09:44:49Z")

</div>

hello

I can execute bulk index API via curl successfully:  
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/bank/account/\_bulk?pretty' --data-binary @data.json

I want to use watcher to run bulk index from a json (data.json) file daily automatically, without human interventions.  
From the link _[https://www.elastic.co/guide/en/x-pack/6.2/input-http.html](https://www.elastic.co/guide/en/x-pack/6.2/input-http.html)_ ,watcher is able to execute http endpoint api. But how to pass the json file (data.json) to request.body?

any help is appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)\
**Post date:** [May 31, 2018, 2:15pm UTC](https://discuss.elastic.co/t/watcher-to-run-bulk-index/133843/2 "2018-05-31T14:15:37Z")

</div>

This really isn't what Watcher is designed to do. Why not use Filebeat or Logstash to assist with your data ingest?

---

<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:** [June 28, 2018, 2:15pm UTC](https://discuss.elastic.co/t/watcher-to-run-bulk-index/133843/3 "2018-06-28T14:15:45Z")

</div>

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