# PUT watcher API call using CURL

**URL:** <https://discuss.elastic.co/t/put-watcher-api-call-using-curl/114188>\
**Category:** Elasticsearch\
**Created:** [January 5, 2018, 1:11am UTC](https://discuss.elastic.co/t/put-watcher-api-call-using-curl/114188 "2018-01-05T01:11:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saradac](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@saradac](https://discuss.elastic.co/u/saradac)\
**Post date:** [January 5, 2018, 1:11am UTC](https://discuss.elastic.co/t/put-watcher-api-call-using-curl/114188/1 "2018-01-05T01:11:13Z")

</div>

Hi All,

I have watcher with id fuse-file-management

While trying to execute GET watcher API I get error "No route to host ". Is the URL correct?

curl -H "Content-Type: application/json" -X GET [http://localhost:5601/\_xpack/watcher/watch/fuse-file-management](http://localhost:5601/_xpack/watcher/watch/fuse-file-management)

curl -H "Content-Type: application/json" -X GET [http://localhost:5601/](http://localhost:5601/) **app** /\_xpack/watcher/watch/fuse-file-management

In the example provided : [https://www.elastic.co/guide/en/x-pack/5.0/watcher-api-put-watch.html](https://www.elastic.co/guide/en/x-pack/5.0/watcher-api-put-watch.html)  
copy as curl doesn't work

Any Help is appreciated.

---

<div class="post-metadata">

**Author:** ![murlin99](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@murlin99](https://discuss.elastic.co/u/murlin99)\
**Post date:** [January 5, 2018, 1:29am UTC](https://discuss.elastic.co/t/put-watcher-api-call-using-curl/114188/2 "2018-01-05T01:29:08Z")

</div>

The curl command provided in the example uses port 9200 as in [http://localhost:9200](http://localhost:9200).

9200 is the port to the elasticsearch node  
5601 is the Kibana port

See if that helps.

Bryan Vest

---

<div class="post-metadata">

**Author:** ![saradac](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@saradac](https://discuss.elastic.co/u/saradac)\
**Post date:** [January 5, 2018, 1:49am UTC](https://discuss.elastic.co/t/put-watcher-api-call-using-curl/114188/3 "2018-01-05T01:49:27Z")

</div>

Awesome. Saved my Day.  
👏

---

<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:** [February 2, 2018, 1:49am UTC](https://discuss.elastic.co/t/put-watcher-api-call-using-curl/114188/4 "2018-02-02T01:49:43Z")

</div>

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