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 ,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.