# Creating watch with webhook without params fails

**URL:** https://discuss.elastic.co/t/creating-watch-with-webhook-without-params-fails/128534
**Category:** Elasticsearch
**Tags:** elastic-stack-alerting
**Created:** [April 18, 2018, 12:49pm UTC](https://discuss.elastic.co/t/creating-watch-with-webhook-without-params-fails/128534 "2018-04-18T12:49:04Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![dandrestor](https://avatars.discourse-cdn.com/v4/letter/d/7cd45c/32.png) [@dandrestor](https://discuss.elastic.co/u/dandrestor)
#### Post date: [April 18, 2018, 12:49pm UTC](https://discuss.elastic.co/t/creating-watch-with-webhook-without-params-fails/128534/1 "2018-04-18T12:49:04Z")

</div>

I'm trying to create a watcher with a webhook action. I'm using the following:

```
{
  ...
  "actions": {
    "some-webhook": {
      "webhook": {
        "scheme": "http",
        "host": "some_host",
        "port": some_port,
        "method": "post",
        "path": "/some/path",
        "headers": {
          "Cache-Control": "no-cache",
          "Content-Type": "application/json"
        },
        "body": "some JSON data"
      }
    }
  }
}

```

When saving this, Elasticsearch will add an empty "params" key, like this:

```
{
  ...
  "actions": {
    "some-webhook": {
      "webhook": {
        "scheme": "http",
        "host": "some_host",
        "port": some_port,
        "method": "post",
        "params": {}, <-- this is added by ES
        "path": "/some/path",
        "headers": {
          "Cache-Control": "no-cache",
          "Content-Type": "application/json"
        },
        "body": "some JSON data"
      }
    }
  }
}

```

The problem is that the webhook then tries to access the URL `http://some_host:some_port/some/path?`, with a question mark, as if URL parameters would follow. This makes my web server respond with a 404 error.

(Just to be clear, the goal is to `POST` some data to the URL `http://some_host:some_port/some/path` - without the question mark).

Is this a bug, or am I doing something wrong? I'm using version 6.1.1.

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [April 18, 2018, 1:11pm UTC](https://discuss.elastic.co/t/creating-watch-with-webhook-without-params-fails/128534/2 "2018-04-18T13:11:19Z")

</div>

This is a bug on the watcher side and is fixed in 6.2.4.

---

<div class="post-metadata">

### Author: ![dandrestor](https://avatars.discourse-cdn.com/v4/letter/d/7cd45c/32.png) [@dandrestor](https://discuss.elastic.co/u/dandrestor)
#### Post date: [April 19, 2018, 7:48am UTC](https://discuss.elastic.co/t/creating-watch-with-webhook-without-params-fails/128534/3 "2018-04-19T07:48:29Z")

</div>

Thanks! Do you have a link to the issue on GitHub?

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [April 19, 2018, 7:49am UTC](https://discuss.elastic.co/t/creating-watch-with-webhook-without-params-fails/128534/4 "2018-04-19T07:49:52Z")

</div>

Unfortunately not, because the code of x-pack is not yet open. From 6.3.0 onwards we will have this though!

---

<div class="post-metadata">

### Author: ![dandrestor](https://avatars.discourse-cdn.com/v4/letter/d/7cd45c/32.png) [@dandrestor](https://discuss.elastic.co/u/dandrestor)
#### Post date: [April 19, 2018, 8:08am UTC](https://discuss.elastic.co/t/creating-watch-with-webhook-without-params-fails/128534/5 "2018-04-19T08:08:30Z")

</div>

Oh, right, I forgot that. Many thanks, Alexander!

---

<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: [May 17, 2018, 8:08am UTC](https://discuss.elastic.co/t/creating-watch-with-webhook-without-params-fails/128534/6 "2018-05-17T08:08:43Z")

</div>

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